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 a custom version of PhantomJS... 403 Forbidden #120

Closed
simeonwillbanks opened this issue Nov 14, 2016 · 4 comments
Closed

Install a custom version of PhantomJS... 403 Forbidden #120

simeonwillbanks opened this issue Nov 14, 2016 · 4 comments

Comments

@simeonwillbanks
Copy link

The PhantomJS custom version install script is failing with the default PHANTOMJS_HOST environment variable which is set to https://bitbucket.org/ariya/phantomjs/downloads.

https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 302/redirects to S3 with an expiration token, but the expiration token is already expired once the build sends the request.

--2016-11-14 14:19:33--  https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
Resolving bitbucket.org (bitbucket.org)... 104.192.143.2, 104.192.143.3, 104.192.143.1, ...
Connecting to bitbucket.org (bitbucket.org)|104.192.143.2|:443... connected.
HTTP request sent, awaiting response... 302 FOUND
Location: https://bbuseruploads.s3.amazonaws.com/fd96ed93-2b32-46a7-9d2b-ecbc0988516a/downloads/396e7977-71fd-4592-8723-495ca4cfa7cc/phantomjs-2.1.1-linux-x86_64.tar.bz2?Signature=8XR8YEDFFVowjdT7Ry3S2ZubZ3Y%3D&Expires=1479132825&AWSAccessKeyId=AKIAIVFPT2YJYYZY3H4A&versionId=null&response-content-disposition=attachment%3B%20filename%3D%22phantomjs-2.1.1-linux-x86_64.tar.bz2%22 [following]
--2016-11-14 14:19:33--  https://bbuseruploads.s3.amazonaws.com/fd96ed93-2b32-46a7-9d2b-ecbc0988516a/downloads/396e7977-71fd-4592-8723-495ca4cfa7cc/phantomjs-2.1.1-linux-x86_64.tar.bz2?Signature=8XR8YEDFFVowjdT7Ry3S2ZubZ3Y%3D&Expires=1479132825&AWSAccessKeyId=AKIAIVFPT2YJYYZY3H4A&versionId=null&response-content-disposition=attachment%3B%20filename%3D%22phantomjs-2.1.1-linux-x86_64.tar.bz2%22
Resolving bbuseruploads.s3.amazonaws.com (bbuseruploads.s3.amazonaws.com)... 52.216.0.160
Connecting to bbuseruploads.s3.amazonaws.com (bbuseruploads.s3.amazonaws.com)|52.216.0.160|:443... connected.
HTTP request sent, awaiting response... 403 Forbidden
2016-11-14 14:19:33 ERROR 403: Forbidden.
<Error>
<Code>AccessDenied</Code>
<Message>Request has expired</Message>
<Expires>2016-11-14T14:13:45Z</Expires>
<ServerTime>2016-11-14T14:23:41Z</ServerTime>
<RequestId>CCBE9E0690696666</RequestId>
<HostId>
FtiV4Gca58G/U94B0MjpGf/AT3twcz6avQAA1Uo4EexmA1CiWhKlkjQAMICjPCask7fsJYBy5uk=
</HostId>
</Error>

Using the optional export PHANTOMJS_HOST="https://s3.amazonaws.com/codeship-packages" works!

--2016-11-14 14:39:43--  https://s3.amazonaws.com/codeship-packages/phantomjs-2.1.1-linux-x86_64.tar.bz2
Resolving s3.amazonaws.com (s3.amazonaws.com)... 52.216.1.83
Connecting to s3.amazonaws.com (s3.amazonaws.com)|52.216.1.83|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 23415665 (22M) [application/x-bzip2]
Saving to: /home/rof/cache/phantomjs-2.1.1-linux-x86_64.tar.bz2

100%[======================================>] 23,415,665  74.8MB/s   in 0.3s   

2016-11-14 14:39:43 (74.8 MB/s) - /home/rof/cache/phantomjs-2.1.1-linux-x86_64.tar.bz2 saved [23415665/23415665]

Maybe export PHANTOMJS_HOST="https://s3.amazonaws.com/codeship-packages" should be the default? Thanks!

@mlocher
Copy link
Contributor

mlocher commented Nov 14, 2016

Hey @simeonwillbanks , please see ariya/phantomjs#13953 for the root cause.

Unfortunately we can't fix this, but then again we don't want to be the default host, but only offer the mirror as a temporary work around

@simeonwillbanks
Copy link
Author

@mlocher Thanks for the link.

Should we keep this issue open until the root cause is resolved?

@mlocher
Copy link
Contributor

mlocher commented Nov 15, 2016

@simeonwillbanks My personal opinion on this is that I'd close this issue. Reason being that

  1. We can't help with the root issue other than what we already provide (a basic mirror of some of the PhantomJS versions).
  2. Alternative download location ariya/phantomjs#13953 has been open for a long time and I don't expect it to get resolved any time soon.
  3. Even the closed issue will still be searchable and I (or you, if you want to) can prepare a PR for the phantomjs.sh script and add links to this issue and Alternative download location ariya/phantomjs#13953 to point users in the right direction, if they are hit by the rate limiting issue.

What do you think?

@simeonwillbanks
Copy link
Author

@mlocher sounds good! Thanks for your time 😸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants