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

Timeout fail on CircleCI #94

Open
adekbadek opened this issue Jul 24, 2018 · 10 comments
Open

Timeout fail on CircleCI #94

adekbadek opened this issue Jul 24, 2018 · 10 comments

Comments

@adekbadek
Copy link

Hi, I have this error on CircleCI (locally everything is fine):

loki test v0.13.0
[14:48:46] Chrome (docker) [started]
[14:48:46] Prepare environment [started]
[14:48:52] Prepare environment [completed]
[14:48:52] Start [started]
[14:49:25] Start [failed]
[14:49:25] → Timeout
[14:49:25] Chrome (docker) [failed]
[14:49:25] → Timeout
Timeout
Error: Timeout

I increased the timeout in docker.js to 30000 as suggested in #38 but this did not fix the issue.

CircleCI is using circleci/ruby:2.5-node image.

Any tips on debugging this issue?

@adekbadek adekbadek changed the title Timeout fail for Chrome on CircleCi Timeout fail on CircleCI Jul 24, 2018
@oblador
Copy link
Owner

oblador commented Jul 24, 2018

Think this is related to #92 and #90

@jagregory
Copy link

I'm seeing the same issue with CircleCI. Could it be related to the way Docker networking is setup in Circle? https://circleci.com/docs/2.0/building-docker-images/#separation-of-environments That sounds suspiciously like Loki wouldn't be able to connect directly to the Chrome containers, right?

@dbartholomae
Copy link

I actually get the following error message:

[01:29:21] → Command failed: docker images -q yukinying/chrome-headless:63.0.3230.2
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Will investigate more.

@dbartholomae
Copy link

@oblador My naive approach would be to set up an additional target that doesn't spin up docker, but instead connects to a predefined docker container. This would require users that set up CircleCI to ensure the correct container is running and is reachable, but to be honest I don't see a good way to spin up the docker container from inside a CircleCI command. I'll experiment with this and hopefully provide a PR :)

@oblador
Copy link
Owner

oblador commented Dec 2, 2018

@dbartholomae Looking forward to it!

@dbartholomae
Copy link

@oblador I've played around with some concepts and in the end came up with the following thoughts:
Instead of having a separate target the original target needs to be able to switch over to using an already running Docker container. Otherwise the user of loki would need to run different target configs on CI and local, which is bound to lead some false positives in the tests.
Here's my current code:
https://github.com/dbartholomae/loki/tree/add_remote_chrome_target

It's not done yet, currently I'm stuck with two issues, one being that I cannot run it on windows because the Docker container cannot connect to the webserver running on host that has storybook in it. The other (and in my opinion more important) issue is that on Linux all screenshots are taken from the same page, so it seems the iframe isn't loaded correctly. I'll most likely continue working on this next weekend.

@sampaiodiego
Copy link

I was only able to run loki on CircleCI using an image with Chrome and node installed and then running loki on chrom.app instead of chrome.docker.

@kristof-mattei
Copy link
Contributor

#218 to wait little longer when loading storybooks seems to help A lot.

@ianhansborough
Copy link

I was only able to run loki on CircleCI using an image with Chrome and node installed and then running loki on chrom.app instead of chrome.docker.

Which image did you use for this? I had a similar thought, but I'm still seeing differences in ~20% of my screenshots.

@remleduff
Copy link
Contributor

This could potentially be fixed by #478

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

No branches or pull requests

8 participants