oblador / loki

👁 Visual Regression Testing for Storybook
https://loki.js.org/
MIT License
1.79k stars 173 forks source link

loki update: Cannot access the Story Store until the index is ready. #528

Open rhengles opened 1 month ago

rhengles commented 1 month ago

Just created a new SolidStart project from zero, added latest Storybook (8.3.5), tried to install and run Loki on it. But when running the command npx loki update, this was the output:

loki update v0.35.0
(node:16608) NOTE: The AWS SDK for JavaScript (v2) is in maintenance mode.
 SDK releases are limited to address critical bug fixes and security issues only.      

Please migrate your code to use AWS SDK for JavaScript (v3).
For more information, check the blog post at https://a.co/cUPnyil
(Use `node --trace-warnings ...` to show where the warning was created)
 FAIL  chrome.app
       Fetching stories
       SB_PREVIEW_API_0011 (StoryStoreAccessedBeforeInitializationError): Cannot access        the Story Store until the index is ready.
Some visual tests failed to run

Platform: Windows 10 Node v20.11.1

ghusse commented 1 month ago

I have the same error when running loki in CI with github actions:

yarn loki --requireReference --reactUri file:./storybook-static --chromeConcurrency=1

PASS chrome.docker/PREPARE
Waiting for 127.0.0.1:10098.
Connected!
PASS chrome.docker/START
FAIL chrome.docker/FETCH_STORIES: SB_PREVIEW_API_0011 (StoryStoreAccessedBeforeInitializationError): Cannot access the Story Store until the index is ready.
FAIL chrome.docker: Some tasks failed to run
ghusse commented 1 month ago

I looked at the code, and I suppose that the code that tests if a URL has been fully loaded is not working properly. If I increase the value of REQUEST_STABILIZATION_TIMEOUT to 5s I don't get the error anymore.