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

Cannot call extract() unless you call cacheAllCSFFiles() first #436

Closed
p3k opened this issue Feb 15, 2023 · 9 comments · Fixed by #454
Closed

Cannot call extract() unless you call cacheAllCSFFiles() first #436

p3k opened this issue Feb 15, 2023 · 9 comments · Fixed by #454

Comments

@p3k
Copy link

p3k commented Feb 15, 2023

I am getting this error when I run loki test with the storyStoreV7 feature being enabled in the Storybook configuration.

There is a corresponding issue in Storybook’s issue tracker: nuxt-modules/storybook#374

It seems to need a fix in application code, e.g. reg-viz/storycap#594

@AleksRap
Copy link

AleksRap commented Mar 9, 2023

Hi. I have the same problem. I tried to run loki using docker with image yukinying/chrome-headless-browser:90.0.4408.0

@AleksRap
Copy link

AleksRap commented Mar 9, 2023

I solved this problem like this:

Go to the @loki/browser library. Find a file get-stories.js . You need to make the getStories function async and add a line await window.__STORYBOOK_CLIENT_API__.storyStore.cache all CSV files(); before return

image

But my tests failed with error "Timeout after 10000ms"

image

UPDATE: ✅ problem with timeout solved. You need to change "chromeSelector" from "#root > *" to "#storybook-root > *"

@trunneml
Copy link

@AleksRap thanks your changes worked for me

@pavmax
Copy link

pavmax commented Apr 15, 2023

Had the same issue, fixed with @AleksRap changes.
I think these changes should be integrated in the library.

@HoneyQumo
Copy link

@AleksRap you are the best, it helped me a lot!

@HoneyQumo
Copy link

@AleksRap How can this be used for CI?

@ArthurGoupil
Copy link

Setting

  features: {
    storyStoreV7: false,
  }

in Storybook main.js
and "chromeSelector": "#storybook-root > *", in Loki config fixed everything for me, thanks @AleksRap !

@oblador
Copy link
Owner

oblador commented May 7, 2023

Fixed in 0.31.2 👍

@ArthurGoupil
Copy link

It works without the "chromeSelector": "#storybook-root > *" hack in 0.31.2 but I get a Template is undefined when running with storyStoreV7 feature enabled.

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

Successfully merging a pull request may close this issue.

7 participants