Cypress says script error thrown in cross origin script - do not know why
See original GitHub issueHello!
Everything works ok. 0 errors in Chrome or in tests console. But I get this error. And all pipeline is broken.
If there is a error, why it is hidden from me?
Uncaught Error: Script error.
Cypress detected that an uncaught error was thrown from a cross origin script.
We cannot provide you the stack trace, line number, or file where this error occurred.
Check your Developer Tools Console for the actual error - it should be printed there.
It's possible to enable debugging these scripts by adding the 'crossorigin' attribute and setting a CORS header.
https://on.cypress.io/cross-origin-script-error
This error originated from your application code, not from Cypress.
When Cypress detects uncaught errors originating from your application it will automatically fail the current test.
This behavior is configurable, and you can choose to turn this off by listening to the 'uncaught:exception' event.
https://on.cypress.io/uncaught-exception-from-application
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Error Messages | Cypress Documentation
Cypress detected that an uncaught error was thrown from a cross-origin script. Browser Errors; The browser process running your tests just exited unexpectedly ......
Read more >Cypress throws "cross origin error happened on page load ...
This error means that your application navigated to a superdomain that Cypress was not bound to. Initially when you cy.visit() , Cypress ...
Read more >Cypress says script error thrown in cross origin script - do not know ...
If this is not your website and you cannot fix the error, I suggest adding a check to ignore uncaught errors in Cypress...
Read more >cypress-io/cypress - Gitter
Error : Uncaught Error: Script error. Cypress detected that an uncaught error was thrown from a cross origin script. We cannot provide you...
Read more >Fixing Cypress cross-origin errors - Reflect.run
This is due to how Cypress is architected. Other testing tools like Selenium and Playwright operate outside of the browser runtime, and ...
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 Free
Top 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
@hiren0007 I’m not totally sure why this is displaying as a ‘cross origin error’. It looks like there is an error in Harpers own code trying to console.log() an undefined variable when the window loads. Perhaps I’m wrong about it not being from a cross origin script though 🤔
If this is not your website and you cannot fix the error, I suggest adding a check to ignore uncaught errors in Cypress like below:
Hello. Interestingly, this workaround (bypassing uncaught errors) work in the
openui, but still fail in terminal/cli! And when I simply returnfalsefor that listener, it locks hanging the terminal, never ending the tests.Any reason for that?!