Medium / phantomjs

NPM wrapper for installing phantomjs
Other
1.42k stars 435 forks source link

installing phantomjs-prebuilt in docker container fails silently #674

Closed d-sko closed 7 years ago

d-sko commented 7 years ago

I've searched a lot now but I can't get it to work:

Running npm install in a node:6 container in GitLab CI always silently fails on node install. I've seen lots of other issues around the web where it just says anything useful but here... nothing, even if I'm running npm install -ddd, this is all I get:

npm info lifecycle phantomjs-prebuilt@2.1.14~install: phantomjs-prebuilt@2.1.14

> phantomjs-prebuilt@2.1.14 install /some/path/node_modules/phantomjs-prebuilt
> node install.js

ERROR: Job failed: exit code 1

I've tried

I'm not sure what´s going on here. Has anyone an idea or got it working in GitLab CI with docker?

Aradesh commented 7 years ago

Same problem with receiving phantomjs

PhantomJS not found on PATH Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2 Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 Receiving... Error making request. Error: connect ETIMEDOUT 52.216.226.112:443

iamchriswick commented 7 years ago

7:14:00 PM:

phantomjs-prebuilt@2.1.14 install /opt/build/repo/node_modules/phantomjs-prebuilt node install.js

7:14:00 PM: PhantomJS not found on PATH 7:14:00 PM: Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2 Saving to /opt/buildhome/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 7:14:00 PM: Receiving... 7:16:07 PM: 7:16:08 PM: Error making request. Error: connect ETIMEDOUT 54.231.98.192:443 at Object.exports._errnoException (util.js:1022:11) at exports._exceptionWithHostPort (util.js:1045:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14)

Please report this full log at https://github.com/Medium/phantomjs

7:16:11 PM: npm 7:16:11 PM: ERR! 7:16:11 PM: Linux 3.19.0-66-generic 7:16:11 PM: npm 7:16:11 PM: ERR! 7:16:11 PM: argv 7:16:11 PM: "/opt/buildhome/.nvm/versions/node/v6.10.0/bin/node" "/opt/buildhome/.nvm/versions/node/v6.10.0/bin/npm" "install" 7:16:11 PM: npm ERR! 7:16:11 PM: node 7:16:11 PM: v6.10.0 7:16:11 PM: npm 7:16:11 PM: ERR! 7:16:11 PM: 7:16:11 PM: Error running command: Build script returned non-zero exit code: 1 7:16:11 PM: npm v3.10.10 7:16:11 PM: npm 7:16:11 PM: Error running command: Build script returned non-zero exit code: 1 7:16:11 PM: ERR! 7:16:11 PM: code 7:16:12 PM: ELIFECYCLE

7:16:12 PM: npm 7:16:12 PM: ERR! 7:16:12 PM: phantomjs-prebuilt@2.1.14 install: node install.js npm 7:16:12 PM: ERR! Exit status 1 7:16:12 PM: npm ERR! npm 7:16:12 PM: ERR! Failed at the phantomjs-prebuilt@2.1.14 install script 'node install.js'. npm 7:16:12 PM: Finished processing build request 7:16:12 PM: ERR! 7:16:12 PM: Make sure you have the latest version of node.js and npm installed. npm 7:16:12 PM: 7:16:12 PM: ERR! If you do, this is most likely a problem with the phantomjs-prebuilt package, npm 7:16:12 PM: ERR! not with npm itself. 7:16:12 PM: npm 7:16:12 PM: ERR! 7:16:12 PM: Tell the author that this fails on your system: npm 7:16:12 PM: ERR! 7:16:12 PM: node install.js 7:16:12 PM: npm 7:16:12 PM: ERR! You can get information on how to open an issue for this project with: npm 7:16:13 PM: ERR! npm bugs phantomjs-prebuilt 7:16:13 PM: npm ERR! 7:16:13 PM: Or if that isn't available, you can get their info via: npm 7:16:13 PM: ERR! npm owner ls phantomjs-prebuilt npm 7:16:13 PM: ERR! There is likely additional logging output above. 7:16:13 PM: 7:16:13 PM: npm 7:16:13 PM: ERR! Please include the following file with any support request: 7:16:13 PM: npm ERR! /opt/build/repo/npm-debug.log 7:16:13 PM: Error during NPM install

ADnooji commented 7 years ago

Having the same issue when trying to do a Docker build on a remote server

It looks like this link is down, since it just times out if you go to it: https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2

phantomjs-prebuilt@2.1.14 install /home/server/node_modules/phantomjs-prebuilt node install.js

PhantomJS not found on PATH Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2 Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 Receiving...

Error making request. Error: connect ETIMEDOUT 54.231.72.91:443 at Object.exports._errnoException (util.js:1022:11) at exports._exceptionWithHostPort (util.js:1045:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14)

Please report this full log at https://github.com/Medium/phantomjs npm ERR! Linux 4.4.0-59-generic npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "phantomjs-prebuilt" npm ERR! node v6.9.4 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE

npm ERR! phantomjs-prebuilt@2.1.14 install: node install.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the phantomjs-prebuilt@2.1.14 install script 'node install.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the phantomjs-prebuilt package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node install.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs phantomjs-prebuilt npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls phantomjs-prebuilt npm ERR! There is likely additional logging output above.

chrisrink commented 7 years ago

I think the issue here is that the download is missing. The following url hangs.

https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2

For us we are using the https://github.com/karma-runner/karma-phantomjs-launcher plugin to install phantom for us and its pointing at this version. Is there anyway we can add this download back or is there a workaround that could be supplied like updating versions?

onlyurei commented 7 years ago

Looks like it's affected by Amazon S3 service outage.

https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2

points to:

https://github-cloud.s3.amazonaws.com/releases/5755891/d55faeca-f27c-11e5-84be-6e92fb868e05.bz2?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20170228%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170228T183654Z&X-Amz-Expires=300&X-Amz-Signature=7b0260a6cca856a4a05eb8f5f5af32c9df5165abdd9d59a7f47095dcf5969c3d&X-Amz-SignedHeaders=host&actor_id=93347&response-content-disposition=attachment%3B%20filename%3Dphantomjs-2.1.1-linux-x86_64.tar.bz2&response-content-type=application%2Foctet-stream

https://status.aws.amazon.com/

Increased Error Rates

We've identified the issue as high error rates with S3 in US-EAST-1, which is also impacting applications and services dependent on S3. We are actively working on remediating the issue.

Affecting other services depending on it too, e.g.: http://venturebeat.com/2017/02/28/aws-is-investigating-s3-issues-affecting-quora-slack-trello/ https://www.theregister.co.uk/2017/02/28/aws_is_awol_as_s3_goes_haywire/ https://twitter.com/ZendeskOps/status/836643360274280448

chrisrink commented 7 years ago

Looks like the mirror(https://cnpmjs.org/downloads) is still up. So you can configure using a different release url with the following docs:

https://github.com/Medium/phantomjs#deciding-where-to-get-phantomjs

iarindam commented 7 years ago

Hi,

Any update on Amazon S3 service outage? We got stuck with SPFx implementation which depends on phantomjs-prebuilt.

iarindam commented 7 years ago

Hi,

If I am not wrong "https://bitbucket.org/ariya/phantomjs/downloads" url throwing the same error.

thanks

Fedreg commented 7 years ago

any luck installing yet?

diegoconcha commented 7 years ago

I create an .npmrc in my root project folder and added this to it: phantomjs_cdnurl=https://cnpmjs.org/downloads

Thanks @chrisrink for the working cdn url!

Now phantomjs installs fine via npm.

Obviously this is a temp fix until AWS get's back to normal.

laughnan commented 7 years ago

@diegoconcha that worked for me too. 👏

d-sko commented 7 years ago

Wow, just some hours offline and so many answers, thanks!

@chrisrink it's installed through karma-phantomjs-launcher in my project, too

@chrisrink @diegoconcha I'll try the workaround with the cdn-url, thanks!

d-sko commented 7 years ago

Tested and working, thanks again 👍 , so I suppose it's ok to close here?

woozhijun commented 5 years ago

RUN PHANTOMJS_CDNURL=https://npm.taobao.org/mirrors/phantomjs/ npm install phantomjs-prebuilt