How to Solution for owl errors odoo16 - odoo

how can i overcome this error during adding code and restarting the server the below error happend tha works previousily.
The added is module is not related
UncaughtPromiseError > OwlError
Uncaught Promise > An error occured in the owl lifecycle (see this Error's "cause" property)
OwlError: An error occured in the owl lifecycle (see this Error's "cause" property)
at handleError (https://drogaerp-staging-6169684.dev.odoo.com/web/assets/471-9924e78/web.assets_common.min.js:1212:101)
at owl.App.handleError (https://drogaerp-staging-6169684.dev.odoo.com/web/assets/471-9924e78/web.assets_common.min.js:2039:29)
at ComponentNode.initiateRender (https://drogaerp-staging-6169684.dev.odoo.com/web/assets/471-9924e78/web.assets_common.min.js:1520:19)
Caused by: RPC_ERROR: Odoo Server Error
at makeErrorFromResponse (https://drogaerp-staging-6169684.dev.odoo.com/web/assets/524-048114d/web.assets_backend.min.js:966:163)
at XMLHttpRequest.<anonymous> (https://drogaerp-staging-6169684.dev.odoo.com/web/assets/524-048114d/web.assets_backend.min.js:973:13)
I want to see and give solution for the above error

Try the feature "Regenerate Assets Bundles" via the developer tools.
Often times this solves those kind of issues. If it is not enough, please provide more informations and I will help you further!

Related

Error: An error was thrown when attempting to render log messages via LogBox

I'm working on an app and everything is working fine, then I began to get this error when I log things out from try-catch block
Error: An error was thrown when attempting to render log messages via LogBox.
Please what could cause this?
i had the same issue and i spend all most two days to find any solution and in the end i find their is one console.log() statement which is logging the entire redux store, so as soon as i removed the console statement error removed.

ERROR TypeError: Cannot read property '__source' of undefined

Since I upgrade to the new spartacus version (1.5) I've seen this bug in the console. It's came from SiteContextComponentService.getInjectedService.
I have not implemented nor used yet this service. How I can fix this bug? Cause I strongly believe is the origin of other little problems in my develop environment.
If you use 'CMSSiteContextComponent' component type (flextype?), then it should come with the context cms component data from the backend. Please check if the response contains it.
So the origin of the error was that in the GET /pages request I was not receiving the context attribute neither in the LanguageComponent nor the CurrencyComponent.

Syntax error handling in dojo 18n resource file

require(["dojo/i18n!myapp/nls/extTools_i18nStrings"],function(extTools_i18nStrings){
// Do something with the loaded file
});
If the resource file (extTools_i18nStrings) has syntax error, it will be shown in dojo.js. How can I handle it in my code?
Try catch block did not work.
Thanks in advance.
Error: Script error .............dojo.js:15
The quick answer is you don't want to. The right thing to do is fix the bundle. This is the same as having errors in your application code, and you would not expect the code to 'handle' that.
But since i18n is an AMD plugin running as part of the loader (which is why you can't try/catch it), the error might be reported through the AMD micro event API, and you could use that to show a better error. I'm not sure how you 'handle' this syntax error other than showing an error.
If you can't control the quality of the bundles via some part of your development or build process you'd have to invent your own alternative to dojo/i18n and you probably don't want to go down that route for all of your bundles.

Reflect.getOwnMetadata - Updating Aurelia

Reflect.getOwnMetadata is not a function in karma with latest Aurelia
I believe my issue to be the same as this, but I am unsure. I needed to update 'binding' from aurelia-binding#^1.0.0-beta.1.0.5 to aurelia-binding#^1.0.0-beta.1.3.0, due to a bug fix within that release, since updating I recieve the following error:
Uncaught (in promise) Error: TypeError: Reflect.getOwnMetadata is not
a function(…)
After a bit of research, mostly being linked back to the question above in one way or another, I had hoped their solution would solve mine however, gulp watch returns: import 'aurelia...' unexpected reserved work. Unsure what I am missing
I think the actual issue is with loading the following, seems to break here first
(function(System, SystemJS, require) {define(["npm:aurelia-templating-resources#1.0.0-beta.1.0.2/aurelia-templating-resources"], function(main) {
return main;
});
})(System, System);

CConsoleApplication.defaultController not defined when creating new migration

I'm trying to use the yii migration system but I'm stuck on this error when I execute this commande:
yiic migrate create add_table_test
I get this error:
exception 'CException' with message 'Property CConsoleApplication.defaultController" is not defined'
(CCompenent.php:173)
But I've defined a defaultController in my config file:
'basePath'=>$rootPath,
'defaultController' => 'person/index',
'homeUrl'=>array('/me'),
I spent hours looking on Google, but I can't find a solution.
Does anyone have an idea about this problem?
The problem is, that you've actually defined the property defaultController in your config/console.php but as the error message says the CConsoleApplication has no such property.
So just remove defaultController from your console config.
(this is actually an answer given by OP (Michaël). I'm putting it here, because he put it into question)
It turned out, that the problem was on my side. I did a really bad thing.
Problem was solved by:
Replacing in yiic.php line $config=dirname(__FILE__).'/config/dev.php'; with $config=dirname(__FILE__).'/config/console.php';.
Create a console.php file in the config directory, without defaultController and theme option.