siddharthkp / lighthouse-ci

Trying to run lighthouse on travis-ci
https://travis-ci.org/siddharthkp/lighthouse-ci
MIT License
2 stars 0 forks source link

Matt! haaalp Matt! #1

Open siddharthkp opened 7 years ago

siddharthkp commented 7 years ago

Summoning @gauntface

In this repo, I am trying to use your lighthouse wrapper, saw it here: https://github.com/GoogleChrome/lighthouse/issues/1176.

But I get the same error 😢 connect ECONNREFUSED 127.0.0.1:9222

Here are the travis logs

I have spend waaaay too much time on this, but I don't know what to do.

gauntface commented 7 years ago

Where is the code that is using the wrapper? Are you calling downloadChrome followed by start before calling run?

siddharthkp commented 7 years ago

Thanks for looking at this!! ❤️

I am downloading + starting here but still getting the same error 😢 (just added that)

Here's the Travis logs

gauntface commented 7 years ago

Does it work locally? I.e. if you run the test script on your machine, the browser opens and runs lighthouse?

siddharthkp commented 7 years ago

Yep. It works locally.

gauntface commented 7 years ago

Only thing I can think of need to set up a virtual display:

before_script:
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start || echo \"Unable to start virtual display.\""
  - sleep 3 # give xvfb some time to start
siddharthkp commented 7 years ago

It worked! https://github.com/siddharthkp/lighthouse-ci/commit/75de4aa2f2354c28da3d89305d839077aa582b53

Thanks Matt!