添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
玩篮球的跑步机  ·  Common MIME types - ...·  14 小时前    · 
光明磊落的熊猫  ·  SketchBook ...·  2 天前    · 
刚分手的卤蛋  ·  JavaScript ...·  2 天前    · 
咆哮的地瓜  ·  Randomly getting ...·  2 天前    · 
帅气的领带  ·  沿小清河修建地铁 ...·  4 周前    · 
时尚的海豚  ·  POI ERROR: Expecting ...·  1 月前    · 
健身的苦瓜  ·  OpenMP - Max.C的博客·  1 月前    · 
苦闷的木瓜  ·  SPLIT_PART - Apache Doris·  5 月前    · 

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 Randomly getting "SecurityError: Blocked a frame with origin ... from accessing a cross-origin frame." #6930 Randomly getting "SecurityError: Blocked a frame with origin ... from accessing a cross-origin frame." #6930 ivoiv opened this issue Apr 3, 2020 · 2 comments

We keep getting this error randomly on Jenkins CI in headless mode.

Sometimes it works, sometimes it doesn't.

It started all of a sudden after upgrading from Cypress 3.8.3 to 4.3.0

We have no iframes whatesoever on the site.

Any hints to what might be causing this?

Current behavior:

  1) Search functionality Finds `Eier/Forsikringstaker:
     SecurityError: Blocked a frame with origin "http://localhost:3000" from accessing a cross-origin frame.
  Error: Blocked a frame with origin "http://localhost:3000" from accessing a cross-origin frame.
      at setWindowDocumentProps (http://localhost:3000/__cypress/runner/cypress_runner.js:143709:42)
      at HTMLIFrameElement.<anonymous> (http://localhost:3000/__cypress/runner/cypress_runner.js:144418:11)
      at HTMLIFrameElement.dispatch (http://localhost:3000/__cypress/runner/cypress_runner.js:75099:27)
      at HTMLIFrameElement.elemData.handle (http://localhost:3000/__cypress/runner/cypress_runner.js:74907:28)
  2) Search functionality "after each" hook for "Finds Eier/Forsikringstaker":
     Error: Cypress command timeout of `4000ms` exceeded.
Because this error occurred during a `after each` hook we are skipping all of the remaining tests.
      at http://localhost:3000/__cypress/runner/cypress_runner.js:147599:25
  3) UI functionality "after all" hook for "Looks the same at start":
     SecurityError: Blocked a frame with origin "http://localhost:3000" from accessing a cross-origin frame.
  Because this error occurred during a `after all` hook we are skipping all of the remaining tests.
  Error: Blocked a frame with origin "http://localhost:3000" from accessing a cross-origin frame.
      at Context.<anonymous> (http://localhost:3000/__cypress/tests?p=cypress/support/index.js-945:1:3831)

Versions

4.3.0, Chrome 80 headless, Linux(image jenkins/jenkins:2.204.5-alpine)

You don't have to have iframes in order to get a cross-origin frame error. Please read our web security doc for explanations and workarounds: https://on.cypress.io/web-security

Unfortunately we have to close this issue as there is not enough information to reproduce the problem. This does not mean that your issue is not happening - it just means that we do not have a path to move forward.

Please comment in this issue with a reproducible example and we will consider reopening the issue.

I had a similar issue where I got an error message with localhost:3000

The error message was quite misleading as the problem might be one of the two:

  • in some rare cases, the Cognito Hosted UI redirected to their login page (in a different domain)
  • long(ish) request to an S3 completed at the end of the test and as it was from other domain it caused an error on the next test's beforeEach
  • I have added some debug messages to the Cypress source code as the localhost:3000 error message isn't correct.

    I'll let you know what I found out.