-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
Failed to load stories in chrome.docker, loki version 0.32.0 #473
Comments
Yes, i got the same problem . Can you @jamiepenney elaborate your workaround on mac? |
Resolves oblador#473 Fixes an issue where the Chrome docker container cannot access Storybook running on the host machine via IP address, instead using the Docker `host.docker.internal` DNS entry to get access to it.
@huyit88 I've made a draft PR with my suggested changes. There's nothing you can do from a configuration perspective to fix it, but you could patch your local loki files in your node_modules in the mean time. The file is at |
Thank you. |
I'm trying for a while to run Loki with Trying to run it using So here's my question, @oblador, is still the intention for #474 to be merged? It's been there for a while, and if there's something needed of contribution I would be glad to contribute to this repository so that PR got merged. |
Resolves oblador#473 Fixes an issue where the Chrome docker container cannot access Storybook running on the host machine via IP address, instead using the Docker `host.docker.internal` DNS entry to get access to it.
I'm experiencing this same issue and updating these lines of code worked for me locally also. |
Hello everybody) Maybe someone connected story book 8 to loki and, accordingly, to ci/cd ?
module.exports = { run-loki: |
Bumping the question. |
Resolves oblador#473 Fixes an issue where the Chrome docker container cannot access Storybook running on the host machine via IP address, instead using the Docker `host.docker.internal` DNS entry to get access to it.
@Vorbert-Kruk I pushed up the PR initially but PR build actions require a maintainer to run, the feedback loop to get the PR building was too long so I left it hoping the maintainers would take the fix and run with it. I'll have another crack at it now, hopefully it doesn't need any other changes |
@jamiepenney Thanks for sharing how to process is looking. As maintainer still would be necessary for pushing this code further (they approval is necessary), I'll try to notify them under #474. |
While running this command to update my local reference images:
yarn build:storybook --quiet && loki update --requireReference --reactUri file:./storybook-static --chromeDockerImage yukinying/chrome-headless-browser-stable:latest
I'm getting the following error:
I have nailed this down to the chrome docker image not being able to access Storybook running on my host machine. I'm running this on an M1 Macbook running Docker Desktop 4.22.0, and if I enter the docker image while it is running then I can see that it is unable to access the host by running
wget http://192.168.1.131:49399
. If I access that URL locally, Storybook is successfully running on it.If I manually edit the IP detection code on this line https://github.com/oblador/loki/blob/master/packages/target-chrome-docker/src/create-chrome-docker-target.js#L70 to instead always use
host.docker.internal
as the IP, then everything works correctly.Is there a reason not to use
host.docker.internal
as the local IP address by default? An earlier commit added the docker argument required to ensure this works correctly on Linux:--add-host=host.docker.internal:host-gateway
.I'm not sure of the broader implications of this change. There doesn't appear to be any way to override the IP address when you are using the static Storybook build option, but I could add one if you think it's too risky to use
host.docker.internal
by default.The text was updated successfully, but these errors were encountered: