Medium / phantomjs

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

github rate limiting #595

Closed juliangruber closed 8 years ago

juliangruber commented 8 years ago

I'm getting this error on travis:

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 requesting archive.
Status: 429
Request options: {
  "uri": "https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2",
  "encoding": null,
  "followRedirect": true,
  "headers": {
    "User-Agent": "npm/2.14.3 node/v3.3.1 linux x64"
  },
  "strictSSL": true
}
Response headers: {
  "server": "GitHub.com",
  "date": "Wed, 03 Aug 2016 17:17:41 GMT",
  "content-type": "text/html",
  "transfer-encoding": "chunked",
  "connection": "close",
  "status": "429 Too Many Requests",
  "retry-after": "120",
  "content-security-policy": "default-src 'none'; base-uri 'self'; block-all-mixed-content; child-src render.githubusercontent.com; connect-src 'self' uploads.github.com status.github.com api.github.com www.google-analytics.com github-cloud.s3.amazonaws.com; font-src assets-cdn.github.com; form-action 'self' github.com gist.github.com; frame-ancestors 'none'; frame-src render.githubusercontent.com; img-src 'self' data: assets-cdn.github.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com www.google-analytics.com collector.githubapp.com *.gravatar.com *.wp.com avatars0.githubusercontent.com avatars1.githubusercontent.com avatars2.githubusercontent.com avatars3.githubusercontent.com; media-src 'none'; object-src assets-cdn.github.com; plugin-types application/x-shockwave-flash; script-src assets-cdn.github.com; style-src 'unsafe-inline' assets-cdn.github.com",
  "strict-transport-security": "max-age=31536000; includeSubdomains; preload",
  "public-key-pins": "max-age=5184000; pin-sha256=\"WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18=\"; pin-sha256=\"RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho=\"; pin-sha256=\"k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws=\"; pin-sha256=\"K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q=\"; pin-sha256=\"IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4=\"; pin-sha256=\"iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0=\"; pin-sha256=\"LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A=\"; includeSubDomains",
  "x-content-type-options": "nosniff",
  "x-frame-options": "deny",
  "x-xss-protection": "1; mode=block",
  "x-github-request-id": "3400F07A:1A28:B4F46C9:57A22735"
}
Make sure your network and proxy settings are correct.

Do we have a backup download location that this could fall back to?

nicks commented 8 years ago

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

juliangruber commented 8 years ago

is it "safe" to use one of the other mirrors by default?

an automatic fallback seems like a more solid solution to me.

juliangruber commented 8 years ago

i'll work on a pull request in order to have better grounds for discussion

juliangruber commented 8 years ago

see https://github.com/Medium/phantomjs/pull/598