Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
1124 Vistas

Помилка клієнта Odoo

UncaughtPromiseError > OwlError

Uncaught Promise > An error occured in the owl lifecycle (see this Error's "cause" property)

Occured on upako.odoo.com on 2025-02-04 10:10:43 GMT

OwlError: An error occured in the owl lifecycle (see this Error's "cause" property)
    Error: An error occured in the owl lifecycle (see this Error's "cause" property)
        at handleError (https://upako.odoo.com/web/assets/1af893c/web.assets_web.min.js:749:101)
        at App.handleError (https://upako.odoo.com/web/assets/1af893c/web.assets_web.min.js:1400:29)
        at Fiber._render (https://upako.odoo.com/web/assets/1af893c/web.assets_web.min.js:774:19)
        at Fiber.render (https://upako.odoo.com/web/assets/1af893c/web.assets_web.min.js:772:6)
        at ComponentNode.initiateRender (https://upako.odoo.com/web/assets/1af893c/web.assets_web.min.js:842:47)

Caused by: TypeError: Object.groupBy is not a function
    at get partition (https://upako.odoo.com/web/assets/1af893c/web.assets_web.min.js:14586:251)
    at Reflect.get (<anonymous>)
    at Object.get (https://upako.odoo.com/web/assets/1af893c/web.assets_web.min.js:816:71)
    at Composer.template (eval at compile (https://upako.odoo.com/web/assets/1af893c/web.assets_web.min.js:1352:421), <anonymous>:50:71)
    at Fiber._render (https://upako.odoo.com/web/assets/1af893c/web.assets_web.min.js:773:96)
    at Fiber.render (https://upako.odoo.com/web/assets/1af893c/web.assets_web.min.js:772:6)
    at ComponentNode.initiateRender (https://upako.odoo.com/web/assets/1af893c/web.assets_web.min.js:842:47)

Avatar
Descartar
Autor

everywhere when refreshing the page

Mejor respuesta

HIi,
You're using groupBy(), which is a modern JavaScript method not supported in some older browsers or environments.Use Array.prototype.reduce() or lodash.groupby() instead of groupBy()

  • If you (or a module) are using:

js 

Object.groupBy(data, ...)

Replace it with:

data.reduce((acc, item) => {

    const key = item.someKey;

    (acc[key] = acc[key] || []).push(item);

    return acc;

}, {});

Or install a polyfill if custom JS must use Object.groupBy()

Add this in your custom JS:

if (!Object.groupBy) {

  Object.groupBy = function (items, callback) {

    return items.reduce((result, item) => {

      const key = callback(item);

      (result[key] = result[key] || []).push(item);

      return result;

    }, {});

  };

}

Check your custom modules or recent theme updates

→ They might be using Object.groupBy() improperly.

i dont know which version you will use you make custom module or not 
there is one way for solution

i hope it is use full

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
jun 25
720
1
jun 25
2373
0
may 25
863
0
dic 24
4
1
ago 15
5937