Skip to content
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

Stories inconsistently fail to render during Percy tests #1008

Open
stephiescastle opened this issue Jul 31, 2024 · 5 comments
Open

Stories inconsistently fail to render during Percy tests #1008

stephiescastle opened this issue Jul 31, 2024 · 5 comments

Comments

@stephiescastle
Copy link

stephiescastle commented Jul 31, 2024

The problem

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

Environment

  • Node version: v20.15.1
  • @percy/cli version: 1.28.7
  • Version of Percy SDK you’re using: 6.0.0
  • If needed, a build or snapshot ID: Build log ID: 35639618_build_35639618_cli_6bb4b8ba0910710ed1d349400f85171727f42541
  • OS version: macOS Sonoma 14.5
  • Type of shell command-line [interface]:

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.

@stephiescastle stephiescastle changed the title Stories inconsistently fail during Percy tests due Stories inconsistently fail to render during Percy tests Jul 31, 2024
Copy link

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.

@github-actions github-actions bot added the 🍞 stale Closed due to inactivity label Aug 20, 2024
@stephiescastle
Copy link
Author

Not stale.

@github-actions github-actions bot removed the 🍞 stale Closed due to inactivity label Aug 27, 2024
@vlad88vlad
Copy link

vlad88vlad commented Sep 9, 2024

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
Copy link

efleury1 commented Sep 10, 2024

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
Copy link

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

2b6eb19e5884c6623be80b8895ec7eb8092b724cea3411ce9a3c41f223c0c5aa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants