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

Crashes with undefined index: 0 inside docker container #47

Closed
k0pernikus opened this issue Feb 8, 2016 · 4 comments · Fixed by #49
Closed

Crashes with undefined index: 0 inside docker container #47

k0pernikus opened this issue Feb 8, 2016 · 4 comments · Fixed by #49

Comments

@k0pernikus
Copy link

I have included prestissimo inside a project. We are using docker container and prestiismio is globally installed during the build.

It worked well on most cases, yet one developer's machine has the issue:

[ErrorException]    
  Undefined index: 0 
Exception trace:
 () at /root/.composer/vendor/hirak/prestissimo/src/ParallelDownloader.php:93
 Composer\Util\ErrorHandler::handle() at /root/.composer/vendor/hirak/prestissimo/src/ParallelDownloader.php:93
 Hirak\Prestissimo\ParallelDownloader->download() at /root/.composer/vendor/hirak/prestissimo/src/Plugin.php:75
 Hirak\Prestissimo\Plugin->onPostDependenciesSolving() at n/a:n/a
 call_user_func() at phar://composer.phar/bin/../src/../src/Composer/EventDispatcher/EventDispatcher.php:156
 Composer\EventDispatcher\EventDispatcher->doDispatch() at phar://composer.phar/bin/../src/../src/Composer/EventDispatcher/EventDispatcher.php:133
 Composer\EventDispatcher\EventDispatcher->dispatchInstallerEvent() at phar://composer.phar/bin/
../src/../src/Composer/Installer.php:524
 Composer\Installer->doInstall() at phar://composer.phar/bin/../src/../src/Composer/Installer.php:232
 Composer\Installer->run() at phar://composer.phar/bin/../src/../src/Composer/Command/InstallCommand.php:134
 Composer\Command\InstallCommand->execute() at phar://composer.phar/bin/../src/../vendor/symfony/console/Command/Command.php:259
 Symfony\Component\Console\Command\Command->run() at phar://composer.phar/bin/../src/../vendor/symfony/console/Application.php:844
 Symfony\Component\Console\Application->doRunCommand() at phar://composer.phar/bin/../src/../vendor/symfony/console/Application.php:192
 Symfony\Component\Console\Application->doRun() at phar://composer.phar/bin/../src/../src/Composer/Console/Application.php:166
 Composer\Console\Application->doRun() at phar://composer.phar/bin/../src/../vendor/symfony/console/Application.php:123
 Symfony\Component\Console\Application->run() at phar://composer.phar/bin/../src/../src/Composer/Console/Application.php:99
 Composer\Console\Application->run() at phar://composer.phar/bin/composer:43
 include() at /usr/local/bin/composer:25

What could be the issue here?

@k0pernikus
Copy link
Author

It seems the issue was related to too many requests to the github.com api which was throwing 403 errors. Hence, there were no files and nothing could be properly installed.

Adding an auth.json for composer to use at the projects parent folder with a personal access token to public github repositories fixed the issue:

{
    "github-oauth": {
        "github.com": "YOUR_GITHUB_ACCESS_TOKEN"
    }
}

@hirak
Copy link
Owner

hirak commented Feb 10, 2016

I think this is the same problem #41

Please try 0.1.10.

$ composer global update hirak/prestissimo --no-plugins

@k0pernikus
Copy link
Author

@hirak I am not sure it's entirely a duplicate as the issue went away, as pointed out, after adding an auth.json. No update of prestissimo was required.

@shakaran
Copy link

@hirak I found useful the tweak about github-auth. Could you add/mention the tweak in README?

k0pernikus added a commit to k0pernikus/prestissimo that referenced this issue Feb 11, 2016
k0pernikus added a commit to k0pernikus/prestissimo that referenced this issue Feb 11, 2016
@hirak hirak closed this as completed in #49 Feb 11, 2016
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

Successfully merging a pull request may close this issue.

3 participants