Tried to install with custom profile first. Then with standard.

$ drush si standard --db-url=mysql://login:password@127.0.0.1/d8_b13_db --account-name=admin --account-pass=password --yes
You are about to DROP all tables in your 'd8_b13_db' database. Do you want to continue? (y/n): y
Starting Drupal installation. This takes a while. Consider using the [ok]
--notify global option.
Drush command terminated abnormally due to an unrecoverable error.   [error]
Error: Call to undefined function GuzzleHttp\choose_handler() in
/public/core/vendor/guzzlehttp/guzzle/src/HandlerStack.php,
line 40

Comments

VladimirAus’s picture

Issue summary: View changes
dawehner’s picture

Mh, so this would happen in case core/vendor/composer/autoload_files.php:14 would not be included. This sounds like a drush issue for me. Did you had a look for that already?

larowlan’s picture

Can you run composer dump-autoload and try again?

larowlan’s picture

Opcode cache might also be an issue?

larowlan’s picture

Status: Needs work » Postponed (maintainer needs more info)

Can't replicate this from the UI - anymore info available?

Tested from https://simplytest.me/project/drupal/8.0.0-beta13 - installer ran fine https://www.dropbox.com/s/n8skzl56sttijav/Screenshot%202015-07-30%2019.4...

dawehner’s picture

Well, if this is a problem just reproduceable with drush, its not a Drupal issue.

longwave’s picture

Unable to reproduce this. I reinstall with drush all the time, and it works for me in HEAD as well:

$ drush si standard --db-url=mysql://dave@localhost/drupal8 --account-name=admin --account-pass=password --yes
You are about to DROP all tables in your 'drupal8' database. Do you want to continue? (y/n): y
Starting Drupal installation. This takes a while. Consider using the --notify global option.
Installation complete.  User name: admin  User password: password
Congratulations, you installed Drupal!

Maybe a PHP version issue, or something like that? I am using 5.5.9-1ubuntu4.11.

larowlan’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

On that basis going to close cannot reproduce - @VladimirAus if you have steps to reproduce that don't involve the custom profile, can you re-open and post them here - thanks!

VladimirAus’s picture

Updating drush to the latest master didn't solve the issue...
Thanks everyone. Taking it to drush issue queue. https://github.com/drush-ops/drush/issues/1519
@larowlan: composer dump-autoload didn't change anything
OS: Latest MacOS with PHP 5.5.18 on MAMP server.

fgm’s picture

Title: Beta 13 drush installation triggers guzzle error » Post-Beta 13 drush installation triggers Guzzle error
Version: 8.0.0-beta13 » 8.0.x-dev
Status: Closed (cannot reproduce) » Active

I think I have to reopen this: I reproduced it on today's HEAD for both Drush and Drupal.

This is on Ubuntu 12.04.3 LTS, with this PHP

PHP 5.6.12-1+deb.sury.org~precise+1 (cli).
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
with Xdebug v2.3.2, Copyright (c) 2002-2015, by Derick Rethans
with blackfire v1.0.0, https://blackfire.io/, by SensioLabs

Checking the code, undefined function choose_handler() /does/ exist, so it's visibly a matter of entering this call before the file defining it was included.

fgm’s picture

I uninstalled opcache, xdebug and blackfire : same error.

fgm’s picture

More debugging: this is triggered during the last steps of the install:

install_finished() -> Core\ProxyClass\Cron::run() -> Core\Cron::run() -> Cron::invokeCronHandlers() -> ... -> update_cron() -> update_refresh().

At this point, update_refresh() asks the container for \Drupal::service('update.manager'), in order to invoke refreshUpdateData() on it. This triggers 24 levels of stack within the ContainerBuilder, ending with ContainerBuilder->createService($definition of HandlerStack::create, $id = NULL), which in turns invokes HandlerStack::create(NULL), causing the attempt to choose a service, using the choose_service() function which was never included in the first place.

fgm’s picture

Status: Active » Closed (works as designed)

Got it : this happens because of the drush_iq plugin for the d.o. issue queue : this plugin also includes Guzzle, but in an earlier version.

The current version of Guzzle adds a "smart" autoloader for these helper functions, in guzzlehttp/guzzle/src/functions_include.php. This code checks whether namespaces function GuzzleHttp\uri_template exists. If it exists, the code assumes the functions.php file containing both choose_handler() and GuzzleHttp\uri_template has already been included, and skips it to avoid a redefinition error.

However, because drush_iq, even in its latest version, includes an earlier version of the package (5.3.0 vs ^6.0), it already contains GuzzleHttp\uri_template (from the Utils.php file, but not choose_handler(), causing the error above.

  • Kludge: remove drush_iq from ~/.drush/
  • Workaround: upgrade drush_iq to match core Guzzle version
  • Solution: fix the issue in Guzzle itself.
  • Solution: address version compatibility in Drush (doesn't seem realistic until Drush supports side-by-side dependency installs)

Since actually solving the issue in core or Drush seems unrealistic, and workarounds exist, marking Closed, WAD.

greg.1.anderson’s picture