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

Adds test coverage for alpine linux #68

Closed
wants to merge 2 commits into from

Conversation

paulirish
Copy link
Member

(redoing this PR against the real upstream)

text from @danbopes:


I've gone ahead and added some alpine test coverage using travis-ci and docker to build an alpine image and test the run in there. It may need some tweaks/changes (chromium appears to be in /usr/lib/chrome, but it may not be functionality correctly), but this should be a good start to determine if this is working correctly.

See the following docker test:

See a sample build output of it failing here.

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again.

@danbopes
Copy link

danbopes commented Dec 8, 2017

I originally committed to his fork, and ultimately wanted him to integrate and continue testing in his environment (As there may have been some bugs with the travis build), to ultimately merge into your repo.

@samccone
Copy link
Contributor

samccone commented Apr 1, 2018

Spent some time digging into this one. Once I saw what tests were failing it became somewhat obvious that there was an issue with any of the tests that actually launch chrome:

  ChromeLauncher:error connect ECONNREFUSED 127.0.0.1:33563 +0ms
  ChromeLauncher:error Logging contents of /tmp/lighthouse.XocAHcn/chrome-err.log +2ms
  ChromeLauncher:error [131:131:0401/180724.977072:ERROR:browser_main_loop.cc(279)] Gtk: cannot open display: :99.0
  ChromeLauncher:error  +0ms

But this was not enough to identify the root issue. By connecting to the docker image and overwriting the entry point to /bin/bash I was able to run the tests and then dump out the error log from chrome:

[100:100:0401/181553.727881:FATAL:zygote_host_impl_linux.cc(107)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.m

So issue #25 strikes again!

@samccone
Copy link
Contributor

samccone commented Apr 1, 2018

After turning the flag off, and giving chrome enough time to launch we are greeted by another fun error message

Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted
[316:316:0401/182733.195220:FATAL:zygote_host_impl_linux.cc(182)] Check failed: ReceiveFixedMessage(fds[0], kZygoteBootMessage, sizeof(kZygoteBootMessage), &boot_pid).

This seems to be due to the fact that I did not run the container as --privileged
jessfraz/dockerfiles#65

Once I added that flag to my docker command I was presented with this remaining error
[67:67:0401/183329.379889:ERROR:browser_main_loop.cc(279)] Gtk: cannot open display: :99.0

Which looks to be due to the fact that I am running the docker image on my mac and am not correctly forwarding my X11 server into my docker image execution
https://www.thegeekstuff.com/2010/06/xhost-cannot-open-display/

@samccone
Copy link
Contributor

samccone commented Apr 1, 2018

Alright spent a few more hours on this, still unable to run this locally, and it is running partially on travis

#101

If any feels like picking this back up, please ping this PR and you can have at it.

Thanks

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 this pull request may close these issues.

None yet

4 participants