Getting Error: Script error. (:0) - How to resolve?
See original GitHub issueCurrent behavior:
Cypress test run fails on Chrome in before()
with a cryptic error message:
Error: Script error. (:0)
Because this error occurred during a ‘before all’ hook we are skipping the remaining tests in the current suite: ‘Pets - Feed item’
Please see this screenshot:
Desired behavior:
A detailed error message should appear and should include clear instructions on how to resolve the problem.
Steps to reproduce: (app code and test code)
I’ve not been able to reproduce based on cypress-test-tiny
repo so I’ve created a private repo containing a full test suite. I’ve sent emailed instructions on how to access it to support@cypress.io.
To reproduce using said repo, please:
- Clone to Ubuntu.
- Run
npx cypress open
. - Run this spec file:
sanity/pets/feed_item.spec.js
Versions
Cypress v3.4.0 Ubuntu 16.04 LTS Chrome 75
Issue Analytics
- State:
- Created 4 years ago
- Comments:18 (8 by maintainers)
Top Results From Across the Web
Script error code 0 - Microsoft Community
Method 1: If you receive get script error while using Internet Explorer then follow the suggestion from the link and check if it...
Read more >How to Fix Script Error Pop Up in Windows 10, 11 - YouTube
Steps by steps guide: https://bonguides.com/how-to- fix - script - error -pop-up-in-windows-10-11/- Fix Script Error on Windows 11/10.
Read more >Fix Script Error on Windows 11/10
Disable the Script Error Notification; Remove All temporary internet files; Update the application causing the problem. You may not need an ...
Read more >How to best resolve script error messages on personal computer
Script error messages tend to appear when one's browser is out of date.
Read more >How to Troubleshoot Script Error Code 0 on LabVIEW - NI
If you encounter a script error when you are using the ActiveX browser in LabVIEW, you can disable this error notification by changing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The best workaround to see the source of error right now on the Guardian website for example is:
cypress.json
Then rerun the test with DevTools open again and it should see better errors
assets.guim.co.uk
so add it to the blacklists incypress.json
cypress.json
and finally the site loads
Having the same issue but i managed to find a workaround, in my case at least. Try setting
"chromeWebSecurity": false
incypress.json
. Before disabling web security i was gettingError: Script error. (:0)
, after disabling it cypress was logging the correct error.