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

Local setup fails on Drupal\Core\Installer\Exception\AlreadyInstalledException + Contains unmentioned dependencies #218

Closed
mirsoftacquia opened this issue Jul 13, 2016 · 3 comments

Comments

@mirsoftacquia
Copy link

Steps to reproduce

  1. Build new BLT project with default settings
  2. Configure local *AMP stack (e.g. Acquia DevDesktop)
  3. Set $databases settings in docroot/sites/default/settings/local.settings.php with correct credentials.
  4. Set $options[‘uri’] in docroot/sites/default/local.drushrc.php with local URL, e.g. $options['uri'] = 'http://blted8.dd';
  5. Run local:setup

Expected result

Actual result

  • installation fails on required dependencies. Missing installations required: npm, node and bower
  • after installation of these dependencies, the setup still fails on the Drupal\Core\Installer\Exception\AlreadyInstalledException exception (see log of last command below)

Notes

  • the exception was thrown also on different local environment than Acquia DevDesktop
  • dropping/creating database blted8 didn't help, the result was the same
  • manually removing sites/default/settings.php or rename settings.default.php to settings.php of course didn't help too, as in these cases the system isn't able to find the correct DB credentials

Log of failed command

` [drush] Executing '/Users/lubomirculen/Sites/blted8/vendor/bin/drush @self --site-name="BLTed 8" --site-mail="[email protected]" --account-name="admin" --account-pass="admin" --account-mail="[email protected]" --l="default" --nocolor --root=/Users/lubomirculen/Sites/blted8/docroot --yes --verbose site-install "lightning" "install_configure_form.update_status_module='array(FALSE,FALSE)'"'...
Executing: mysql --defaults-extra-file=/private/tmp/drush_E7d0ia --database=blted8 --host=localhost --port=3306 --silent < /private/tmp/drush_vpBYe1 > /dev/null
Sites directory /Users/lubomirculen/Sites/blted8/docroot/sites/default already exists - proceeding. [notice]
Executing: mysql --defaults-extra-file=/private/tmp/drush_1IIO3R --database=blted8 --host=localhost --port=3306 --silent < /private/tmp/drush_TSEOP5 > /dev/null
Executing: mysql --defaults-extra-file=/private/tmp/drush_E3hUiS --database=blted8 --host=localhost --port=3306 --silent < /private/tmp/drush_3RcF9K
Starting Drupal installation. This takes a while. Consider using the --notify global option. [ok]
Drupal\Core\Installer\Exception\AlreadyInstalledException:

    [error]

  • To start over, you must empty your existing database and copy default.settings.php over settings.php.
  • To upgrade an existing installation, proceed to the update script.
  • View your existing site.
in /Users/lubomirculen/Sites/blted8/docroot/core/includes/install.core.inc:485 Stack trace: #0 /Users/lubomirculen/Sites/blted8/docroot/core/includes/install.core.inc(112): install_begin_request(Object(Composer\Autoload\ClassLoader), Array) #1 /Users/lubomirculen/Sites/blted8/vendor/drush/drush/includes/drush.inc(726): install_drupal(Object(Composer\Autoload\ClassLoader), Array) #2 /Users/lubomirculen/Sites/blted8/vendor/drush/drush/includes/drush.inc(711): drush_call_user_func_array('install_drupal', Array) #3 /Users/lubomirculen/Sites/blted8/vendor/drush/drush/commands/core/drupal/site_install.inc(80): drush_op('install_drupal', Object(Composer\Autoload\ClassLoader), Array) #4 /Users/lubomirculen/Sites/blted8/vendor/drush/drush/commands/core/site_install.drush.inc(247): drush_core_site_install_version('lightning', Array) #5 /Users/lubomirculen/Sites/blted8/vendor/drush/drush/includes/command.inc(366): drush_core_site_install('lightning', 'install_configu...') #6 /Users/lubomirculen/Sites/blted8/vendor/drush/drush/includes/command.inc(217): _drush_invoke_hooks(Array, Array) #7 /Users/lubomirculen/Sites/blted8/vendor/drush/drush/includes/command.inc(185): drush_command('lightning', 'install_configu...') #8 /Users/lubomirculen/Sites/blted8/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(72): drush_dispatch(Array) #9 /Users/lubomirculen/Sites/blted8/vendor/drush/drush/includes/preflight.inc(68): Drush\Boot\BaseBoot->bootstrap_and_dispatch() #10 /Users/lubomirculen/Sites/blted8/vendor/drush/drush/drush.php(12): drush_main() #11 {main}

Command dispatch complete [notice]`

@grasmash
Copy link
Contributor

This is almost always caused by an issue with MySQL connectivity. Unfortunately, Drupal 8's exceptions are incredibly misleading.

I would suggest the following steps:

  1. Ensure that you've followed the steps for setting up Dev Desktop with BLT: https://github.com/acquia/blt/blob/8.x/template/readme/local-development.md#dd
  2. Ensure that the dev desktop include file is being included. Double check that the file name of your include is correct here: https://github.com/acquia/blt/blob/8.x/template/docroot/sites/default/settings.php#L731

@grasmash
Copy link
Contributor

@mirsoftacquia I am closing this issue since it has been resolved by replacing ~ with $HOME in your .bash_profile modifications. The documentation has been updated.

@mirsoftacquia
Copy link
Author

@grasmash : Please document also requirements for npm, node and bower (at least for Lightning distro, but not sure about this)

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