Problem/Motivation
After updating core (11.2.10 / 11.3.2) my site throws an exception (see below) in the config-install step.
Dug issue and tried fix from #2999061: Non interactive install with configuration overrides is broken, w/ no result.
Git-bisect showed that the commit of #3544715: Add oop support to hooks currently supported by themes is the first bad one.
Looking at that commit, the new code in ThemeInstaller sprung out.
So added debug sensors in ThemeInstaller::install(), and the call of the throwing code path.
And yes: That code path was executed roughly 100 times happily, but right after the config import called ThemeInstaller, the Exception is thrown: "Call to a member function getRequestUri() on null in Drupal\locale\LocaleLookup->resolveCacheMiss()".
Debug sensor shows that \Drupal::request() DOES return a non-null request, but the code in LocaleLookup gets NULL for $this->requestStack->getCurrentRequest().
Also, commenting out ThemeInstaller::resetSystem made that error go away.
As you can see, part of the conclusion from the issue title is plausible guesswork, so please cross-check my train of thought.
Setting critical as install-blocking regression w/ no workaround.
Steps to reproduce
Exact minimal steps not clear yet.
Proposed resolution
tbd
Remaining tasks
tbd
Additional info
Backtrace>
[Symfony\Component\Process\Exception\ProcessFailedException]
The command "ddev exec drush si --existing-config -y" failed.
Exit Code: 1(General error)
Working directory: /home/merlin/Code/geeks4change/sites/site-cp-digital
Output:
================
You are about to:
* DROP all tables in your 'db' database.
// Do you want to continue?: yes.
Error: Call to a member function getRequestUri() on null in Drupal\locale\LocaleLookup->resolveCacheMiss() (line 157 of /var/www/html/web/co
re/modules/locale/src/LocaleLookup.php).
Error Output:
================
[notice] Starting Drupal installation. This takes a while.
[notice] Performed install task: install_select_language
[notice] Performed install task: install_select_profile
[notice] Performed install task: install_load_profile
[notice] Performed install task: install_verify_requirements
[notice] Performed install task: install_verify_database_ready
[notice] Performed install task: install_base_system
[notice] Performed install task: install_bootstrap_full
[error] Error: Call to a member function getRequestUri() on null in Drupal\locale\LocaleLookup->resolveCacheMiss() (line 157 of /var/www/h
tml/web/core/modules/locale/src/LocaleLookup.php) #0 /var/www/html/web/core/lib/Drupal/Core/Cache/CacheCollector.php(149): Drupal\locale\Loc
aleLookup->resolveCacheMiss()
#1 /var/www/html/web/core/modules/locale/src/LocaleTranslation.php(123): Drupal\Core\Cache\CacheCollector->get()
#2 /var/www/html/web/core/lib/Drupal/Core/StringTranslation/TranslationManager.php(92): Drupal\locale\LocaleTranslation->getStringTranslatio
n()
#3 /var/www/html/web/modules/contrib/translation_bliss/modules/translation_bliss_config/src/ConfigOverride/TranslationBlissConfigTranslator.
php(91): Drupal\Core\StringTranslation\TranslationManager->getStringTranslation()
#4 /var/www/html/web/modules/contrib/translation_bliss/modules/translation_bliss_config/src/ConfigOverride/TranslationBlissConfigOverride.ph
p(82): Drupal\translation_bliss_config\ConfigOverride\TranslationBlissConfigTranslator->getTranslatableConfig()
#5 /var/www/html/web/core/lib/Drupal/Core/Config/ConfigFactory.php(209): Drupal\translation_bliss_config\ConfigOverride\TranslationBlissConf
igOverride->loadOverrides()
#6 /var/www/html/web/core/lib/Drupal/Core/Config/ConfigFactory.php(169): Drupal\Core\Config\ConfigFactory->loadOverrides()
#7 /var/www/html/web/core/lib/Drupal/Core/Config/ConfigFactory.php(136): Drupal\Core\Config\ConfigFactory->doLoadMultiple()
#8 /var/www/html/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(163): Drupal\Core\Config\ConfigFactory->loadMultiple()
#9 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(340): Drupal\Core\Config\Entity\ConfigEntityStorage->doLoadMultiple()
#10 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(267): Drupal\Core\Entity\EntityStorageBase->loadMultiple()
#11 /var/www/html/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(375): Drupal\Core\Entity\EntityStorageBase->load()
#12 /var/www/html/web/core/lib/Drupal/Core/Config/ConfigImporter.php(1096): Drupal\Core\Config\Entity\ConfigEntityStorage->importDelete()
#13 /var/www/html/web/core/lib/Drupal/Core/Config/ConfigImporter.php(875): Drupal\Core\Config\ConfigImporter->importInvokeOwner()
#14 /var/www/html/web/core/lib/Drupal/Core/Config/ConfigImporter.php(675): Drupal\Core\Config\ConfigImporter->processConfiguration()
#15 /var/www/html/web/core/lib/Drupal/Core/Config/ConfigImporter.php(569): Drupal\Core\Config\ConfigImporter->processConfigurations()
#16 /var/www/html/web/core/lib/Drupal/Core/Config/Importer/ConfigImporterBatch.php(31): Drupal\Core\Config\ConfigImporter->doSyncStep()
#17 /var/www/html/web/core/includes/batch.inc(300): Drupal\Core\Config\Importer\ConfigImporterBatch::process()
#18 /var/www/html/web/core/includes/form.inc(840): _batch_process()
#19 /var/www/html/web/core/includes/install.core.inc(647): batch_process()
#20 /var/www/html/web/core/includes/install.core.inc(565): install_run_task()
#21 /var/www/html/web/core/includes/install.core.inc(122): install_run_tasks()
#22 /var/www/html/vendor/drush/drush/includes/drush.inc(69): install_drupal()
#23 /var/www/html/vendor/drush/drush/includes/drush.inc(53): drush_call_user_func_array()
#24 /var/www/html/vendor/drush/drush/src/Commands/core/SiteInstallCommands.php(174): drush_op()
#25 [internal function]: Drush\Commands\core\SiteInstallCommands->install()
#26 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array()
#27 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->run
CommandCallback()
#28 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(175): Consolidation\AnnotatedCommand\CommandProcessor->val
idateRunAndAlter()
#29 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(389): Consolidation\AnnotatedCommand\CommandProcessor->pro
cess()
#30 /var/www/html/vendor/symfony/console/Command/Command.php(341): Consolidation\AnnotatedCommand\AnnotatedCommand->execute()
#31 /var/www/html/vendor/symfony/console/Application.php(1102): Symfony\Component\Console\Command\Command->run()
#32 /var/www/html/vendor/drush/drush/src/Application.php(201): Symfony\Component\Console\Application->doRunCommand()
#33 /var/www/html/vendor/symfony/console/Application.php(356): Drush\Application->doRunCommand()
#34 /var/www/html/vendor/symfony/console/Application.php(195): Symfony\Component\Console\Application->doRun()
#35 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(113): Symfony\Component\Console\Application->run()
#36 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun()
#37 /var/www/html/vendor/drush/drush/drush.php(140): Drush\Runtime\Runtime->run()
#38 /var/www/html/vendor/bin/drush.php(119): include('...')
#39 {main}.
Error: Call to a member function getRequestUri() on null in /var/www/html/web/core/modules/locale/src/LocaleLookup.php on line 157 #0 /var/w
ww/html/web/core/lib/Drupal/Core/Cache/CacheCollector.php(149): Drupal\locale\LocaleLookup->resolveCacheMiss()
#1 /var/www/html/web/core/modules/locale/src/LocaleTranslation.php(123): Drupal\Core\Cache\CacheCollector->get()
#2 /var/www/html/web/core/lib/Drupal/Core/StringTranslation/TranslationManager.php(92): Drupal\locale\LocaleTranslation->getStringTranslatio
n()
#3 /var/www/html/web/modules/contrib/translation_bliss/modules/translation_bliss_config/src/ConfigOverride/TranslationBlissConfigTranslator.
php(91): Drupal\Core\StringTranslation\TranslationManager->getStringTranslation()
#4 /var/www/html/web/modules/contrib/translation_bliss/modules/translation_bliss_config/src/ConfigOverride/TranslationBlissConfigOverride.ph
p(82): Drupal\translation_bliss_config\ConfigOverride\TranslationBlissConfigTranslator->getTranslatableConfig()
#5 /var/www/html/web/core/lib/Drupal/Core/Config/ConfigFactory.php(209): Drupal\translation_bliss_config\ConfigOverride\TranslationBlissConf
igOverride->loadOverrides()
#6 /var/www/html/web/core/lib/Drupal/Core/Config/ConfigFactory.php(169): Drupal\Core\Config\ConfigFactory->loadOverrides()
#7 /var/www/html/web/core/lib/Drupal/Core/Config/ConfigFactory.php(136): Drupal\Core\Config\ConfigFactory->doLoadMultiple()
#8 /var/www/html/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(163): Drupal\Core\Config\ConfigFactory->loadMultiple()
#9 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(340): Drupal\Core\Config\Entity\ConfigEntityStorage->doLoadMultiple()
#10 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(267): Drupal\Core\Entity\EntityStorageBase->loadMultiple()
#11 /var/www/html/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(375): Drupal\Core\Entity\EntityStorageBase->load()
#12 /var/www/html/web/core/lib/Drupal/Core/Config/ConfigImporter.php(1096): Drupal\Core\Config\Entity\ConfigEntityStorage->importDelete()
#13 /var/www/html/web/core/lib/Drupal/Core/Config/ConfigImporter.php(875): Drupal\Core\Config\ConfigImporter->importInvokeOwner()
#14 /var/www/html/web/core/lib/Drupal/Core/Config/ConfigImporter.php(675): Drupal\Core\Config\ConfigImporter->processConfiguration()
#15 /var/www/html/web/core/lib/Drupal/Core/Config/ConfigImporter.php(569): Drupal\Core\Config\ConfigImporter->processConfigurations()
#16 /var/www/html/web/core/lib/Drupal/Core/Config/Importer/ConfigImporterBatch.php(31): Drupal\Core\Config\ConfigImporter->doSyncStep()
#17 /var/www/html/web/core/includes/batch.inc(300): Drupal\Core\Config\Importer\ConfigImporterBatch::process()
#18 /var/www/html/web/core/includes/form.inc(840): _batch_process()
#19 /var/www/html/web/core/includes/install.core.inc(647): batch_process()
#20 /var/www/html/web/core/includes/install.core.inc(565): install_run_task()
#21 /var/www/html/web/core/includes/install.core.inc(122): install_run_tasks()
#22 /var/www/html/vendor/drush/drush/includes/drush.inc(69): install_drupal()
#23 /var/www/html/vendor/drush/drush/includes/drush.inc(53): drush_call_user_func_array()
#24 /var/www/html/vendor/drush/drush/src/Commands/core/SiteInstallCommands.php(174): drush_op()
#25 [internal function]: Drush\Commands\core\SiteInstallCommands->install()
#26 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array()
#27 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->run
CommandCallback()
#28 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(175): Consolidation\AnnotatedCommand\CommandProcessor->val
idateRunAndAlter()
#29 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(389): Consolidation\AnnotatedCommand\CommandProcessor->pro
cess()
#30 /var/www/html/vendor/symfony/console/Command/Command.php(341): Consolidation\AnnotatedCommand\AnnotatedCommand->execute()
#31 /var/www/html/vendor/symfony/console/Application.php(1102): Symfony\Component\Console\Command\Command->run()
#32 /var/www/html/vendor/drush/drush/src/Application.php(201): Symfony\Component\Console\Application->doRunCommand()
#33 /var/www/html/vendor/symfony/console/Application.php(356): Drush\Application->doRunCommand()
#34 /var/www/html/vendor/symfony/console/Application.php(195): Symfony\Component\Console\Application->doRun()
#35 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(113): Symfony\Component\Console\Application->run()
#36 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun()
#37 /var/www/html/vendor/drush/drush/drush.php(140): Drush\Runtime\Runtime->run()
#38 /var/www/html/vendor/bin/drush.php(119): include('...')
#39 {main}
[warning] Drush command terminated abnormally.
Failed to execute command `drush si --existing-config -y`: exit status 1
Comments
Comment #2
nicxvan commentedThis is a duplicate of: #3564735: Container / service exceptions while installed from existing config but there is some good information here, can you move it over?
Comment #4
geek-merlinWoot! Great pointer.
Yes, i will bring that other issue a bit in shape.