Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript - "Cannot read property 'closingEls' of undefined" and "Script error."

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.

like image 464
Sherif Avatar asked Jun 21 '17 04:06

Sherif


1 Answers

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.

like image 61
Aziz Khambati Avatar answered Oct 21 '22 10:10

Aziz Khambati