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

Blocked a frame with origin "https://angular.io" from accessing a cross-origin frame. #9049

Closed
bahmutov opened this issue Oct 30, 2020 · 5 comments · Fixed by #9018
Closed
Labels
blocking Cannot run tests with Cypress due to the issue type: bug

Comments

@bahmutov
Copy link
Contributor

Current behavior

Trying to visit https://angular.io

context('Angular.io search', () => {
  it('finds the right answer', function () {
    cy.visit('/')
    cy.get('[aria-label=search]').type('install')
  })
})

with cypress.json

{
  "baseUrl": "https://angular.io"
}

Getting an error

Screen Shot 2020-10-30 at 2 44 45 PM

The inline script that we inject is missing

Screen Shot 2020-10-30 at 2 45 11 PM

Maybe our proxy could not inject it into this site for some reason?

Desired behavior

Visit the site, run the test

Test code to reproduce

https://github.com/bahmutov/test-angular-search/tree/problem

Versions

5.5.0

@bahmutov bahmutov added blocking Cannot run tests with Cypress due to the issue type: bug labels Oct 30, 2020
@bahmutov
Copy link
Contributor Author

Also tried #9018 and develop, same error

@bahmutov
Copy link
Contributor Author

Note: the linked PR 9018 fixes the problem, BUT if you already have visited the site, the ServiceWorker there caches the bad page. Thus you need to clear the application cache using DevTools.

Tip: you can disable ServiceWorker when vising site https://glebbahmutov.com/blog/cypress-tips-and-tricks/#disable-serviceworker

@cypress-bot cypress-bot bot added the stage: needs review The PR code is done & tested, needs review label Oct 30, 2020
@cypress-bot cypress-bot bot added stage: pending release There is a closed PR for this issue and removed stage: needs review The PR code is done & tested, needs review labels Nov 9, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Nov 9, 2020

The code for this is done in cypress-io/cypress#9018, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Nov 9, 2020

Released in 5.6.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v5.6.0, please open a new issue.

@cypress-bot cypress-bot bot removed the stage: pending release There is a closed PR for this issue label Nov 9, 2020
@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Nov 9, 2020
@bahmutov bahmutov reopened this Nov 24, 2020
@bahmutov
Copy link
Contributor Author

Got to clear the application data AND disable service worker

Screen Shot 2020-11-24 at 4 18 15 PM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocking Cannot run tests with Cypress due to the issue type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant