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

Travis builds fail sometimes because of PhantomJS #2898

Closed
matthew-dean opened this issue May 10, 2016 · 4 comments
Closed

Travis builds fail sometimes because of PhantomJS #2898

matthew-dean opened this issue May 10, 2016 · 4 comments
Labels

Comments

@matthew-dean
Copy link
Member

Putting this issue here for tracking.

Travis I think still has an outstanding issue where it's not able to install / run PhantomJS sometimes. (Maybe just for a certain Node version?) So you get PR fails when the code is fine, so it's been unfortunately unreliable lately, which is not great for checking compatibility of new code. I tried to tweak settings to get it to work, but it's not my area of expertise.

abrobston added a commit to abrobston/less.js that referenced this issue May 31, 2016
Addresses less#2898.  Instead of attempting a manual download of
PhantomJS, use the npm package phantomjs-prebuilt and the
environment variable `PHANTOMJS_CDNURL` as suggested in
the comment at
ariya/phantomjs#13953 (comment).
@abrobston
Copy link
Contributor

See #2905. The last CI build passed on Appveyor and on all but one Travis instance. The one that didn't pass was due to a transient connection error, it appears.

@bd82
Copy link
Contributor

bd82 commented Jul 27, 2016

I believe Travis's connection to the phantomjs mirror is getting throttled.
I've copied a workaround that uses Travis caching to avoid 99% of the downloads.
And also changed the download location back to the original bit bucket.

You can see it in #2941

The appveyor build still fails on node.js 0.10 and 0.12.
This is due to a separate issue with a race condition between the downloading of the dependencies from npm and the execution of the install script for phantomjs-prebuilt.
I managed to bypass it on Travis using a retry hack.
However, in appveyor the retry command does not seem to work...

I don't know how to solve the appveyor problem.
perhaps it is time to consider removing appveyor testing on node.js 0.10 and 0.12.
As those node versions only have two or four months respectability in the node.js Long Term support plan anyhow...

Some claim this problem appears and disappears randomly. Which make sense as it is a race condition... perhaps it will suddenly start working :)

The root problem is still unresolved here.
That is the dependency on external binaries which do not have sufficiently good hosting.

Perhaps the real solution would be to get rid of phantomjs usage all together.
But this will require a much greater change.
Because the plugin used for testing grunt-contrib-jasmine has absolutely no concept of separation of concerns unlike something like Karma
which allows usages of different browsers (including phantomjs) different testing libraries (mocha/jasmine/qunit) and different test reporters.

@bd82
Copy link
Contributor

bd82 commented Jul 28, 2016

I've managed to fix the race condition issue with running phantomjs-prebuilt's own install script
on appveyor as well.

#2941 now passes.

Please review and merge.

Keep in mind this does not fix all the build problems.
but should mitigate 99% of them (after one build succeeds on the default branch
and the phantomjs binaries will be successfully cached for future builds.

prowebcraft pushed a commit to prowebcraft/less.js that referenced this issue May 31, 2017
Addresses less#2898.  Instead of attempting a manual download of
PhantomJS, use the npm package phantomjs-prebuilt and the
environment variable `PHANTOMJS_CDNURL` as suggested in
the comment at
ariya/phantomjs#13953 (comment).
@stale
Copy link

stale bot commented Nov 14, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 14, 2017
@stale stale bot closed this as completed Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants