Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-origin not working #782

Open
xxluke opened this issue Feb 21, 2024 · 2 comments · May be fixed by #685 or Nojay-Games/code-coverage#1
Open

Cross-origin not working #782

xxluke opened this issue Feb 21, 2024 · 2 comments · May be fixed by #685 or Nojay-Games/code-coverage#1

Comments

@xxluke
Copy link

xxluke commented Feb 21, 2024

Logs and screenshots

SecurityError

Failed to read a named property 'coverage' from 'Window': Blocked a frame with origin "http://localhost:4200" from accessing a cross-origin frame.

grafik

Describe the bug
This extension causes an error when you visit a different origin, for example an external login-website, due to CORS. Since the external website doesn't offer coverage anyway, it wouldn't be necessary to fetch it.

There's already #685 which fixes this, unfortunally there seems to be no one willing or able to write a test for it so it can get merged.

If someone knows a work-around for this bug I'd be happy to hear about it. I tried Cypress.on('uncaught:exception', ...) but it seems not to get triggered by this error.

Versions
cypress-io/code-coverage 3.12.24
Cypress 13.6.2

@JRSalica
Copy link

JRSalica commented Mar 4, 2024

I have exactly the same issue, did you find a fix or a workaround? thx!

@xxluke
Copy link
Author

xxluke commented Mar 5, 2024

I haven't unfortunally. We're now writing more unit tests instead of Cypress for the coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants