Open aolde opened 3 years ago
I'm able to replicate this in the examples/v6-managed-react
repo now.
What I have noticed is that when running Storycap in headless:false the disable-css-animation CSS is added to the document for the first variants but then it's skipped, so the spinner starts animating again.
To confirm this I added the disable-css-animation CSS to my projects code and then it runs through successfully. So I will use that as a workaround.
Command used:
cd storycap/examples/v6-managed-react
yarn storybook
npx storycap http://localhost:9008 --puppeteerLaunchConfig '{ "headless": false, "args": ["--no-sandbox", "--disable-setuid-sandbox", "--disable-dev-shm-usage"] }' -p 1 --include MyButton/*
Is there a better solution for that?
@aolde's workaround doesn't work for me BTW (disabling the transitions and animations that is)
any updates for this issue? it seems the skip
option is not working when this issue occurs, so you need to exclude the story to skip the screenshot
Hi, the similar issue occur using js animation like framer motion (which has no flag to disable all animations https://github.com/framer/motion/issues/1160).
If we have infinite animation it times out and can't skip with the skip
option.
I hope this issue moves forward...
This timeout issue also occurred to me. I don't think it matters whether it's simple mode or not. It seems like this problem occurs when there are animate tags in the story. I avoided the problem by deleting these tags after rendering. Like this (I'm using storybook with vue.)
export const Loading = {
render: (args: any) => ({
components: { Component },
setup() {
onMounted(() => {
// remove animate tags after rendering
for (const node of document.querySelectorAll('animate')) {
node?.remove();
}
},
template: `<Component v-bind="args" />`
}),
}
I'm trying to use the managed mode after having used the simple mode for a while. However when moving over to managed mode, stories that display looping animations fail to complete, with a timeout error. In simple mode it successfully record a screenshot.
I've tried to see if there is different logic or config between simple/managed mode but haven't found anything yet.
--disableCssAnimation
is turned on. Any idea where to look next?Example of how component looks:
Output in simple mode: