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

Bitbucket OAuth required? #34

Closed
mbrodala opened this issue Aug 1, 2016 · 11 comments
Closed

Bitbucket OAuth required? #34

mbrodala opened this issue Aug 1, 2016 · 11 comments

Comments

@mbrodala
Copy link

mbrodala commented Aug 1, 2016

After adding this package I noticed that the 2nd installation attempt gives me this:

> PhantomInstaller\Installer::installPhantomJS
  - Installing phantomjs (2.1.1)
    Downloading: Connecting...
Could not fetch https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2, please create a bitbucket OAuth token to to go over the API rate limit
Follow the instructions on https://confluence.atlassian.com/bitbucket/oauth-on-bitbucket-cloud-238027431.html
to create a consumer. It will be stored in "/home/.../.composer/auth.json" for future use by Composer.
Ensure you enter a "Callback URL" or it will not be possible to create an Access Token (this callback url will not be used by composer)
Consumer Key (hidden):
Consumer Secret (hidden):
Consumer stored successfully.

Is this really required or simply a Bitbucket issue?

@jakoch
Copy link
Owner

jakoch commented Aug 1, 2016

Hey Mathias!

No, it's not required. Bitbucket is simply unreliable sometimes.
Others devs are running into this issue, too, e.g. acquia/blt#223
The main issue is ariya/phantomjs#13953

How could a solution look like?
We could introduce a configuration directive to select an alternative download location
and provide an array with mirror download locations.
One mirror, for instance, could be https://cnpmjs.org/downloads
(We could also randomize the mirror selection.)
That's the easy part...

We would also need to add signature checks for these unofficial downloads.
The problem is, that the upstream (Ariya and his team) does not provide them.
Well, that's the complicated part...

Regards, Jens

@mbrodala
Copy link
Author

mbrodala commented Aug 1, 2016

Thanks for explaining the issue at hand. I see that the checksums are mentioned in the docs starting with this change but for automated downloads the checksums must be provided as additional files.

Could you ask them to add these files to their download list on Bitbucket?

@jakoch
Copy link
Owner

jakoch commented Aug 1, 2016

.. but for automated downloads the checksums must be provided as additional files

Yes, i could maintain the checksums in the installer, but that's inconvenient and just adds more maintenance work for me.

Could you ask them to add these files to their download list on Bitbucket?

Ok, let's do that. It would help me, other installer authors and all mirroring guys.
ariya/phantomjs#14440

@mbrodala
Copy link
Author

mbrodala commented Aug 1, 2016

Thanks a lot, let's see how it goes.

@tuxayo
Copy link

tuxayo commented Aug 2, 2016

I case anyone is wondering (it took me a moment to read carefully enough and understand it).
Retry the install, these are intermittent issues.

jakoch added a commit that referenced this issue Aug 9, 2016
… download

added test for getCdnUrl() and docs to readme
prepared release 2.1.1-p06
referencing #34
jakoch added a commit that referenced this issue Aug 9, 2016
@jakoch
Copy link
Owner

jakoch commented Aug 9, 2016

I've added the environment and server variable PHANTOMJS_CDNURL,
which enables you to set a mirror URL.
You find the documentation in the Readme:
https://github.com/jakoch/phantomjs-installer#downloading-from-a-mirror

The new feature is available on the dev-master branch.
Please give me a feedback, if this works for you.

(Checks for the file hashes are not implemented, yet.)

@mbrodala
Copy link
Author

mbrodala commented Aug 9, 2016

Since two of the CDNs are Chinese they are not really an option for wide deployments.

However, I had some success getting PhantomJS installed thanks to Medium/phantomjs.

jakoch added a commit that referenced this issue Aug 9, 2016
@jakoch
Copy link
Owner

jakoch commented Aug 9, 2016

Thank you for testing and providing feedback.

I've updated the ReadMe and added the locations of the mirrors.
Actually, you can set any mirror URL you find. The CDNURLs are not hardcoded,
except Github URLs, which need a bit of hardcoding, because their folders are versioned.

I've tagged a new release: v2.1.1-p06

@mbrodala
Copy link
Author

mbrodala commented Aug 9, 2016

@jakoch Thanks a lot. As soon as the issues on our CI are sorted out, I'll give your installer another try. ;-)

@tuxayo
Copy link

tuxayo commented Aug 20, 2016

@mbrodala

Since two of the CDNs are Chinese they are not really an option for wide deployments.

You mean that the bandwidth wont be suitable for the majority of users which are out of Asia?

@mbrodala
Copy link
Author

@tuxayo Yes, that's an issue since everything from inside of Chine must pass the big firewall.

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

3 participants