Skip to content

Cross-origin not working #782

Closed
Nojay-Games/code-coverage
#1
@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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions