question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DOMException: Blocked a frame with origin "null" from accessing a cross-origin frame.

See original GitHub issue

@percy/storybook”: “^3.3.1”

After building Storybook and running percy-storybook --widths=320,1280 --debug, I get the following error:

Error:  Error: Evaluation failed: Error: Storybook object not found on window. Open your storybook and check the console for errors.
    at checkStories (__puppeteer_evaluation_script__:23:16)
    at __puppeteer_evaluation_script__:20:11
    at ExecutionContext._evaluateInternal (/Users/camh/Sites/ssr-frontend/apps/unified-checkout/node_modules/puppeteer/lib/ExecutionContext.js:81:15)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async ExecutionContext.evaluate (/Users/camh/Sites/ssr-frontend/apps/unified-checkout/node_modules/puppeteer/lib/ExecutionContext.js:48:12)
  -- ASYNC --
    at ExecutionContext.<anonymous> (/Users/camh/Sites/ssr-frontend/apps/unified-checkout/node_modules/puppeteer/lib/helper.js:111:15)
    at DOMWorld.evaluate (/Users/camh/Sites/ssr-frontend/apps/unified-checkout/node_modules/puppeteer/lib/DOMWorld.js:112:20)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
  -- ASYNC --
    at Frame.<anonymous> (/Users/camh/Sites/ssr-frontend/apps/unified-checkout/node_modules/puppeteer/lib/helper.js:111:15)
    at Page.evaluate (/Users/camh/Sites/ssr-frontend/apps/unified-checkout/node_modules/puppeteer/lib/Page.js:833:43)
    at Page.<anonymous> (/Users/camh/Sites/ssr-frontend/apps/unified-checkout/node_modules/puppeteer/lib/helper.js:112:23)
    at _callee$ (/Users/camh/Sites/ssr-frontend/apps/unified-checkout/node_modules/@percy/storybook/lib/getStories.js:64:25)
    at tryCatch (/Users/camh/Sites/ssr-frontend/apps/unified-checkout/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:62:40)
    at Generator.invoke [as _invoke] (/Users/camh/Sites/ssr-frontend/apps/unified-checkout/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:296:22)
    at Generator.prototype.<computed> [as next] (/Users/camh/Sites/ssr-frontend/apps/unified-checkout/node_modules/babel-runtime/node_modules/regenerator-runtime/runtime.js:114:21)
    at step (/Users/camh/Sites/ssr-frontend/apps/unified-checkout/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
    at /Users/camh/Sites/ssr-frontend/apps/unified-checkout/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13

From here, I open the storybook-static index file, and I’m seeing the following in the console:

Adding a click listener to iframe failed:  DOMException: Blocked a frame with origin "null" from accessing a cross-origin frame.

Screenshot: image

Any ideas?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
camthepersoncommented, Apr 6, 2021

@Robdel12 I think I’ve made some progress.

In our repo, we’ve abstracted Storybook as a dependency and it’s configuration through a tool called pixeloven.

Our tool uses the following command to build Storybook: pixeloven story build. From here, a static version of Storybook is built into a stories directory.

So essentially, when I build storybook using build-storybook and navigate to storybook-static, it doesn’t work. Perhaps because our config is abstracted through pixeloven-storybook or something.

However, when I build storybook using pixeloven story build, and then navigate to the version created in stories, that version renders correctly.

So I’m curious if there is a way to tell the percy-storybook command to look in stories instead of storybook-static?

0reactions
Robdel12commented, Apr 7, 2021

Sweet! Super happy that helped get you going in the right direction 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

blocked a frame of origin "null" from accessing a cross-origin ...
This happens because Chrome doesn't allow frames from your hard disk to access each others' content. Which, technically we term as Cross-origin request....
Read more >
Resolving the Blocked a Frame with Origin "null ... - HackerNoon
The 'blocked a frame with origin "null" from accessing a cross-origin frame` error occurs because of `Cross-originn` request.
Read more >
Blocked a frame with origin from accessing a cross-origin frame
Same-Origin Policy (SOP) restricts how a document or script loaded from one origin can interact with a resource from another origin.
Read more >
Blocked a frame with origin "null" from accessing a cross ...
Because of the 'Cross-origin' request, the 'blocked a frame with origin "null" from accessing a cross-origin frame' error occurs.
Read more >
Firefox does not block a frame with origin "null" from accessing ...
Because of the 'Cross-origin' request, the 'blocked a frame with origin "null" from accessing a cross-origin frame' error occurs. There are several workarounds ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found