percy / percy-storybook

Percy's Storybook SDK.
https://docs.percy.io/docs/storybook
MIT License
149 stars 45 forks source link

Stories inconsistently fail to render during Percy tests #1008

Open stephiescastle opened 1 month ago

stephiescastle commented 1 month ago

The problem

Stories inconsistently fail during Percy tests due to "Unable to preload css for https://render.percy.local/{filename}.css"

Environment

Details

I'm getting flaky tests when using percy-storybook because the stories aren't rendering consistently, making the diff unhelpful.

Outside of Percy tests, the Storybook renders fine. In some builds, the stories will render successfully. In other builds (without having made any codebase changes), the stories will render an error:

"Unable to preload css for https://render.percy.local/{filename}.css"

image

All of the above is from running Percy in CI. I also tested running percy from my machine, and I get the same flaky results appearing in the snapshots uploaded from my computer.

Debug logs

I wasn't able to find any helpful info in the debugging logs, but here they are:

debuglog.txt

Code to reproduce issue

I haven't found a way to dependably reproduce this, as it always changes.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for more than 14 days with no activity. Remove stale label or comment or this will be closed in 14 days.

stephiescastle commented 1 month ago

Not stale.

vlad88vlad commented 2 weeks ago

I have the same issues after migration from Storybook 7 - Storybook 8 randomly, some stories fail

image image

After each build, the result is different

efleury1 commented 2 weeks ago

We've also been having similar issues across our team – very inconsistent, and rerunning the snapshot eventually works (without any code changes).

Happy to provide more information if needed!

image

loicplaire commented 1 week ago

We are experiencing the same issue after upgrading Storybook from 8.2.9 to 8.3.0.

2b6eb19e5884c6623be80b8895ec7eb8092b724cea3411ce9a3c41f223c0c5aa