Odoo v12 - Uncaught TypeError: odoo.define is not a function - developer-console

I am using Odoo v12 and when I try to access one of my database through browser it doesn't loads up properly. It comes up as blank screen and when I checked the developer console it shows following error:
Uncaught TypeError: odoo.define is not a function
Odoo -12: Developer console error message

It's a little late for this answer but still will give it a try. This seems to be an Odoo unsolved issue (happened to me with Odoo 12). There are a few workarounds:
quick fix: DELETE FROM ir_attachment WHERE url LIKE '/web/content/%';
If it doesn't work, try cleaning browser cache and retry.
If it doesn't work, just delete the db and postgresql's user and recreate them.
Recreating the DB usually works.
I know all of these are workarounds, but so far, this issue hasn't been solved by the Odoo team.
You can track the issue on GitHub

Inspect the browser --> Network --> refresh by checking and unchecking the disable cache option.
Only a temprory solution

Related

Swagger UI Not Loading Sometimes

I'm using latest version of Swagger in my ASPNetCore 3.1 project and debugging on latest version of Chrome. When I try to enter swagger page it sometimes not loading and i see an empty page. It looks like totally random. It solves after I refresh the page.
I saw these errors on console.
GET https://localhost:44389/swagger/swagger-ui-bundle.js net::ERR_HTTP2_PROTOCOL_ERROR
index.html:95 Uncaught ReferenceError: SwaggerUIBundle is not defined
at window.onload (index.html:95)
File in the error is random. Its sometimes a js file, sometimes a .css file. It changes.
If I publish this project on IIS and disable Http/2 support I never encounter this error.
Why?
You can try the following:
1.Check if all your controller methods have [http] tag. If they all do and still doesn't work go to step 2
2.In your configure function to ensure that you have app.UseStaticFiles(); If it still doesn't work go to step 3
3.Uninstall and reinstall swagger. If it doesn't work go to step 4 (Core Only)
4.If you are using Core Install Microsoft.AspNetCore.StaticFiles and reference it in your project.
I encountered the same problem, SwaggerUIBundle is not defined, and the problem is not on the web app that I'm developing but on my network. The problem was resolved after I switch to another network.

Visual Studio Code (vscode) - Request textDocument/documentLink failed error on key press

Hi I'm running VSCode on my mac and Windows 10 machine. They've both started displaying the same symptoms after the latest update/rollback.
Every couple of keypresses I get the output box appear, with the "HTML Language Server" selected in the dropdown. The error displayed is:
[Error - 13:47:09] Request textDocument/documentLink failed.
Message: Request textDocument/documentLink failed with message: Path must be a string. Received undefined
Code: -32603
This gets repeated indefinetly and is making VSCode unusable. I'm editing some JSP / JSTL files so I'm wondering if it's some non-valid HTML setting it off, but this has never been an issue before.
All research I've found of this error seems to suggest a faulty extension, but I've currently not got any installed.
Help appreciated!
This is a known issue and, as per this Github issue, the workaround is to open Visual Studio Code on a folder instead of a file.
I too had this popping up this morning, google pointed me to vscode's extensions, so I went through the vscode extensions, updated them all and Debugger for Chrome (2.2.0) was the only one fitting the Error message.
Since I do not have the time right now to file an issue (and answer follow-ups) on https://github.com/Microsoft/vscode-chrome-debug/issues I have just disabled the extension for now.
One thing to note is, while vscode says it is version 2.2.2 in the extension panel, it is 2.2.0 on its marketplace page and github. Might be of some interest to dive in and find out where the extension panel picks up its - false - version number - and find out whether this has some impact on creating the error.

Bizarre Error in Chrome Developer Console - Failed to load resource: net::ERR_CACHE_MISS

As far as I can tell, this error was not being thrown yesterday on Chrome, and as of this morning, it is. I have not changed any of my browser settings. I have attached a screenshot (after opening/closing Developer Tools window four times):
This issue is tangentially similar to Stack Overlow post Failed to load resource under Chrome except that it only occurs when I "Inspect Element" in Chrome. Here are the details I have:
To the best of my ability I undid everything I did since last night (when I did not have this error) and the error persists. When I remove all pre-<html> PHP code, the error disappears.
When I only remove all the pre-<html> PHP code except
<?php session_start(); ?>
the error returns.
Since the error seems to involve PHP, I checked my error log, but there are no notices, warnings, nor errors. When I close the Developer Tools window and then open up the window without a page reload, the number of errors increments by one each time.
When I keep the window open, and then reload the page, the page reloads without throwing the error. However, as soon as I close the Developer tools window again, then open it (no page reload), the error is thrown. I checked my site on Firefox with Firebug enabled, and no errors are thrown, making it seem like a Chrome issue (version 38). My site seems to function normally otherwise. Other sites on device browsed via Chrome (for example, Yahoo) also experience this error.
Also, I have not manually changed any of my browser settings since months ago. As an additional note, this is the second strange error I have encountered in Chrome in the last year (see Stack Overflow question Failed to load resource: net::ERR_NETWORK_IO_SUSPENDED), to which no one was able to find a solution, even with a bounty offered.
Is there a way to prevent this error, or is this a browser-only issue? On a side note, when I open up Developer Tools in Chrome for Stack Overflow, there is no error thrown, so either Stack Overflow is not coded in PHP or they have a way to prevent this error. I think my site is not affected, but I am not 100% sure, and it makes me nervous :)
Per the developers, this error is not an actual failure, but rather "misleading error reports". This bug is fixed in version 40, which is available on the canary and dev channels as of 25 Oct.
Patch
On Chrome's latest update (38.0.2125.104 m at the moment), Google added the option to know whether the files loaded to the website were newly downloaded from the server - or read from the local cache.
When an error like yours "hits" the console - you know the files were just downloaded from the server and not read from the local cache. You can recreate this error by clicking Ctrl + F5 (refresh and erase cache).
It fits your description where Firebug (or equivalents) doesn't fire any errors to the console - whilst Chrome does.
So, the bottom line is - your're just fine and you can ignore this error - it's merely an indicator.
Check to see if you have previously disabled caching in Chrome when the developer console is open - the setting is under the console, settings icon > General tab: Disable cache (while DevTools is open)
Check for the presence of words like "ad", "banner" or "popup" within your file. I removed these and it worked. Based on this post here: Failed to load resource under Chrome it seems like Ad Block Plus was the culprit in my case.
See if you can recreate the issue in an Incognito tab. If you find that the problem no longer occurs then I would recommend you go through your extensions, perhaps disabling them one at a time. This is commonly the cause as touched on by Nikola
I had issues getting through a form because of this error.
I used Ctrl+Click to click the submit button and navigate through the form as usual.

addthis's script fails to load in Chrome

I've added addthis.com's code to my HTML page.
But Google Chrome shows a status failed for getting this url :
x Failed to load resource
GET http://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-51aee1dc1b323034
The addthis widget shows in FireFox on my PC but not on my colleague's where on loading that URL shows Content Encoding Error.
Im unable to find the root cause of this. Is it addthis's script or does it have something to do with my implementation ?
I ran into the same issue today. Try using https. It solved the problem for me.
https://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-51aee1dc1b323034
AdBlock and other extensions block "addthis"
http://support.getadblock.com/discussions/problems/26572-adblock-blocking-adthis-widget
I tried in every possible way for a day (http to https, CORS, etc). But failed. Then disable all the Extensions in Chrome. Eureka!!! It's Avast bloking the addthis_widget.js
If you have the Avast Online Security extension installed in your browser just disable it. Worked for me.
I ran into the same issue:
GET https://s7.addthis.com/js/300/addthis_widget.js net::ERR_BLOCKED_BY_CLIENT
The console error states it was blocked by client (me): so I checked and found out I had adblockers enabled in my browser, thus: I then added the site to whitelist and voila: AddThis started working!
In addition:
//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-51aee1dc1b323034
The above accounts for both Http and Https.
If you're using OpenWRT (and I imagine DD-WRT and others) on your router and using any of the adblock services/plugins, you need to add s7.addthis.com to the Services > Adblock whitelist.
The specific error is
https://s7.addthis.com/js/300/addthis_widget.js
net::ERR_NAME_NOT_RESOLVED
You'll get similar errors for Google and Bing analytics and other similar services too.

Error: Parameter 2 (request) is required. [schemaUtils:39]

I use the Google Chrome Extention JavaScript Errors Notifier. Now i get on EVERY Site (also on SO) the Error: Error: Parameter 2 (request) is required. [schemaUtils:39].
Is this my fault or is this a bug in the extention which must be reportet?
Found nothing in google or on their website...
The Extention was disturbed by another extention named Magic Inputs Filler.
I deactivated the breakpoints and then reactivated them. Error was gone. Like here
http://prntscr.com/4ixknk