loki: Failed fetching stories because the server is down - static storybook, Azure Devops, docker agent
I’m getting Failed fetching stories because the server is down with a static storybook build.
Basically, I’ve got this line in my package.json, which I run using npm run test:visual-static-storybook:
"test:visual-static-storybook": "loki --requireReference --verboseRenderer --reactUri file:$PWD/storybook-static --chromeFlags=\"--headless\"",
chromeFlags=\"--headless\""`
This is of course only runs after I do build-storybook.
Some extra data:
- This, surprisingly, works across two different developer environments (i.e. on our local Linux and Mac machines).
- Our CI is onAzure DevOps Pipelines, and utilizes a container using the default Microsoft VSTS Ubuntu 16.04 agent image (i.e. this one, and more specifically using the tag
ubuntu-16.04-docker-17.12.0-ce-standard).
Things I’ve tried:
- With/without
$PWDin thestorybookpath, i.e,file:./storybookandfile:$PWD/storybook. - With/without the
--headlessand--no-sandboxchrome flags. - Looking inside the agent running the build and ensuring that the storybook static folder exists and has the correct permissions.
- Making sure
storybookindeed fills up that folder.
Issues I’ve consulted: https://github.com/oblador/loki/issues/85 https://github.com/oblador/loki/issues/142 https://github.com/oblador/loki/issues/143
About this issue
- Original URL
- State: open
- Created 7 years ago
- Reactions: 5
- Comments: 15 (1 by maintainers)
I had the same error on GitLab CI with socket binding for dind. Inspired by the solution described here I finally managed to run Loki with built storybook, but unfortunately it wasn’t without patching Loki’s source code (by patch-package in
postinstallhook, but yarn2 has the same functionality from the box afaik). The solution is based on GitLab’s environment variables, and I’m not sure this can (or should) be transformed to something generic.The patch
No luck with that in Gitlab CI.
I have the same issue, and --chromeDockerWithoutSeccomp does not resolve it.