-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[Bug]: Regression in test-storybook after upgrading to 8.5.x: Axe is already running error #30385
Comments
** Disclaimer** This information might be inaccurate, due to it being generated automatically
|
I've resolved the issue "Axe is already running error" by enabling const preview: Preview = {
globals: {
a11y: {
manual: true
}
}
}; |
@andykenward Awesome, you're a lifesaver! I came across this in the docs but never got around to trying it. |
** Disclaimer** This information might be inaccurate, due to it being generated automatically
|
Even though the workaround is working, I still want to identify the root cause. Currently, the test is being run manually in the Storybook UI as well. |
We completely overhauled the a11y addon in 8.5 so it's quite possible that this is a regression. Do you have a reproduction repo you can share? |
There's a workaround here. Looking into whether there's a better fix |
Hi @akibarika, Thank you for reporting the issue! Can you please try out this canary release of the test runner? Related PR: storybookjs/test-runner#536 |
Hi @valentinpalkovic Thanks for the fix! Unfortunately, it still doesn’t work for me. The "page.evaluate: Error: Axe is already running." error only happens in the first two tests, but adding the following to const preview: Preview = {
initialGlobals: {
a11y: {
manual: true
}
}
}; Due to the size and complexity of my project (it's a mix with Nx monorepo), it's quite difficult for me to create a reproducible repo for you guys. I hope this helps with troubleshooting. |
|
That's correct. And because Storybook doesn't run axe automatically anymore it doesn't conflict with axe which is set up via the test-runner |
It is a workaround when using When running Perhaps it's an issue when using chromatic? |
Describe the bug
Summary
After upgrading to Storybook 8.5.1, I encountered an issue when running
yarn test-storybook
in combination with axe-playwright. Specifically, the test runner throws the following error:This issue occurs when running tests with
--maxWorkers=2
or higher. However, it works fine if I downgrade back to 8.4.7 or if I reduce the number of workers to--maxWorkers=1
in 8.5.1.Environment Details:
Storybook Version: 8.5.x
@storybook/test-runner
Version: Latest (installed alongside Storybook 8.5.1)Test Runner Command:
--maxWorkers
to 1 avoids the issue:Questions:
Was there a change in how
@storybook/test-runner
or Storybook 8.5.x handles parallel worker processes?Is there a way to ensure compatibility with
axe-playwright
when runningtest-storybook
with multiple workers?Are there any known workarounds or fixes to address this regression?
Reproduction link
no
Reproduction steps
I can reproduce this with this code
System
Additional context
This issue does not occur when using the Storybook dev server (
yarn storybook
) instead ofhttp-server
. The same test works fine when pointed tohttp://localhost:4400
(the Storybook dev server) with--maxWorkers=2
.I suspect this might be related to how lifecycle events are handled in
@storybook/test-runner
for static vs. dynamic Storybook builds in the 8.5.x release.Similar issue [Investigation]: Support React 19 #29805 (comment)
The text was updated successfully, but these errors were encountered: