graingert / slimerjs

NPM wrapper for installing phantomjs
Other
29 stars 9 forks source link

npm install slimerjs@0.9.6 fails on download #39

Closed dzwarg closed 8 years ago

dzwarg commented 8 years ago

Hello,

We have an issue where slimerjs@0.9.6 is a dependency in our build chain, and yesterday our builds stopped running with the following error:

npm install slimerjs@0.9.6
npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm

> slimerjs@0.9.6 install /node_modules/slimerjs
> node install.js

Downloading http://download.slimerjs.org/releases/0.9.6/slimerjs-0.9.6-linux-x86_64.tar.bz2
Saving to /node_modules/slimerjs/slimerjs/slimerjs-0.9.6-linux-x86_64.tar.bz2
Receiving...
Error requesting archive.
Status: 403
Request options: {
  "protocol": "http:",
  "slashes": true,
  "auth": null,
  "host": "download.slimerjs.org",
  "port": null,
  "hostname": "download.slimerjs.org",
  "hash": null,
  "search": null,
  "query": null,
  "pathname": "/releases/0.9.6/slimerjs-0.9.6-linux-x86_64.tar.bz2",
  "path": "/releases/0.9.6/slimerjs-0.9.6-linux-x86_64.tar.bz2",
  "href": "http://download.slimerjs.org/releases/0.9.6/slimerjs-0.9.6-linux-x86_64.tar.bz2"
}
Response headers: {
  "date": "Wed, 08 Jun 2016 11:12:54 GMT",
  "server": "Apache/2.2.22 (Debian)",
  "vary": "Accept-Encoding",
  "content-length": "252",
  "connection": "close",
  "content-type": "text/html; charset=iso-8859-1"
}
Make sure your network and proxy settings are correct.
npm ERR! Linux 3.13.0-83-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "slimerjs@0.9.6"
npm ERR! node v0.12.9
npm ERR! npm  v2.14.9
npm ERR! code ELIFECYCLE

npm ERR! slimerjs@0.9.6 install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the slimerjs@0.9.6 install script 'node install.js'.
npm ERR! This is most likely a problem with the slimerjs 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 their info via:
npm ERR!     npm owner ls slimerjs
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /npm-debug.log

(node 0.12.9 on centos 7)

The download url (http://download.slimerjs.org/releases/0.9.6/slimerjs-0.9.6-linux-x86_64.tar.bz2) can be downloaded via a web browser, is there any other reason why suddenly this URL is returning an HTTP 403 error?

Thanks!

graingert commented 8 years ago

0.9.6 is not supported

graingert commented 8 years ago

please switch to 0.906.1

dzwarg commented 8 years ago

Thank you, I have a dependency on grunt-casper, which is set to version 0.9.6. I will notify that maintainer.

dzwarg commented 8 years ago

This may be completely obvious to someone developing in node, but I'm explicitly specifying the package version during npm install, but it keeps falling back to 0.9.6. Any idea why?

Here is the log output of the downstream project: https://travis-ci.org/dzwarg/grunt-casper/jobs/136161732

The relevant portions are here:

> slimerjs@0.906.1 install /home/travis/.nvm/v0.10.45/lib/node_modules/slimerjs
> node install.js
Looks like an `npm install -g`; unable to check for already installed version.
Downloading https://download.slimerjs.org/releases/0.9.6/slimerjs-0.9.6-linux-x86_64.tar.bz2
Saving to /tmp/slimerjs/slimerjs-0.9.6-linux-x86_64.tar.bz2
Receiving...
Error requesting archive.
Status: 403
Request options: {
  "uri": "https://download.slimerjs.org/releases/0.9.6/slimerjs-0.9.6-linux-x86_64.tar.bz2",
  "encoding": null,
  "followRedirect": true,
  "headers": {
    "User-Agent": "npm/3.9.5 node/v0.10.45 linux x64"
  },
  "strictSSL": true
}
Response headers: {
  "date": "Wed, 08 Jun 2016 14:10:38 GMT",
  "server": "Apache/2.2.22 (Debian)",
  "strict-transport-security": "max-age=15768000",
  "vary": "Accept-Encoding",
  "content-length": "252",
  "keep-alive": "timeout=5, max=100",
  "connection": "Keep-Alive",
  "content-type": "text/html; charset=iso-8859-1"
}
Make sure your network and proxy settings are correct.
If you continue to have issues, please report this full log at https://github.com/graingert/slimerjs
graingert commented 8 years ago

@laurentj is your CDN blocking Travis CI?

benoitMariaux commented 8 years ago

I have exactly the same on an AWS EC2, Ubuntu 14.04, only for few days.

KevinGrandon commented 8 years ago

Sadly, I believe this is due to the authors decision to discontinue support for AWS. See: https://twitter.com/slimerjs/status/740123826969837568?lang=en

I think the proper fix here would be to build and package slimerjs with this npm package if possible.

benoitMariaux commented 8 years ago

Ok, too bad! Thank you

graingert commented 8 years ago

Sigh I'll switch the URLs to github On 8 Jun 2016 10:59 pm, "Benoît Mariaux" notifications@github.com wrote:

Ok, too bad! Thank you

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/graingert/slimerjs/issues/39#issuecomment-224742829, or mute the thread https://github.com/notifications/unsubscribe/AAZQTI7_A31V2llKPogjfB0yxVXyG9Xfks5qJztOgaJpZM4Iw3Jl .

laurentj commented 8 years ago

Yes, I blocked AWS. Sorry for that, but I have no choice for the moment.

For details: https://groups.google.com/forum/#!topic/slimerjs/nIi0ZqSNzBs

Using the github archive only move the problem elsewhere (here at github home, even if they have much more bandwidth than I have :-) ). Travis-ci and any CI that cannot store permanently and locally needed packages are not a good CI tool IMHO. (in term of security, bandwidth, tests speed, resilience, reliability etc). They are just generators of huge waste of resources.

graingert commented 8 years ago

@laurentj Amazon-Amazon networking is free. In terms of security this package checks the hash of the downloaded file.

KevinGrandon commented 8 years ago

Using the github archive only move the problem elsewhere

I think that's fine because github and npm have the necessary bandwidth and employee resources to handle it.

Also tools like NPM caches or registries exist which can cache the package and offload traffic from github/npm if necessary.

laurentj commented 8 years ago

@KevinGrandon in a travis-ci instance, I don't think there is an NPM cache, as the instance is recreated each time you want to launch tests (so NPM cache does not exist any more when the instance is flushed). Except probably when you use the docker base instances.

KevinGrandon commented 8 years ago

True, but there are ways to cache if needed and people can do that to speed up their tests. Regardless, you should look at offloading the bandwidth onto people who can handle it (npm/github probably) when there are massive requests for the library.

laurentj commented 8 years ago

I just learn that we can cache some directories in Travis-ci. So when a software is downloaded, you can store it in a directory that you declare as cache.

graingert commented 8 years ago

Give 0.906.2 a try.