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

Install of PhantomJS fails on CI quite often lately #1103

Closed
diraulo opened this issue Jun 13, 2016 · 8 comments
Closed

Install of PhantomJS fails on CI quite often lately #1103

diraulo opened this issue Jun 13, 2016 · 8 comments
Assignees

Comments

@diraulo
Copy link
Member

diraulo commented Jun 13, 2016

Lately, we've experienced lots of build failure as a result of PhantomJS failing to install.

Semaphore already supports PhantomJS. We just need to specify which version to use.
https://semaphoreci.com/docs/phantomjs.html

I understand that in order to simplify install process for new devs on the project, we added the phantomjs gem which then downloads and install PhantomJS on the system. How about removing that and updating docs with instructions to install PhantomJS manually? It's not convenient to have to restart the build on CI every time because of that.

@diraulo diraulo self-assigned this Jun 16, 2016
@diraulo
Copy link
Member Author

diraulo commented Jun 16, 2016

Phantomjs does not appear to be installed in /home/runner/.phantomjs/2.1.1/x86_64-linux/bin/phantomjs, installing!
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

  0     0    0   333    0     0    440      0 --:--:-- --:--:-- --:--:--   440
bunzip2: phantomjs-2.1.1-linux-x86_64.tar.bz2 is not a bzip2 file.
tar: phantomjs-2.1.1-linux-x86_64.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
rake aborted!
Bundler::GemRequireError: There was an error while trying to load the gem 'phantomjs/poltergeist'.
/home/runner/WebsiteOne/config/application.rb:7:in `<top (required)>'
/home/runner/WebsiteOne/Rakefile:4:in `require'
/home/runner/WebsiteOne/Rakefile:4:in `<top (required)>'
TypeError: no implicit conversion of nil into String
/home/runner/WebsiteOne/vendor/bundle/ruby/2.3.0/gems/phantomjs-2.1.1.0/lib/phantomjs/platform.rb:72:in `block in install!'
/home/runner/WebsiteOne/vendor/bundle/ruby/2.3.0/gems/phantomjs-2.1.1.0/lib/phantomjs/platform.rb:53:in `chdir'
/home/runner/WebsiteOne/vendor/bundle/ruby/2.3.0/gems/phantomjs-2.1.1.0/lib/phantomjs/platform.rb:53:in `install!'
/home/runner/WebsiteOne/vendor/bundle/ruby/2.3.0/gems/phantomjs-2.1.1.0/lib/phantomjs/platform.rb:86:in `ensure_installed!'
/home/runner/WebsiteOne/vendor/bundle/ruby/2.3.0/gems/phantomjs-2.1.1.0/lib/phantomjs.rb:30:in `platform'
/home/runner/WebsiteOne/vendor/bundle/ruby/2.3.0/gems/phantomjs-2.1.1.0/lib/phantomjs.rb:25:in `path'
/home/runner/WebsiteOne/vendor/bundle/ruby/2.3.0/gems/phantomjs-2.1.1.0/lib/phantomjs/poltergeist.rb:10:in `<top (required)>'
/home/runner/WebsiteOne/config/application.rb:7:in `<top (required)>'
/home/runner/WebsiteOne/Rakefile:4:in `require'
/home/runner/WebsiteOne/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)

@tansaku tansaku added the ready label Jun 24, 2016
@tansaku
Copy link
Contributor

tansaku commented Jun 28, 2016

this is a real pain - would be good to have a comprehensive solution

@tansaku
Copy link
Contributor

tansaku commented Jun 29, 2016

let's try removing the gem and see what happens ...

@tansaku
Copy link
Contributor

tansaku commented Jul 4, 2016

@diraulo rather than immediately pulling out the gem I've investigated if others have encountered the issue, and it seems they have - I've also open a support ticket with Semaphore:

we're having occasional trouble with what seems like a faulty download? #1103

it all works fine on a second or third try - I'm guessing that maybe the download of phantomjs-2.1.1-linux-x86_64.tar.bz2 is failing - we're looking at alternatives to the gem that requires this download, but is there anything about sempahore we could change to help?

@tansaku
Copy link
Contributor

tansaku commented Jul 4, 2016

they just replied:

Thanks for getting in touch!

As Semaphore platform has PhantomJS 2.1.1 included, I would like to suggest adding the following command to the setup thread
change-phantomjs-version 2.1.1
because the default PhantomJS version is 1.9.8.
Afterwards, please expire project's dependency cache by visiting the Admin tab in the Project Settings [Expire Dependency Cache].

Let me know how things go!

@tansaku
Copy link
Contributor

tansaku commented Jul 4, 2016

I just changed like so:

@tansaku
Copy link
Contributor

tansaku commented Jul 4, 2016

just moved that to first in the setup and ran a test build on develop, which worked - will re-run a few times to see if this addresses the issue

@tansaku
Copy link
Contributor

tansaku commented Jul 4, 2016

@diraulo so this might be fixed then?

@tansaku tansaku closed this as completed Jul 5, 2016
@tansaku tansaku removed the ready label Jul 5, 2016
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

2 participants