I get the following errors in the JavaScript console with no file source hint:
Uncaught TypeError: Cannot read property 'closingEls' of undefined
and
Script error
These errors prevent my page from running scripts and I don't understand what kind of errors they are.
I tried searching what 'closingEls' is, but no luck. I don't know what type of tags I need to put in this question due to the vague nature of these errors.
Edit 1: Please, before you say show us the code, read the question! my scripts do not run in the first place. And this errors does not come out of the site's scripts, it comes from the user's agent trying to load the page.
Edit 2: Please, advice a way to deal with the users having this errors and can not load the page successfully. I would consider this very helpful, constructive and question-related.
The "Script error." happens in Firefox, Safari, and Chrome when an exception violates the browser's same-origin policy - i.e. when the error occurs in a script that's hosted on a domain other than the domain of the current page.
Can read more over here:
http://blog.errorception.com/2012/04/script-error-on-line-0.html
https://blog.sentry.io/2016/05/17/what-is-script-error.html
Regarding "Uncaught TypeError: Cannot read property 'closingEls' of undefined" Even I'm getting them in my Sentry log, and I don't know how to fix them. I think these errors are from Browser Extensions trying to add their own script. In case of the "Script Error" the extension (or browser) has not allowed you to access the debugging information, while the other extension (or browser) has allowed you to see it.
Most Client JS error tracking ignore "Script Error.". Read here
https://docs.sentry.io/clients/javascript/tips/
http://blog.errorception.com/2012/03/tale-of-unfindable-js-error.html
Let's hope that this question finds popularity and we find the developer of the extension.
Related
I am developing a wordpress site. When running my site I get in the consle the following errors.
Error: Promised response from onMessage listener went out of scope 3 background.js:841:170
Error: Promised response from onMessage listener went out of scope ExtensionMessagingService.js:89:34
Error: Promised response from onMessage listener went out of scope 10 background.js:841:170
Maybe it has to do with a javascript that I also developed for that site. It is using getElementbyID.
I am not sure to what that error is related. Can somebody explain me what that error means? Is there a way to find more debug information than what is shown in the debug console? I am a newbie in website development.
Trusting the site in Ghostery got rid of this error for me (dev server on localhost)
The "background.js:841:170" in the console log is a link, which when clicked on takes you to the offending code. Research indicates a moz extension, which seems to indicate an Adblocker.
This is what worked for me.
click the link at the right end of the error message.
It will open a new tab in your browser.
On the the address bar(of that new tab) you will find the name of the extension[Extension(extension_name)] that is causing the problem.
Disabling that extension stops this error message.
or you can simply change the browser. So suppose if you use firefox for browsing, then use chrome for development. Both have good developer tools.
I am editing a codeIgniter application purchased online which have no support, everything is OK but javascript codes are not working, it keeps giving this error message
Error in event handler: TypeError: Cannot read property 'apply' of undefined
at w.g.P (chrome-extension://ngpampappnmepgilojfohadhhmbhlaek/content.js:22:354)
at w.g.na (chrome-extension://ngpampappnmepgilojfohadhhmbhlaek/content.js:4:214)
and when continue viewing the page it says
content.js:21 Uncaught Error: Attempting to use a disconnected port object
at w.g.ka (content.js:21)
But actually in my directories I don't see the page named content.js
How can I solve this error? and finally have my javascript functions working?
Thank you.
Thank you so much for contribution, I came to realize that problem was on my script arrangement, JavaScript had to start at the top of the page, so my problem solved by uninstalling IDM plugin from chrome and re-arranging the script.
When I try to log into app, the error I get in client console (chrome dev tools) is this:
Uncaught Error: Expected to find a document already present for removed mongo.js?69942a86515ec397dfd8cbb0a151a0eefdd9560d:253
and the login is halted: the loading gif from the accounts-google package shows and the loading never ends.
I however get no errors in server console. Unfortunately, the error gives me little understanding as to where to even start debugging my app from.
I have gone through the portion where the error is thrown in the mongo.js file, but I don't get what's going on there from it either.
Since I do not have any idea where I am going wrong, this is the link to the project repository.
Maybe you was use fast-render package and doing 2 subscriptions for the same publication as explined here
Hope this help someone.
I was trying to play with physi.js library (). I followed all the steps given:
https://github.com/chandlerprall/Physijs/wiki/Basic-Setup
However, I got the error:
Uncaught SecurityError: Failed to construct 'Worker': Script at 'file://172.16.159.200/js/physijs_worker.js' cannot be accessed from origin 'null'.
I tried to go deeper, and saw that the problem with the line:
this._worker = new Worker( Physijs.scripts.worker || 'physijs_worker.js' );
What did cause that issue? The browser is Google Chrome. I checked, the file "physijs_worker.js" appears in the right location.
Browsers don't allow creating workers from local files because that would be a security issue.
See also this question:
Why does not Chrome allow Web Workers to be run in JavaScript?
Just add the chrome extension
https://chrome.google.com/webstore/detail/web-server-for-chrome/ofhbbkphhbklhfoeikjpcbhemlocgigb?hl=en
and use the extension to launch your index.html. As now it will be running in localhost, there will be no error
Deploy your website on a web server. Without the web server I get the same error.
this message appears all the time in chrome developer tool's console:
Port error: Could not establish connection. Receiving end does not exist. miscellaneous_bindings:232
chromeHidden.Port.dispatchOnDisconnect miscellaneous_bindings:232
Error in event handler for 'undefined': Cannot read property 'instanceId' of undefined TypeError: Cannot read property 'instanceId' of undefined
at [object Object].<anonymous> (chrome-extension://mgijmajocgfcbeboacabfgobmjgjcoja/content_js_min.js:2:372)
at chrome-extension://mgijmajocgfcbeboacabfgobmjgjcoja/content_js_min.js:1:182
at miscellaneous_bindings:276:11
at [object Object].dispatch (event_bindings:203:41)
at Object.<anonymous> (miscellaneous_bindings:235:27) event_bindings:207
chrome.Event.dispatch event_bindings:207
chromeHidden.Port.dispatchOnDisconnect miscellaneous_bindings:235
is this a bug in chrome or there is something wrong in my chrome installation?
It seems to be a problem with the Google Dictionary (by Google)
This script doesn't seem to exist or is not accessible by that port.
Based on some googling, this is a problem with a chrome extension, but it may not be clear which. (For me, it was Feedly).
The quickest way to find out which is causing the problem:
Disable all your chrome extensions. (Chrome menu > tools > extensions)
Refresh a page - hopefully the port error should be gone now
Re-enable your extensions one by one, refreshing the page after each, 'til the error pops up again in the console. You should now have your culprit.
I know this could be a pain if there are a lot of extensions :/ personally, I took it as a chance to prune the unused / unworthy extensions while I was going through them.