Skip to content

Cross-origin not working #782

@xxluke

Description

@xxluke

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

Activity

JRSalica

JRSalica commented on Mar 4, 2024

@JRSalica

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

xxluke

xxluke commented on Mar 5, 2024

@xxluke
Author

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

cypress-app-bot

cypress-app-bot commented on Jul 3, 2024

@cypress-app-bot

🎉 This issue has been resolved in version 3.12.40 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @xxluke@JRSalica@cypress-app-bot

      Issue actions

        Cross-origin not working · Issue #782 · cypress-io/code-coverage