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

The process "composer require backpack/generators --dev" exceeded the timeout of 60 seconds. #217

Closed
Djomab opened this Issue Nov 17, 2017 · 25 comments

Comments

Projects
None yet
@Djomab

Djomab commented Nov 17, 2017

I have this issue 'The process "composer require backpack/generators --dev" exceeded the timeout of 60 seconds.' when running php artisan backpack:base:install on a fresh install laravel 5.5. Some helps please.

@lloy0076 lloy0076 added the bug label Nov 18, 2017

@lloy0076

This comment has been minimized.

Member

lloy0076 commented Nov 18, 2017

Oddly enough, so do I now.

@lloy0076

This comment has been minimized.

Member

lloy0076 commented Nov 18, 2017

% composer require backpack/generators --dev

Then rerun the install.

This was referenced Nov 19, 2017

@tabacitu

This comment has been minimized.

Member

tabacitu commented Nov 29, 2017

I have no idea what the issue was... It looks like the official composer repository skipped a beat for this package. It's happened to me for other packages before, but it has been fixed in a matter of hours. This time it sounds like it took a little longer...

I've just tested it, on a fresh install, and it works fine now. Since there's nothing we can do about this (or nothing that I know of) I'm going to close the issue. But please reply here if anybody has this problem again in the future... We'll see what we can do...

@tabacitu tabacitu closed this Nov 29, 2017

@hojatdehnavi

This comment has been minimized.

hojatdehnavi commented Nov 29, 2017

Hi my friends, I have this problem too

hojat@HOJAT-PC F:\PROJECT\laravel\test1
$ php artisan backpack:base:install

Backpack\Base installation started. Please wait...

Running: composer require backpack/generators --dev

... > Using version ^1.1 for backpack/generators
./composer.json has been updated
... > Loading composer repositories with package information
... > Updating dependencies (including require-dev)
... > Package operations: 1 install, 0 updates, 0 removals
... > - Installing backpack/generators (1.1.11): Loading from cache
... > Writing lock file
Generating optimized autoload files

[Symfony\Component\Process\Exception\ProcessTimedOutException]
The process "composer require backpack/generators --dev" exceeded the timeout of 60 seconds.

@tabacitu

This comment has been minimized.

Member

tabacitu commented Dec 2, 2017

Damn it! @hojatdehnavi thank you.

So we've go a little more information now. Apparently the problem appears when composer loads the repository from cache. Which is funny, because cache is supposed to make the installation faster, not slower.

If this is the only case this happens, I see two possible solutions:

  1. Automatically clear the composer cache before trying to install backpack/generators (composer clear-cache).
  2. Since there is not --no-cache flag in composer, we could force composer to install Install backpack/generators from the git repository, which usually bypasses cache - composer require backpack/generators --dev --prefer-source.

Honestly, I don't like either options. (1) is too broad, (2) might not work in all cases...

If anybody else has this problem, please copy-paste your entire installation output, maybe we get some more information and figure out a better way to deal with this...

@farhad-dehghan

This comment has been minimized.

farhad-dehghan commented Dec 2, 2017

Hi friends, i have same issue:

 php artisan backpack:base:install

### Backpack\Base installation started. Please wait...
### Running: composer require backpack/generators --dev
... > Using version ^1.1 for backpack/generators
./composer.json has been updated
... > Loading composer repositories with package information
... > Updating dependencies (including require-dev)


  [Symfony\Component\Process\Exception\ProcessTimedOutException]
  The process "composer require backpack/generators --dev" exceeded the timeout of 60 seconds.

But when using composer require backpack/generators --dev first and then rerun install every things is OK.

@hojatdehnavi

This comment has been minimized.

hojatdehnavi commented Dec 4, 2017

Dear friends, when will this problem be resolved?

@tabacitu

This comment has been minimized.

Member

tabacitu commented Dec 5, 2017

@hojatdehnavi - unfortunately we can't solve it unless we understand what the problem was - why it took so long on your machine. Right now I have no idea and I can't replicate the bug on my machine, to know whether something fixes it or not...

@hojatdehnavi , @farhad-dehghan , @Djomab , @lloy0076 can you please tell me your computer's specs? I'm thinking it might happen on computers that are a bit slower. Or where the internet connection is not broadband... In this case the bug might make sense...

I'm interested in:

  • operating system (Mac OS 10.13.1, Windows 8, etc)
  • CPU
  • RAM
  • HDD/SSD?
  • Internet connection

Also, was it the first time you installed Backpack on that machine, or had you installed it before?

Thank you!

@lloy0076

This comment has been minimized.

Member

lloy0076 commented Dec 5, 2017

  • Windows 10 Home (Developer Enabled)
  • AMD A10-8700P Radeon R6, 10 Compute Cores 4C+6G 1.80GHZ
  • 16.0 GB RAM (15.4GB usable)
  • 5400RPM laptop HD
  • Time Warner / Spectrum Home

For reference, I can play StarCraft, Diablo III and most first person shooters at fair frame rates without lag.

http://beta.speedtest.net/result/6851123414

It'll happen with or without the composer cache primed.

@lbrep

This comment has been minimized.

lbrep commented Dec 6, 2017

I managed it by running the following command:

composer config --global process-timeout 2000

You may want to reset the process-timeout variable to 60 seconds again. I set it to 300.

@webix

This comment has been minimized.

webix commented Dec 12, 2017

I have got same problem.

In Process.php line 1336:
  The process "composer require backpack/generators --dev" exceeded the timeout of 60 seconds.

and I have tried with "clear cache" like below.

$ composer clear-cache
$ composer config --global process-timeout 2000
$ composer require backpack/generators --dev --prefer-source

after that I have got another exception error.

[Composer\Downloader\TransportException]
  The "http://packagist.org/p/provider-2017-04%24aeebcf0ab780249dae59284aed9f3253ff7f735bde505fcacf785d6dd8282d88.json" file could not be downloaded (HTTP/1.1 404 Not Found)

guess above resource endpoint is dead.
anyone have solved this?

@tabacitu tabacitu reopened this Dec 14, 2017

@tabacitu

This comment has been minimized.

Member

tabacitu commented Dec 14, 2017

@webix , @lloy0076 , @lbrep , @hojatdehnavi can you please run php -i | grep -i ssl and composer diagnose and copy-paste/screenshot the output?

@hojatdehnavi

This comment has been minimized.

hojatdehnavi commented Dec 14, 2017

hi, I'm from Iran.
I do not think the problem is with my system.
Because this problem also happened to my friends.

@AbbyJanke

This comment has been minimized.

Contributor

AbbyJanke commented Dec 16, 2017

Having this issue as well with a new install..

Configure Command =>  './configure'  '--prefix=/usr/local/Cellar/php71/7.1.7_19' '--localstatedir=/usr/local/var' '--sysconfdir=/usr/local/etc/php/7.1' '--with-config-file-path=/usr/local/etc/php/7.1' '--with-config-file-scan-dir=/usr/local/etc/php/7.1/conf.d' '--mandir=/usr/local/Cellar/php71/7.1.7_19/share/man' '--enable-bcmath' '--enable-calendar' '--enable-dba' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-mbregex' '--enable-mbstring' '--enable-shmop' '--enable-soap' '--enable-sockets' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--enable-wddx' '--enable-zip' '--with-freetype-dir=/usr/local/opt/freetype' '--with-gd' '--with-gettext=/usr/local/opt/gettext' '--with-iconv-dir=/usr' '--with-icu-dir=/usr/local/opt/icu4c' '--with-jpeg-dir=/usr/local/opt/jpeg' '--with-kerberos=/usr' '--with-mhash' '--with-ndbm=/usr' '--with-png-dir=/usr/local/opt/libpng' '--with-xmlrpc' '--with-zlib=/usr' '--with-readline=/usr/local/opt/readline' '--without-gmp' '--without-snmp' '--with-libxml-dir=/usr/local/opt/libxml2' '--with-pdo-odbc=unixODBC,/usr/local/opt/unixodbc' '--with-unixODBC=/usr/local/opt/unixodbc' '--with-bz2=/usr' '--with-openssl=/usr/local/opt/openssl' '--enable-fpm' '--with-fpm-user=_www' '--with-fpm-group=_www' '--with-curl' '--with-xsl=/usr' '--with-ldap' '--with-ldap-sasl=/usr' '--with-mysql-sock=/tmp/mysql.sock' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--disable-opcache' '--enable-pcntl' '--without-pear' '--enable-dtrace' '--disable-phpdbg' '--enable-zend-signals'
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, tls, tlsv1.0, tlsv1.1, tlsv1.2
SSL => Yes
SSL Version => LibreSSL/2.0.20
core SSL => supported
extended SSL => supported
openssl
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 1.0.2l  25 May 2017
OpenSSL Header Version => OpenSSL 1.0.2l  25 May 2017
Openssl default config => /usr/local/etc/openssl/openssl.cnf
openssl.cafile => no value => no value
openssl.capath => no value => no value
OpenSSL support => enabled
Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys: 
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0  87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B  0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK

based on error logs its failing on line 81 of the Install.php command, my die and dump:

Symfony\Component\Process\Process {#576
  -callback: null
  -hasCallback: true
  -commandline: "composer require backpack/generators --dev"
  -cwd: "/Users/abby/Sites/dissociativeliving"
  -env: null
  -input: null
  -starttime: 1513414923.5733
  -lastOutputTime: 1513414923.58
  -timeout: 60.0
  -idleTimeout: null
  -options: array:1 [
    "suppress_errors" => true
  ]
  -exitcode: 127
  -fallbackStatus: []
  -processInformation: array:8 [
    "command" => "composer require backpack/generators --dev"
    "pid" => 61952
    "running" => false
    "signaled" => false
    "stopped" => false
    "exitcode" => 127
    "termsig" => 0
    "stopsig" => 0
  ]
  -outputDisabled: false
  -stdout: stream resource {@353
    wrapper_type: "PHP"
    stream_type: "TEMP"
    mode: "w+b"
    unread_bytes: 0
    seekable: true
    uri: "php://temp/maxmemory:1048576"
    options: []
  }
  -stderr: stream resource {@355
    wrapper_type: "PHP"
    stream_type: "TEMP"
    mode: "w+b"
    unread_bytes: 0
    seekable: true
    uri: "php://temp/maxmemory:1048576"
    options: []
  }
  -enhanceWindowsCompatibility: true
  -enhanceSigchildCompatibility: false
  -process: Closed resource @363
  -status: "terminated"
  -incrementalOutputOffset: 0
  -incrementalErrorOutputOffset: 0
  -tty: null
  -pty: false
  -inheritEnv: false
  -useFileHandles: false
  -processPipes: Symfony\Component\Process\Pipes\UnixPipes {#580
    -ttyMode: false
    -ptyMode: false
    -haveReadSupport: true
    +pipes: []
    -inputBuffer: ""
    -input: null
    -blocked: false
  }
  -latestSignal: null
}

further exploration it it appears the command ProcessFailedException() failed and is something to do with PHP memory limit possibly. If i comment out that line it appears to work successfully.

@lloy0076

This comment has been minimized.

Member

lloy0076 commented Dec 23, 2017

@AbbyJanke I wonder if that ProcessFailedException fails and then takes a million years to process it.

@mgralikowski

This comment has been minimized.

mgralikowski commented Dec 24, 2017

Hi, it is my first try with this library i have same problem:

... > Generating optimized autoload files

In Process.php line 1325:

The process "composer require backpack/generators --dev" exceeded the timeout of 60 seconds.

@pnjuno

This comment has been minimized.

pnjuno commented Dec 26, 2017

Editing \Vendor\symfony\process\Process.php $timeout from 60 to 0 fixes this issue

@AbbyJanke

This comment has been minimized.

Contributor

AbbyJanke commented Dec 29, 2017

Alright, So.. Simple answer.. It is not an issue with Backpack.. (I am assuming everybody having issues has a linux/mac computer) I had issues with it before, but i got tired of entering my password to push a git commit so i forced my computer to save my password for that specifically and when I installed a new backpack I had no issue. So my recommendation to those having issues is force your terminal to remember your ssh keychain passsword.. that's what it is waiting for but there is currently no prompt. Idk if we can look into implementing some kinda fool proof for that with Backpack but thats where I'm at.

@mgralikowski

This comment has been minimized.

mgralikowski commented Dec 29, 2017

Me W10 + PHPSTORM. But finally the library has been installed. I am not sure how i did it :) Maybe just the luck..

@lloy0076

This comment has been minimized.

Member

lloy0076 commented Dec 29, 2017

@AbbyJanke - I'm using Windows 10 - plus my SSH keys are fairly much always in my SSH agent. 😈

@tabacitu

This comment has been minimized.

Member

tabacitu commented Jan 3, 2018

Yeah... I guess it's not an issue with Backpack per-se, but it looks like something many first users might come across. And if your first Backpack experience is that it failed at the installation... we don't make such a good first impression :-) Even if it wasn't our fault.

Plus. I'd really like to use this installation method more. Hopefully soon, all packages would be installed with a single command line. So I think getting to the bottom of this is important.

Bottom line:

  • it doesn't seem to be a Backpack-specific issue, but it's annoying;
  • it doesn't seem like a system performance issue, since it DIDN'T happen on my puny 11 inch Macbook, but it DID happen on @lloy0076 's rocket;
  • it doesn't seem to be restricted to an operating system; @lloy0076 runs on Windows, @AbbyJanke on Mac OS;

Soo... maybe a server configuration issue? I've tried it on

  • Homestead, where my php -v says: PHP 7.2.0-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Nov 30 2017 13:58:33) ( NTS ); This one runs on nginx;
  • MAMP, where my php -v says: PHP 7.1.7 (cli) (built: Jul 15 2017 18:08:09) ( NTS ); This one runs on Apache;

Both work fine for me.

If anybody has this problem again please try extending the timeout with composer config --global process-timeout 300 and tell us if that fixes it. Also a php -v would go a long way in debugging this (I hope).

Cheers!

@enniosousa

This comment has been minimized.

enniosousa commented Jan 4, 2018

thanks @pnjuno

@tabacitu

This comment has been minimized.

Member

tabacitu commented Jan 18, 2018

Just merged @ihsanberahim 's PR which seems to properly fix this.

I think 0 for a timeout could spell trouble, though, so I defaulted to 300 (5 minutes) and added a "timeout" option to the installer. If anybody else wants to use 0 or something else it should be as easy as php artisan backpack:base:install --timeout=0

Also, I added a progress bar. The installer is pretty now :-)
screen shot 2018-01-18 at 09 52 00

Also, in case someone ever needs to debug the installer, they can run the installer with the --debug flag:
screen shot 2018-01-18 at 09 54 40

Cheers!

@FelipeOneHouse

This comment has been minimized.

FelipeOneHouse commented Apr 25, 2018

Air-de-Felipe:m3webdevelopment.com felipe$ php artisan backpack:base:install
0/6 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% Backpack\Base installation started. Please wait...
1/6 [▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░] 16% Installing backpack/generators

Symfony\Component\Process\Exception\ProcessFailedException : The command "composer require backpack/generators --dev" failed.

Exit Code: 127(Command not found)

Working directory: /Applications/XAMPP/xamppfiles/htdocs/ohsPre/m3webdevelopment.com

Output:

Error Output:

sh: composer: command not found

at /Applications/XAMPP/xamppfiles/htdocs/ohsPre/m3webdevelopment.com/vendor/backpack/base/src/app/Console/Commands/Install.php: 94
90: });
91:
92: // executes after the command finishes
93: if (!$process->isSuccessful()) {
94: throw new ProcessFailedException($process);
95: }
96:
97: if ($this->progressBar) {
98: $this->progressBar->advance();
99: }

Exception trace:

1 Backpack\Base\app\Console\Commands\Install::executeProcess("composer require backpack/generators --dev")
/Applications/XAMPP/xamppfiles/htdocs/ohsPre/m3webdevelopment.com/vendor/backpack/base/src/app/Console/Commands/Install.php : 52

2 Backpack\Base\app\Console\Commands\Install::handle()
/Applications/XAMPP/xamppfiles/htdocs/ohsPre/m3webdevelopment.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php : 29

@tabacitu

This comment has been minimized.

Member

tabacitu commented May 2, 2018

@FelipeOneHouse do you have composer set up as a global command, or do you have to always call composer.phar smth? That looks to be your problem.

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