Closed ai closed 5 years ago
@ai Yep
Without addons
-> chrome: stable
i have got an error on Travis CI:
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
I was trying to fix this yesterday. But i didn't find reason of this error.
addons
was workaround for this situation.
Seems like tests which runs chrome are not finishing correctly on Travis CI.
It will be very hard for me to force every user to add addons: chrome
to Travis CI. Also, many other CIs doesn’t have simple addons
config.
Maybe @aslushnikov know why find_chrome
script can freeze on CIs?
@ai find_chrome
works as expected.
You can see result of this script at line 469
@mbalabash but how find_chrome
works if there is no chrome (as we have on CI without addon)
@ai postinstall npm script starts find_chrome
which will download chrome if can't find it.
Then it prints chrome location to stdout and save path in file (we can see at line 469).
My guess is something do wrong when we launch puppeteer.
@ai Oops No, i'm was wrong. In situation which i described above. Chrome location should be in another place.
Update: Default Travis CI image without addons: chrome
has local version of google-chrome-stable
(L469)
@ai Is it possible for you to check Size Limit on another CI?
It might be only Travis CI issue. In docker i also can't reproduce this error.
-- I'm continuing research this situation with Travis CI to find out why this happens.
Sorry, in the next few hours I will not be able to test non-Travis CI. Anyway, it is better to add another CIs to your project since your tests are smaller.
@ai
Updates:
1) Seems like Travis CI in builds without chrome, anyway adds chrome but without execution privileges.
2) I'm removed from docker file any directives for chrome setup. Then we can test findChrome
script in wild environment.
3) Also i fixed bug in findChrome
script for linux env.
4) Circle CI and docker throws same error related to chrome:
{
message: `Failed to launch chrome!
/home/circleci/estimo/temp/chrome/linux-669486/chrome-linux/chrome: error while loading shared libraries: libXtst.so.6: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
`,
}
5) Travis CI still fails builds by timeout (see 1st point)
@aslushnikov Hello
Seems like we need to set up some libs for launching chrome without errors.
Is it possible to use findChrome
without any pre installed packages?
or install them and all required steps with chrome by puppeteer?
Can you help with this error?
{
message: `Failed to launch chrome!
/home/circleci/estimo/temp/chrome/linux-669486/chrome-linux/chrome: error while loading shared libraries: libXtst.so.6: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
`,
}
@mbalabash let’s just download Chrome on any findChrome
issue. We do not need to have 100% sure answer.
@mbalabash can we fix the problem if we will download Chrome on findChrome
errors?
@ai
@mbalabash can we fix the problem if we will download Chrome on
findChrome
errors?
Oh, i think we can't.
For TravisCI findChrome
doesn't throw any error.
And i found a lot of issues with Puppeteer
on TravisCI. All fixes require changes in .travis.yml
For instance:
1
2
3
For CircleCI / docker findChrome
works correctly and will install chrome.
But chrome can't start without some libs. And we also need to declare those libs in ci config.
Common issues:
1
2
3
@mbalabash why do we need these changes for .travis.yml
now and we didn’t require it for old versions without findChrome
?
@ai because now we use puppeteer-core
and installing chrome when it wasn't located locally.
Situation for Travis CI and Docker / Circle CI are different. And for both of them we need some solution. Without it chrome not working correctly (see this).
I can switch back to puppeteer
while acceptable solution for using puppeteer-core
doesn't exist.
Is it have sense for you @ai ?
because now we use puppeteer-core and installing chrome when it wasn't located locally.
Previous Estimo < 1.0 installed Chrome too without .travis.yml
changes.
Why Chrome installing process in puppeter
and puppeter-core
is different?
Few ideas:
puppeter-core
downloads Chrome in a different way? Do we download it in our findChrome
or use it from puppeter-core
?We can ask Puppeter’s team or I can send help from Cult of Martians.
(Sorry for bothering you, a lot of users push me for long npm install
for Size Limit, but I can’t broke Travis CI in the release :( )
@ai
findChrome
uses createBrowserFetcher
from puppeter-core
.Maybe @aslushnikov can help with this?
(Sorry for delay and slow response speed. Belarus accept new law and now i have some issue with Belarusian army. I'm trying to fix it right now. But now and on next week i can't spend a lot of time for open source 🙁).
Maybe Cult of Martians it's a good idea.
Folks,
If I read the discussion correctly, then manually downloading chrome into Travis is not enough to make it runnable.
This is most likely because default travis env does not include chromium dependencies. I'd speculate that Travis's "chrome" addon installs all of these.
@aslushnikov by some reason previous version works on Travis without any changes. Seems like puppeter
has fixes missed in puppeter-core
. Do you have any ideas how it may work?
Seems like puppeter has fixes missed in puppeter-core
The only difference between puppeteer
and puppeteer-core
is that Puppeteer runs install.js
during its installation.
Ah, also puppeteer
respects PUPPETEER_* env variables, whereas puppeteer-core
ignores them all.
Very strange. Maybe Travis already has some environment variables to fix Chrome?
Or maybe we use different build out different versions in the Puppeter Core and Puppeteer?
Made few researchs.
estimo
from master
and addons: chrome
: error
estimo
from master
without addons: chrome
: error
Even without addons: chrome
findChome.js
by some reason find Chrome at /usr/bin/google-chrome-stable
.
The same problem in estimo
Travis CI: https://travis-ci.org/mbalabash/estimo/jobs/549648463#L470
findChome.js
found local Chrome and did not download it.
Seems like we have a problem for Chome detection
@ai
This fixed in version estimo@1.1.0 (thanks @creazero !) Security alerts fixed in estimo@1.1.1.
I very like new features from Estimo 1.0. I already tried to use it in Size Limit https://github.com/ai/size-limit/commit/89b59df42d19fb88a8f440649ba4f5bf97c4a469
Unfortunately, I found an issue. On CI without Chrome estimo freezes (have no result for 20 seconds) https://travis-ci.org/ai/size-limit/jobs/547958183
My suggestions:
matrix
to useaddons
only in one case.