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

Updating to 1.1.10 results in fatal error to install Drupal #20

Open
shelane opened this issue Nov 2, 2018 · 5 comments
Open

Updating to 1.1.10 results in fatal error to install Drupal #20

shelane opened this issue Nov 2, 2018 · 5 comments

Comments

@shelane
Copy link

shelane commented Nov 2, 2018

Steps to reproduce

I ran composer update consolidation/site-alias and it updated to 1.1.10. I think ran the blt command to install Drupal: blt drupal:install

Expected behavior

With BLT 9.2.0, it successfully installed Drupal prior to this one update. Immediately after the composer update and running the command, it failed.

Actual behavior

Here is the verbose output

[debug] Drupal VM is not initialized.
[debug] Verifying that MySQL is available...
[Robo\Common\ProcessExecutor] Running '/var/www/vendor/bin/drush' @default.local sqlq "SHOW DATABASES" --uri=default in /var/www/docroot
information_schema
default
> internal:drupal:install
[Acquia\Blt\Robo\Tasks\DrushTask] Running /var/www/vendor/bin/drush @default.local site-install llnl_lightning install_configure_form.update_status_module='array(FALSE,FALSE)' install_configure_form.enable_update_status_module=NULL --sites-subdir=default --site-name='Lawrence Livermore National Laboratory' [email protected] --account-name=8lYG5zByPK [email protected] --locale=en --no-interaction -vvv --ansi in /var/www/docroot
 [preflight] Config paths: /var/www/vendor/drush/drush/drush.yml,/var/www/drush/drush.yml,/var/www/docroot/sites/default/local.drush.yml
 [preflight] Alias paths: /var/www/docroot/drush/sites,/var/www/drush/sites
 [preflight] Commandfile search paths: /var/www/vendor/drush/drush/src,/var/www/drush
 [bootstrap] Starting bootstrap to root [0.09 sec, 7.68 MB]
 [bootstrap] Drush bootstrap phase 1 [0.09 sec, 7.68 MB]
 [bootstrap] Try to validate bootstrap phase 1 [0.09 sec, 7.68 MB]
 [bootstrap] Try to validate bootstrap phase 1 [0.09 sec, 7.69 MB]
 [bootstrap] Try to bootstrap at phase 1 [0.09 sec, 7.81 MB]
 [bootstrap] Drush bootstrap phase: bootstrapDrupalRoot() [0.09 sec, 7.81 MB]
 [bootstrap] Change working directory to /var/www/docroot [0.09 sec, 7.81 MB]
 [bootstrap] Initialized Drupal 8.6.2 root directory at /var/www/docroot [0.09 sec, 7.82 MB]
 [bootstrap] Drush bootstrap phase: bootstrapDrupalSite() [0.1 sec, 8.34 MB]
 [bootstrap] Initialized Drupal site default at sites/default [0.1 sec, 8.34 MB]
 [bootstrap] Drush bootstrap phase: bootstrapDrupalConfiguration() [0.1 sec, 8.34 MB]
 [debug] Add service modifier [0.1 sec, 8.6 MB]

In Assert.php line 1081:
                                        
  [InvalidArgumentException]            
  The paths must be strings. Got: NULL  
                                        

Exception trace:
 Webmozart\Assert\Assert::reportInvalidArgument() at /var/www/vendor/webmozart/assert/src/Assert.php:174
 Webmozart\Assert\Assert::string() at n/a:n/a
 call_user_func_array() at /var/www/vendor/webmozart/assert/src/Assert.php:1019
 Webmozart\Assert\Assert::__callStatic() at /var/www/vendor/webmozart/path-util/src/Path.php:855
 Webmozart\PathUtil\Path::join() at /var/www/vendor/drush/drush/src/Commands/core/SiteInstallCommands.php:307
 Drush\Commands\core\SiteInstallCommands->pre() at /var/www/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/ValidateHookDispatcher.php:43
 Consolidation\AnnotatedCommand\Hooks\Dispatchers\ValidateHookDispatcher->callValidator() at /var/www/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/ValidateHookDispatcher.php:27
 Consolidation\AnnotatedCommand\Hooks\Dispatchers\ValidateHookDispatcher->validate() at /var/www/vendor/consolidation/annotated-command/src/CommandProcessor.php:167
 Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter() at /var/www/vendor/consolidation/annotated-command/src/CommandProcessor.php:150
 Consolidation\AnnotatedCommand\CommandProcessor->process() at /var/www/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:404
 Consolidation\AnnotatedCommand\AnnotatedCommand->execute() at /var/www/vendor/symfony/console/Command/Command.php:255
 Symfony\Component\Console\Command\Command->run() at /var/www/vendor/symfony/console/Application.php:964
 Symfony\Component\Console\Application->doRunCommand() at /var/www/vendor/symfony/console/Application.php:248
 Symfony\Component\Console\Application->doRun() at /var/www/vendor/symfony/console/Application.php:148
 Symfony\Component\Console\Application->run() at /var/www/vendor/drush/drush/src/Runtime/Runtime.php:112
 Drush\Runtime\Runtime->doRun() at /var/www/vendor/drush/drush/src/Runtime/Runtime.php:41
 Drush\Runtime\Runtime->run() at /var/www/vendor/drush/drush/drush.php:66
 require() at /var/www/vendor/drush/drush/drush:4

site:install [--db-url DB-URL] [--db-prefix DB-PREFIX] [--db-su DB-SU] [--db-su-pw DB-SU-PW] [--account-name [ACCOUNT-NAME]] [--account-mail [ACCOUNT-MAIL]] [--site-mail [SITE-MAIL]] [--account-pass ACCOUNT-PASS] [--locale [LOCALE]] [--site-name [SITE-NAME]] [--site-pass SITE-PASS] [--sites-subdir SITES-SUBDIR] [--config-dir CONFIG-DIR] [--existing-config] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-d|--debug] [-y|--yes] [--no] [--remote-host REMOTE-HOST] [--remote-user REMOTE-USER] [-r|--root ROOT] [-l|--uri URI] [--simulate] [--pipe] [-D|--define DEFINE] [--xh-link XH-LINK] [--druplicon] [--notify] [--] <command> [<profile>]...

[Acquia\Blt\Robo\Tasks\DrushTask]  Exit code 1  Time 0.182s
[error]  Failed to install Drupal! 
[error]  Command `internal:drupal:install ` exited with code 1. 
0.765s total time elapsed.

System Configuration

Linux Debian GNU/Linux 9 through Docksal with PHP 7.1.

@greg-1-anderson
Copy link
Member

I reverted AliasRecord::root() back to its exact form in 1.1.5. Apparently the change I kept in wasn't an improvement.

Please try again with 1.1.11 and let me know if that restores things.

@shelane
Copy link
Author

shelane commented Nov 3, 2018

Yes, 1.1.11 works.

@shelane shelane closed this as completed Nov 3, 2018
@shelane
Copy link
Author

shelane commented Apr 8, 2019

One of the updates I did today updated site-alias to 3.0. I'm right back to getting this error again:


In SiteAliasTrait.php line 30:
                                                      
  [Exception]                                         
  Site alias @default.local does not specify a root.  
                                                      

Exception trace:
 () at /var/www/vendor/consolidation/site-alias/src/SiteAliasTrait.php:30
 Consolidation\SiteAlias\SiteAlias->root() at /var/www/vendor/drush/drush/src/Commands/core/SiteInstallCommands.php:297
 Drush\Commands\core\SiteInstallCommands->pre() at /var/www/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/ValidateHookDispatcher.php:43
 Consolidation\AnnotatedCommand\Hooks\Dispatchers\ValidateHookDispatcher->callValidator() at /var/www/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/ValidateHookDispatcher.php:27
 Consolidation\AnnotatedCommand\Hooks\Dispatchers\ValidateHookDispatcher->validate() at /var/www/vendor/consolidation/annotated-command/src/CommandProcessor.php:195
 Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter() at /var/www/vendor/consolidation/annotated-command/src/CommandProcessor.php:178
 Consolidation\AnnotatedCommand\CommandProcessor->process() at /var/www/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:302
 Consolidation\AnnotatedCommand\AnnotatedCommand->execute() at /var/www/vendor/symfony/console/Command/Command.php:255
 Symfony\Component\Console\Command\Command->run() at /var/www/vendor/symfony/console/Application.php:978
 Symfony\Component\Console\Application->doRunCommand() at /var/www/vendor/symfony/console/Application.php:255
 Symfony\Component\Console\Application->doRun() at /var/www/vendor/symfony/console/Application.php:148
 Symfony\Component\Console\Application->run() at /var/www/vendor/drush/drush/src/Runtime/Runtime.php:118
 Drush\Runtime\Runtime->doRun() at /var/www/vendor/drush/drush/src/Runtime/Runtime.php:49
 Drush\Runtime\Runtime->run() at /var/www/vendor/drush/drush/drush.php:72
 require() at /var/www/vendor/drush/drush/drush:4

@shelane shelane reopened this Apr 8, 2019
@greg-1-anderson
Copy link
Member

It is expected that ^2 and ^3 should throw an exception if getRoot() is called on an alias that does not have a root element. Projects that do not guard getRoot() with hasRoot() should declare compatibility with site-alias ^1 only.

@greg-1-anderson
Copy link
Member

Sorry, the original issue was about BLT so I didn't read your stack crawl. Looks like this is a bug in Drush, not BLT or consolidation/site-alias.

manarth pushed a commit to manarth/site-alias that referenced this issue Sep 14, 2022
Create a transport manager that uses transport factories to return transport instances that are applicable to the provided site alias.
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

2 participants