-
Notifications
You must be signed in to change notification settings - Fork 7
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
Script always fails with error "Storybook object not found on window. Open your storybook and check the console for errors." #44
Comments
@karrui which version of Storybook are you using? This doesn't yet support Storybook v6.4 (although I'm working on that). |
Ah, I should have included that information. I'm using |
On further investigation, it may be due to the msw storybook addon, and it is intercepting the puppeteer requests, if that helps better debug this. |
Ah, gotcha, thanks for the info. That's super helpful. I'll look into what's going on there, and how we could prevent the msw addon from intercepting the requests. What's interesting is my company uses MSW heavily but doesn't have any issues, although we don't use that addon. |
Might have been a red herring; I've removed the decorator and it's still giving me the same error. But it might have something to do with it; I was going down a different path with |
One thing to help debug, @karrui: Can you open the Just want to see if Storybook itself is even loading (seems like it's not, but want to make sure). |
Thanks for being so active in this issue! That was one of the first things I checked; I do see that iframe. |
No prob. I'll look into this some more, and try to reproduce with msw addon. |
@karrui I added msw and its addon to the demo in this repo, and wasn't able to reproduce. Can you give me any info about what routes are being mocked by msw? Or is there any chance your work is in a repo/branch I can pull down and look at? |
Actually, yes. The repo I'm working on is open source; you can find it here. Ensure that you are on the |
…ywright This is necessary because Playwright's `page.evaluate` requires return values to be JSON serializable, so we need to make sure there are no non-serializable things in this object. There's no telling what Storybook addons people are using, and whether their parameters are serializable or not. See #44 for a bug caused by this.
Alright, fix coming in #45. Will let you know when it's published, and thanks for reporting the issue! What's happening is:
We can avoid that by only retrieving the information we know we need, instead of trying to get everything out of the browser. |
4.1.3 is released with the fix. @karrui when you get a chance, can you verify that it solves the issue for you? (It does in my testing on the repo) |
Awesome, it works now. Once again, thanks for such a quick response! |
When running my CLI command (regardless of config), the cli always hangs with the following output:
The text was updated successfully, but these errors were encountered: