-
Notifications
You must be signed in to change notification settings - Fork 43
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
Unable to install #35
Comments
Just looked at the headers when using bitbucket, looks like authentification doesn't work and we enter in a loop.
|
Hey Mickaël! Thank you for reporting this issue. It still think the Bitbucket CDN or their load balancer has some issues. It's unlikely that the download behaviour of Bitbucket changes, even when you set the Oauth token. It's simply unreliable and you have to re-try way to often to get a download. (Yes, the headers you posted indicate an infinite redirect, because the download is not available and the request counter goes up until you hit the API limit, then the token request kicks in, then even if the token is set, the download might fail.) I've added the You don't need to set When using |
Some update about this, I tried to host myself the binaries of Github. As expected, I got the same issue as with the Medium release:
|
I had to clear my composer cache today and encountered this issue as well
|
Same issue here, I've been unable to find a solution. Has anyone made any progress? Thanks edit: turns out I'd previously configured oauth; removing the config resolved the issue. |
@iainp999 Thanks for the update. I encountered this issue a couple of days ago and jumped through the hoops of configuring oauth. That didn't work. Today I removed my oauth config from my auth.json file, and now a |
@nadavoid no problem! glad you got it sorted out. |
This is still an issue when using PHP < 5.6 and/or having oauth configured for bitbucket in composer config. It's not always possible to change those. The PHANTOMJS_CDNURL environment variable is a nice addition, but not ideal in my opinion. There is no control over environment variables inside a repository / composer.json. So one would always have to instruct others using the repository to remember to set that env before running composer.update. I'll write a PR to read from a config file in the repository. Issue about bitbucket downloads on composer: #5584. I'm afraid it might not get solved. I propose using another CDN by default instead of bitbucket. E.g. github medium/phantomjs. Because I think there will be more support for github downloading from composer. |
I would suggest to add it to |
Even nicer. If it is allowed to put custom config in composer.json. |
Yes, it's allowed. There is a section https://getcomposer.org/doc/04-schema.md#extra and So, we could use an entry like this:
One more thing to consider: if we add this functionality, then setting the ENV var locally needs to be an override for the value in composer.json. (To allow: even if the team uses CDN x, the local developer uses CDN y.) |
Funny thing by the way, |
Roel, thank you again for working here and on the upstream to solve this issue! |
Hi,
Last days, I encountered big troubles to install phantomjs. It looks like the CDN of bitbucket blocked the download and request for an Oauth token, like #34. I tried several options to install it, but all failed.
At first, I switched to the
master
branch of the composer package:"jakoch/phantomjs-installer": "dev-master"
to be able to change the CDN.Setting a bitbucket Oauth token
I created an Oauth token in my account and used
composer config -g bitbucket-oauth.bitbucket.org KEY SECRET
to set the Oauth token. Then run,composer -vvv install
(actuallyPHANTOMJS_CDNURL=https://bitbucket.org/ariya/phantomjs/downloads/ composer -vvv install
) and got:It looks like, nothing is downloaded. I tried with
curl -L -v https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
and found that an XML permission message was returned. I tried it three times and finally got the file the third time. However, never get it working at all through composer.Using the new default github medium
Running
PHANTOMJS_CDNURL=https://github.com/Medium/phantomjs/ composer -vvv install
, lead to the error:It looks like the header reports 23415665 and the strlen composer function 23415536.
Using the 'official' https://cnpmjs.org/downloads
Download is extremely slow and leads to the same error as with Github medium (with the exact same filesizes reported ).
Some informations about my settings:
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.9, Copyright (c) 1999-2016, by Zend Technologies
Note: I finally got it working using bitbucket and removing the oauth, but yesterday it was failing due to the missing Oauth... Crazy...
Any hints ?
The text was updated successfully, but these errors were encountered: