storycap icon indicating copy to clipboard operation
storycap copied to clipboard

error Screenshot timeout exceeded. 'capture' function is not triggered in 5000 ms.

Open manht1 opened this issue 4 years ago • 5 comments

Hi, I have come across this issue where I am unable to capture any storybook. Please see the output below:

storycap --serverCmd "npx http-server storybook-static -p 9001" http://localhost:9001

Screen Shot 2021-10-05 at 18 32 07

Let me know if you need more info. Thank you 😄

manht1 avatar Oct 05 '21 11:10 manht1

Also got this one after adding storycap to the addons array

arikmaor avatar Jun 27 '22 17:06 arikmaor

yep, I'm same @arikmaor

keremciu avatar Jun 29 '22 12:06 keremciu

It happened to me with stories that were using queryparams addon. I removed it and it worked fine.

I still don't think the addon is the real problem, but if you're using it, removing may be a quick fix

arikmaor avatar Jun 30 '22 07:06 arikmaor

Hi, I also get the same error with my project. It does use MDX but I don't think that should be a problem.

I'm using:

[email protected]
[email protected]
storybook/[email protected]
storybook/[email protected]
storybook/[email protected]
storybook/[email protected]
storybook/[email protected]
storybook/[email protected]
storybook/[email protected]
storybook/[email protected]
[email protected]

and my MDX looks like a normal MDX. When running non-headless I get the following error after it looks at storybook for a second:

image

Nate-Wilkins avatar Feb 07 '23 07:02 Nate-Wilkins

This is also happening to me with [email protected] and [email protected] but only when I include storycap in config.addons in my main.js. I need it so I can set screenshot.clip for my test stories, that is, unless there is another way to crop the screenshots to just the content of the story (my screenshots all have an enormous amount of whitespace around them).

EDIT: Just figured out that I did not add the required bits to preview.js. After doing that, the timeouts were resolved.

lanceheld avatar Jun 16 '23 23:06 lanceheld