Describe your bug or feature request.

Just updated to latest version and have wsod for every page on site. When trying to run drush updb get this error:

In Container.php line 222: Circular reference detected for service "Drupal\Core\Logger\LoggerChannelFactoryInterface", path: "advancedqueue.processor -> logger.channel.cron -> Drupal\Core\Logger\LoggerChannelFactoryInterface -> Drupal\commerce_order\Hook\CommerceOrderHooks -> form_buil  
  der -> form_validator -> logger.channel.form -> Drupal\Core\Logger\LoggerChannelFactoryInterface".

And here is wsod with stacktrace:

The website encountered an unexpected error. Try again later.

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "Drupal\commerce\Hook\CommerceThemeHooks". Did you mean this: "Drupal\token\Hook\TokenThemeHooks"? in Drupal\Component\DependencyInjection\Container->get() (line 159 of core/lib/Drupal/Component/DependencyInjection/Container.php).
Drupal::service('Drupal\commerce\Hook\CommerceThemeHooks') (Line: 19)
commerce_theme(Array, 'module', 'commerce', 'modules/contrib/commerce') (Line: 507)
Drupal\Core\Theme\Registry->processExtension(Array, 'commerce', 'module', 'commerce', 'modules/contrib/commerce') (Line: 400)
Drupal\Core\Theme\Registry->Drupal\Core\Theme\{closure}(Object, 'commerce') (Line: 395)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('theme', Object) (Line: 399)
Drupal\Core\Theme\Registry->build() (Line: 281)
Drupal\Core\Theme\Registry->get() (Line: 88)
Drupal\Core\Utility\ThemeRegistry->initializeRegistry() (Line: 69)
Drupal\Core\Utility\ThemeRegistry->__construct('theme_registry:runtime:claro', Object, Object, Array, 1) (Line: 319)
Drupal\Core\Theme\Registry->getRuntime() (Line: 141)
Drupal\Core\Theme\ThemeManager->render('admin_block_content', Array) (Line: 490)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 248)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 238)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 637)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 231)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 128)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 186)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 53)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 61)
Drupal\advban\AdvbanMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 741)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Drupal version 10.6.3, PHP 8.3.15, Apache 2.4.62 (Debian) and MySQL DB 8.4.3

CommentFileSizeAuthor
#70 backtrace.txt10.07 KBmediengenosse

Issue fork commerce-3573220

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sidgrafix created an issue. See original summary.

sidgrafix’s picture

Just to add a note, I'm pretty sure it has to do with the switch to #[LegacyHook] - It doesn't work...not with Drupal 10 - I know docs say otherwise but I have actually had the same issue with a custom module while preparing it for drupal 11 but keeping backwards compatibility with 10.6.x because the site itself isn't ready to flip to 11 yet and got similar wsod's because of it.

jsacksick’s picture

Rebuilding caches doesn't work? I haven't experienced this myself...

sidgrafix’s picture

No - running any drush commands ('drush updb', 'drush cr', 'drush rebuild', "drush status' etc, etc) just gives this same response and does nothing:

In Container.php line 222:
                                                                                                                                                                                                                                                                       
  Circular reference detected for service "Drupal\Core\Logger\LoggerChannelFactoryInterface", path: "advancedqueue.processor -> logger.channel.cron -> Drupal\Core\Logger\LoggerChannelFactoryInterface -> Drupal\commerce_order\Hook\CommerceOrderHooks -> form_buil  
  der -> form_validator -> logger.channel.form -> Drupal\Core\Logger\LoggerChannelFactoryInterface".

I had to downgrade back to 3.2 just to get the site back and drush functions working again.

jsacksick’s picture

It seems advancedqueue is in the backtrace... WHich version are you running? Because I've been testing Commerce dev before tagging on a local D10 install, which had advancedqueue installed, and never experienced this...

sidgrafix’s picture

I have the latest version of advancedqueue module running 8.x-1.5 and has been since august of 2025. The only other thing I can note is that commerce shipping is not used or installed and never was (as it is not required - for the site in question), I only mention it because of all the notes regarding updating to commerce 3.3 eg: update commerce shipping to 3 before or at the same time as updating to commerce 3.3 etc, etc..

fraserthompson’s picture

I'm getting a circular dependency error too on 3.3.0, but the conflict is with a different module.

Circular reference detected for service "Drupal\commerce_cart\Hook\CommerceCartHooks", path: "salesforce.client -> Drupal\commerce_cart\Hook\CommerceCartHooks -> commerce_cart.cart_provider -> commerce_store.current_store -> Drupal\commerce_cart\Hook\CommerceCartHooks".

I think the gradual shift to attribute based hooks has caused circular dependencies to pop up in a number of modules (I also experienced this one https://www.drupal.org/project/symfony_mailer/issues/3564298). That's the cause, but it's not necessarily who's at fault.

In my case the salesforce.client thing was a red herring and it was actually caused by my custom store resolver. I resolved it by replacing service dependency injection with container dependency injection, so maybe that might help in other cases too.

edit: Spoke too soon, now I'm getting another circular dependency error with commerce_price:

PHP message: Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: Circular reference detected for service "serializer", path: "jsonapi.resource_response.subscriber -> jsonapi.serializer -> serializer -> commerce_price.currency_formatter -> serialization.exception.default". in /opt/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 147 #0 /opt/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(426): Drupal\Component\DependencyInjection\Container->get('serializer', 1)

Might stick with 3.2.0 for now.

bobburns’s picture

The fidst time it made it to the database update but I forgot the ludwig files, then it threw an error trying to get them

Never got that far again I got several different errors.

I uninstalled features but did not try to upgrade again and just boogied the info y for now on 3.2.0

In Container.php line 149:

Circular reference detected for service "Drupal\commerce_cart\Hook\Commerce
CartHooks", path: "twig -> twig.extension -> date.formatter -> Drupal\comme
rce_cart\Hook\CommerceCartHooks -> commerce_cart.cart_provider -> commerce_
store.current_store -> commerce_store.chain_store_resolver -> commerce_stor
e_domain.store_domain_resolver".

and

The website encountered an unexpected error. Try again later.
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "Drupal\commerce_number_pattern\Hook\CommerceNumberPatternTokenHooks". in Drupal\Component\DependencyInjection\Container->get() (line 159 of core/lib/Drupal/Component/DependencyInjection/Container.php).
Drupal\Component\DependencyInjection\Container->get() (Line: 195)
Drupal::service() (Line: 34)
commerce_number_pattern_tokens() (Line: 53)
Drupal\hook_event_dispatcher\HookEventDispatcherModuleHandler::{closure:Drupal\hook_event_dispatcher\HookEventDispatcherModuleHandler::invokeAll():52}() (Line: 395)
Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 68)
Drupal\hook_event_dispatcher\HookEventDispatcherModuleHandler->invokeAllWith() (Line: 52)
Drupal\hook_event_dispatcher\HookEventDispatcherModuleHandler->invokeAll() (Line: 368)
Drupal\Core\Utility\Token->generate() (Line: 245)
Drupal\Core\Utility\Token->doReplace() (Line: 195)
Drupal\Core\Utility\Token->replace() (Line: 19)
Drupal\token_or\Token->replace() (Line: 66)
Drupal\metatag\MetatagToken->replace() (Line: 791)
Drupal\metatag\MetatagManager->processTagValue() (Line: 634)
Drupal\metatag\MetatagManager->generateRawElements() (Line: 573)
Drupal\metatag\MetatagManager->generateElements() (Line: 510)
metatag_get_tags_from_route() (Line: 438)
metatag_preprocess_html()
call_user_func_array() (Line: 261)
Drupal\Core\Theme\ThemeManager->render() (Line: 490)
Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 153)
Drupal\Core\Render\Renderer->{closure:Drupal\Core\Render\Renderer::renderRoot():152}() (Line: 637)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 152)
Drupal\Core\Render\Renderer->renderRoot() (Line: 66)
Drupal\Core\Render\BareHtmlPageRenderer->renderBarePage() (Line: 76)
Drupal\Core\ProxyClass\Render\BareHtmlPageRenderer->renderBarePage() (Line: 196)

And

In Container.php line 149:

Circular reference detected for service "Drupal\commerce_cart\Hook\Commerce
CartHooks", path: "features_assigner -> Drupal\commerce_cart\Hook\CommerceC
artHooks -> commerce_cart.cart_provider -> commerce_store.current_store ->
commerce_store.chain_store_resolver -> commerce_store_domain.store_domain_r
esolver".

Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: Circular reference detected for service "Drupal\commerce_cart\Hook\CommerceCartHooks", path: "simple_sitemap.views.argument_collector -> simple_sitemap.views -> Drupal\commerce_cart\Hook\CommerceCartHooks -> commerce_cart.cart_provider -> commerce_store.current_store -> commerce_store.chain_store_resolver -> commerce_store_domain.store_domain_resolver". in /var/www/public_html/core/lib/Drupal/Component/DependencyInjection/Container.php on line 149

jsacksick’s picture

@bobburns: For:

Circular reference detected for service "Drupal\commerce_cart\Hook\Commerce
CartHooks", path: "features_assigner -> Drupal\commerce_cart\Hook\CommerceC
artHooks -> commerce_cart.cart_provider -> commerce_store.current_store ->
commerce_store.chain_store_resolver -> commerce_store_domain.store_domain_r
esolver".

Can you try updating the commerce_store_domain module to the latest version? Just tagged a new release hoping to fix this.

Regarding:
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "Drupal\commerce_number_pattern\Hook\CommerceNumberPatternTokenHooks".
This might be due to the fact that you can properly rebuild caches due to the circular dependency issue.

Let me know how this goes.

You'll likely experience other issues due to the FeaturesAssigner service, specifically the following logic from the constructor:

   $this->request = $request_stack->getCurrentRequest();
    $this->bundles = $this->getBundleList();
    $this->currentBundle = $this->getBundle(FeaturesBundleInterface::DEFAULT_BUNDLE);
    // Ensure bundle information is fresh.
    $this->createBundlesFromPackages();
jsacksick’s picture

@sidgrafix: I have Advancedqueue and Commerce core 3.3.0 on both a D10 and a D11 install and not experiencing this... Not sure why it is behaving differently on your install. Do you have any custom code on your site? Usually this is due to constructors relying on a service too early. (For example instantiating getting the storage from the entity type manager).

@fraserthompson: Do you have custom code on your project? Or JSONAPI contrib modules? I have Commerce core 3.3.0 running on a project heavily relying on JSONAPI (and Commerce API too) and not experiencing this :(.

jsacksick’s picture

@sidgrafix: Pretty sure Advancedqueue mentioned in the backtrace is a red herring, but could you try upgrading Advancedqueue to 1.6 (See https://www.drupal.org/project/advancedqueue/releases/8.x-1.6). See if that helps, by any chance?

@fraserthompson:

In my case the salesforce.client thing was a red herring and it was actually caused by my custom store resolver. I resolved it by replacing service dependency injection with container dependency injection, so maybe that might help in other cases too.

Were you instantating an entity storage from the constructor?
Could you copy paste how your constructor looks like (prior to the change)?

pandepoulus’s picture

I have advancequeue 1.6 and updating commerce from 3.2 to 3.3 causes the circular dependency issue with drush updb. I just returned to 3.2, but to confirm issue with advancequeue last version.
Kind Regards.

jsacksick’s picture

@pandepoulus: Can you post a backtrace? Information about the modules enabled? Do you have custom code?

We need the backtrace to be able to debug this.

bobburns’s picture

Updating to commerce shipping 3.0.1 threw conflict with commerce_conditions_plus - uninstalled it

Uninstalled features

Upgraded to Advanced queue 1.6 - by command line push as GUI would not work as with domain store module also

Pushed fresh 3.20 gz file, rebuilt cache through drush

Ran update through web interface, ran packages file before database update which downloaded "intl"

Rest of update completed sucessfully to 3.3.0

But now the cart no longer works - add to cart does nothing

jsacksick’s picture

@bobburns so your issue is now fixed? Btw opened #3573432: Support Commerce Shipping 3 for allowing Commerce Conditions Plus with Commerce Shipping.

bobburns’s picture

@jsacksick No, currently now the cart no longer works - add to cart does nothing

sidgrafix’s picture

@jsacksick - updated to advanced queue 1.6 then tried to update commerce again.

Pretty much the same thing happening. Using drush cr after update prints this:

In Container.php line 149:
  Circular reference detected for service "Drupal\Core\Logger\LoggerChannelFactoryInterface", path: "asset.js.collection_optimizer -> asset.js.optimizer -> logger.channel.default -> Drupal\Core\Logger\LoggerChannelFactoryInterface -> logger.syslog -> Drupal\commerce_order\Hook\CommerceOrd  
  erHooks -> form_builder -> form_validator -> logger.channel.form".

Using drush updb prints this:

In Container.php line 222:
  Circular reference detected for service "Drupal\Core\Logger\LoggerChannelFactoryInterface", path: "advancedqueue.processor -> Drupal\Core\Logger\LoggerChannelFactoryInterface -> Drupal\commerce_order\Hook\CommerceOrderHooks -> form_builder -> form_validator -> logger.channel.form -> Dru  
  pal\Core\Logger\LoggerChannelFactoryInterface".

The first log aside from the wsod on any page is:
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "Drupal\commerce\Hook\CommerceHooks". in Drupal\Component\DependencyInjection\Container->get() (line 159 of /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php).
With stacktrace:

#0 /var/www/html/web/core/lib/Drupal.php(195): Drupal\Component\DependencyInjection\Container->get('Drupal\\commerce...')
#1 /var/www/html/web/modules/contrib/commerce/commerce.module(61): Drupal::service('Drupal\\commerce...')
#2 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(552): commerce_form_alter(Array, Object(Drupal\Core\Form\FormState), 'views_exposed_f...')
#3 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(839): Drupal\Core\Extension\ModuleHandler->alter('form', Array, Object(Drupal\Core\Form\FormState), 'views_exposed_f...')
#4 /var/www/html/web/core/lib/Drupal/Core/Form/FormBuilder.php(285): Drupal\Core\Form\FormBuilder->prepareForm('views_exposed_f...', Array, Object(Drupal\Core\Form\FormState))
#5 /var/www/html/web/core/modules/views/src/Plugin/views/exposed_form/ExposedFormPluginBase.php(157): Drupal\Core\Form\FormBuilder->buildForm('\\Drupal\\views\\F...', Object(Drupal\Core\Form\FormState))
#6 /var/www/html/web/core/modules/views/src/ViewExecutable.php(1298): Drupal\views\Plugin\views\exposed_form\ExposedFormPluginBase->renderExposedForm()
#7 /var/www/html/web/core/modules/views/src/Plugin/views/display/PathPluginBase.php(393): Drupal\views\ViewExecutable->build()
#8 /var/www/html/web/core/modules/views/src/Plugin/views/display/Page.php(198): Drupal\views\Plugin\views\display\PathPluginBase->execute()
#9 /var/www/html/web/core/modules/views/src/ViewExecutable.php(1690): Drupal\views\Plugin\views\display\Page->execute()
#10 /var/www/html/web/core/modules/views/src/Element/View.php(81): Drupal\views\ViewExecutable->executeDisplay('page', Array)
#11 [internal function]: Drupal\views\Element\View::preRenderViewElement(Array)
#12 /var/www/html/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(113): call_user_func_array(Array, Array)
#13 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(886): Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_ren...', 'exception', 'Drupal\\Core\\Ren...')
#14 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(431): Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array)
#15 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender(Array, false)
#16 /var/www/html/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(238): Drupal\Core\Render\Renderer->render(Array, false)
#17 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(637): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#18 /var/www/html/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(231): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#19 /var/www/html/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(128): Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))
#20 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))
#21 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#22 /var/www/html/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#23 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(186): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view')
#24 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#25 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#27 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#28 /var/www/html/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#29 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(116): Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#30 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(90): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#31 /var/www/html/web/modules/contrib/advban/src/AdvbanMiddleware.php(61): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#32 /var/www/html/web/core/modules/ban/src/BanMiddleware.php(50): Drupal\advban\AdvbanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#33 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#34 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#35 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#36 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#37 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#38 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#39 {main}

Only difference this time was this time if I retired a page that was wsod it would then display - but commerce won't update same issues.

I went back through logs from yesterday and had these from yesterdays try on installation:
Type PHP:
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "Drupal\commerce_log\Hook\CommerceLogHooks". in Drupal\Component\DependencyInjection\Container->get() (line 159 of /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php).

Followed by a bunch of cron related in regards to commerce (when cron/simple_cron tries to execute):

Too few arguments to function Drupal\commerce_promotion\PromotionOrderProcessor::__construct(), 2 passed in /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 261 and exactly 3 expected

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "Drupal\commerce\Hook\CommerceHooks". in Drupal\Component\DependencyInjection\Container->get() (line 159 of /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php).
***WITH TRACE:
#0 /var/www/html/web/core/lib/Drupal.php(195): Drupal\Component\DependencyInjection\Container->get('Drupal\\commerce...')
#1 /var/www/html/web/modules/contrib/commerce/commerce.module(191): Drupal::service('Drupal\\commerce...')
#2 [internal function]: commerce_cron()
#3 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(407): call_user_func_array(Object(Closure), Array)
#4 /var/www/html/web/modules/contrib/simple_cron/src/Plugin/SimpleCron/Cron.php(91): Drupal\Core\Extension\ModuleHandler->invoke('commerce', 'cron')
#5 /var/www/html/web/modules/contrib/simple_cron/src/Entity/CronJob.php(344): Drupal\simple_cron\Plugin\SimpleCron\Cron->process()
#6 /var/www/html/web/modules/contrib/simple_cron/src/SimpleCron.php(102): Drupal\simple_cron\Entity\CronJob->run(1770915602, false)
#7 /var/www/html/web/modules/contrib/simple_cron/src/ProxyClass/SimpleCron.php(70): Drupal\simple_cron\SimpleCron->run()
#8 /var/www/html/web/core/modules/system/src/CronController.php(38): Drupal\simple_cron\ProxyClass\SimpleCron->run()
#9 [internal function]: Drupal\system\CronController->run()
#10 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#11 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(637): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#12 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#13 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#14 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#15 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#16 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#17 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /var/www/html/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(201): Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#21 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(138): Drupal\page_cache\StackMiddleware\PageCache->fetch(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#22 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(87): Drupal\page_cache\StackMiddleware\PageCache->lookup(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#23 /var/www/html/web/modules/contrib/advban/src/AdvbanMiddleware.php(61): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 /var/www/html/web/core/modules/ban/src/BanMiddleware.php(50): Drupal\advban\AdvbanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#27 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#28 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#29 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#30 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#31 {main}

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "Drupal\commerce_promotion\Hook\CommercePromotionHooks". in Drupal\Component\DependencyInjection\Container->get() (line 159 of /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php).
*** WITH TRACE:
#0 /var/www/html/web/core/lib/Drupal.php(195): Drupal\Component\DependencyInjection\Container->get('Drupal\\commerce...')
#1 /var/www/html/web/modules/contrib/commerce/modules/promotion/commerce_promotion.module(95): Drupal::service('Drupal\\commerce...')
#2 [internal function]: commerce_promotion_cron()
#3 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(407): call_user_func_array(Object(Closure), Array)
#4 /var/www/html/web/modules/contrib/simple_cron/src/Plugin/SimpleCron/Cron.php(91): Drupal\Core\Extension\ModuleHandler->invoke('commerce_promot...', 'cron')
#5 /var/www/html/web/modules/contrib/simple_cron/src/Entity/CronJob.php(344): Drupal\simple_cron\Plugin\SimpleCron\Cron->process()
#6 /var/www/html/web/modules/contrib/simple_cron/src/SimpleCron.php(102): Drupal\simple_cron\Entity\CronJob->run(1770915602, false)
#7 /var/www/html/web/modules/contrib/simple_cron/src/ProxyClass/SimpleCron.php(70): Drupal\simple_cron\SimpleCron->run()
#8 /var/www/html/web/core/modules/system/src/CronController.php(38): Drupal\simple_cron\ProxyClass\SimpleCron->run()
#9 [internal function]: Drupal\system\CronController->run()
#10 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#11 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(637): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#12 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#13 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#14 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#15 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#16 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#17 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /var/www/html/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(201): Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#21 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(138): Drupal\page_cache\StackMiddleware\PageCache->fetch(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#22 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(87): Drupal\page_cache\StackMiddleware\PageCache->lookup(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#23 /var/www/html/web/modules/contrib/advban/src/AdvbanMiddleware.php(61): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 /var/www/html/web/core/modules/ban/src/BanMiddleware.php(50): Drupal\advban\AdvbanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#27 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#28 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#29 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#30 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#31 {main}

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "Drupal\commerce_cart\Hook\CommerceCartHooks". in Drupal\Component\DependencyInjection\Container->get() (line 159 of /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php).
*** WITH TRACE:
#0 /var/www/html/web/core/lib/Drupal.php(195): Drupal\Component\DependencyInjection\Container->get('Drupal\\commerce...')
#1 /var/www/html/web/modules/contrib/commerce/modules/cart/commerce_cart.module(27): Drupal::service('Drupal\\commerce...')
#2 [internal function]: commerce_cart_cron()
#3 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(407): call_user_func_array(Object(Closure), Array)
#4 /var/www/html/web/modules/contrib/simple_cron/src/Plugin/SimpleCron/Cron.php(91): Drupal\Core\Extension\ModuleHandler->invoke('commerce_cart', 'cron')
#5 /var/www/html/web/modules/contrib/simple_cron/src/Entity/CronJob.php(344): Drupal\simple_cron\Plugin\SimpleCron\Cron->process()
#6 /var/www/html/web/modules/contrib/simple_cron/src/SimpleCron.php(102): Drupal\simple_cron\Entity\CronJob->run(1770915603, false)
#7 /var/www/html/web/modules/contrib/simple_cron/src/ProxyClass/SimpleCron.php(70): Drupal\simple_cron\SimpleCron->run()
#8 /var/www/html/web/core/modules/system/src/CronController.php(38): Drupal\simple_cron\ProxyClass\SimpleCron->run()
#9 [internal function]: Drupal\system\CronController->run()
#10 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#11 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(637): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#12 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#13 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#14 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#15 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#16 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#17 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#18 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /var/www/html/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(201): Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#21 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(138): Drupal\page_cache\StackMiddleware\PageCache->fetch(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#22 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(87): Drupal\page_cache\StackMiddleware\PageCache->lookup(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#23 /var/www/html/web/modules/contrib/advban/src/AdvbanMiddleware.php(61): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 /var/www/html/web/core/modules/ban/src/BanMiddleware.php(50): Drupal\advban\AdvbanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#27 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#28 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#29 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#30 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#31 {main}

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "Drupal\commerce\Hook\CommerceThemeHooks". Did you mean this: "Drupal\token\Hook\TokenThemeHooks"? in Drupal\Component\DependencyInjection\Container->get() (line 159 of /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php).
*** WITH TRACE:
#0 /var/www/html/web/core/lib/Drupal.php(195): Drupal\Component\DependencyInjection\Container->get('Drupal\\commerce...')
#1 /var/www/html/web/modules/contrib/commerce/commerce.module(19): Drupal::service('Drupal\\commerce...')
#2 /var/www/html/web/core/lib/Drupal/Core/Theme/Registry.php(507): commerce_theme(Array, 'module', 'commerce', 'modules/contrib...')
#3 /var/www/html/web/core/lib/Drupal/Core/Theme/Registry.php(400): Drupal\Core\Theme\Registry->processExtension(Array, 'commerce', 'module', 'commerce', 'modules/contrib...')
#4 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(395): Drupal\Core\Theme\Registry->Drupal\Core\Theme\{closure}(Object(Closure), 'commerce')
#5 /var/www/html/web/core/lib/Drupal/Core/Theme/Registry.php(399): Drupal\Core\Extension\ModuleHandler->invokeAllWith('theme', Object(Closure))
#6 /var/www/html/web/core/lib/Drupal/Core/Theme/Registry.php(281): Drupal\Core\Theme\Registry->build()
#7 /var/www/html/web/core/lib/Drupal/Core/Utility/ThemeRegistry.php(88): Drupal\Core\Theme\Registry->get()
#8 /var/www/html/web/core/lib/Drupal/Core/Utility/ThemeRegistry.php(69): Drupal\Core\Utility\ThemeRegistry->initializeRegistry()
#9 /var/www/html/web/core/lib/Drupal/Core/Theme/Registry.php(319): Drupal\Core\Utility\ThemeRegistry->__construct('theme_registry:...', Object(Drupal\Core\Cache\ChainedFastBackend), Object(Drupal\Core\ProxyClass\Lock\DatabaseLockBackend), Array, true)
#10 /var/www/html/web/core/lib/Drupal/Core/Theme/ThemeManager.php(141): Drupal\Core\Theme\Registry->getRuntime()
#11 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(490): Drupal\Core\Theme\ThemeManager->render('email', Array)
#12 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender(Array, true)
#13 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(165): Drupal\Core\Render\Renderer->render(Array, true)
#14 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(637): Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}()
#15 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(164): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#16 /var/www/html/web/modules/contrib/symfony_mailer/src/Email.php(550): Drupal\Core\Render\Renderer->renderInIsolation(Array)
#17 /var/www/html/web/modules/contrib/symfony_mailer/src/Mailer.php(233): Drupal\symfony_mailer\Email->render()
#18 /var/www/html/web/modules/contrib/symfony_mailer/src/Mailer.php(149): Drupal\symfony_mailer\Mailer->doSend(Object(Drupal\symfony_mailer\Email))
#19 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(637): Drupal\symfony_mailer\Mailer->Drupal\symfony_mailer\{closure}()
#20 /var/www/html/web/modules/contrib/symfony_mailer/src/Mailer.php(147): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#21 /var/www/html/web/modules/contrib/symfony_mailer/src/Email.php(301): Drupal\symfony_mailer\Mailer->send(Object(Drupal\symfony_mailer\Email))
#22 /var/www/html/web/modules/contrib/symfony_mailer/src/MailManagerReplacement.php(92): Drupal\symfony_mailer\Email->send()
#23 /var/www/html/web/core/modules/update/update.fetch.inc(44): Drupal\symfony_mailer\MailManagerReplacement->mail('update', 'status_notify', 'dummy', 'en', Array)
#24 /var/www/html/web/core/modules/update/update.module(188): _update_cron_notify()
#25 [internal function]: update_cron()
#26 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(407): call_user_func_array(Object(Closure), Array)
#27 /var/www/html/web/modules/contrib/simple_cron/src/Plugin/SimpleCron/Cron.php(91): Drupal\Core\Extension\ModuleHandler->invoke('update', 'cron')
#28 /var/www/html/web/modules/contrib/simple_cron/src/Entity/CronJob.php(344): Drupal\simple_cron\Plugin\SimpleCron\Cron->process()
#29 /var/www/html/web/modules/contrib/simple_cron/src/SimpleCron.php(102): Drupal\simple_cron\Entity\CronJob->run(1770915603, false)
#30 /var/www/html/web/modules/contrib/simple_cron/src/ProxyClass/SimpleCron.php(70): Drupal\simple_cron\SimpleCron->run()
#31 /var/www/html/web/core/modules/system/src/CronController.php(38): Drupal\simple_cron\ProxyClass\SimpleCron->run()
#32 [internal function]: Drupal\system\CronController->run()
#33 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#34 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(637): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#35 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#36 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#37 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#38 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#39 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#40 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#41 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#42 /var/www/html/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#43 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(201): Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#44 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(138): Drupal\page_cache\StackMiddleware\PageCache->fetch(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#45 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(87): Drupal\page_cache\StackMiddleware\PageCache->lookup(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#46 /var/www/html/web/modules/contrib/advban/src/AdvbanMiddleware.php(61): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#47 /var/www/html/web/core/modules/ban/src/BanMiddleware.php(50): Drupal\advban\AdvbanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#48 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#49 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#50 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#51 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#52 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#53 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#54 {main}

There may have been others - but I dumped logs just before trying to update commerce again. Although being I can access the status page today after attempted update 2 errors report 1 database update (as that just won't run) and entity/field definitions reporting mismatches in regards to payments listing the Created field and Changed field needs to be installed.

So back to 3.2 for me.. Hope that helps some! I still think this is directly related to using #[LegacyHook]

jsacksick’s picture

I'd comment out the problematic services from the hook constructors. (For example the FormBuilder from CommerceOrderHooks), or even temporarily remove constructor entirely, then rebuild caches, then put them back, and rebuild caches again.

I have Commerce 3.3 running on a D10 install without any issue.

mkalkbrenner’s picture

I updated commerce today and we run in similar issues with Drupal 11.3:
Circular reference detected for service "Drupal\commerce_cart\Hook\CommerceCartHooks", path: "default_content_deploy.exporter -> serializer -> Drupal\commerce_cart\Hook\CommerceCartHooks -> commerce_cart.cart_provider -> commerce_store.current_store -> Drupal\commerce_cart\Hook\CommerceCartHooks".

Neither drush cr nor drush updb are working.

jsacksick’s picture

@mkalkbrenner: Hm... That's really odd... We have tests passing, we already have Commerce 3.3.0 running on multiple production sites.
What if you temporarily remove the constructor from CommerceCartHooks, rebuild caches, then put the contructor back? Does the issue go away? (Repeat the operation for any problematic hook service if another issue arises). I'm just curious if the issue goes away once the caches are rebuilt.

mkalkbrenner’s picture

Priority: Major » Critical

OK, after inspecting the stack traces, I can get drush cr and drush updb to work locally without any change to commerce_cart.
In our setup it required two changes to the constructors of the masquarde and the simplenews module:

Masquerade.php:

  public function __construct(AccountInterface $current_user, EntityTypeManagerInterface $entity_type_manager, ModuleHandlerInterface $module_handler, SessionManagerInterface $session_manager, SessionInterface $session, LoggerInterface $logger, PermissionHandlerInterface $permission_handler) {
    $this->currentUser = $current_user;
    //$this->userStorage = $entity_type_manager->getStorage('user');
    $this->moduleHandler = $module_handler;
    $this->sessionManager = $session_manager;
    $this->logger = $logger;
    $this->permissionHandler = $permission_handler;
    $this->session = $session;
  }

Simplenews' SubscriptionManager.php:

  public function __construct(LanguageManagerInterface $language_manager, ConfigFactoryInterface $config_factory, EntityTypeManagerInterface $entity_type_manager, RouteMatchInterface $route_match, TimeInterface $time, AccountInterface $current_user) {
    $this->languageManager = $language_manager;
    $this->config = $config_factory->get('simplenews.settings');
    $this->routeMatch = $route_match;
    $this->time = $time;
    $this->currentUser = $current_user;
    //$this->subscriberStorage = $entity_type_manager->getStorage('simplenews_subscriber');
    //$this->historyStorage = $entity_type_manager->getStorage('simplenews_subscriber_history');
  }

Commenting out these getStorage() calls in the constructors of the services of these two modules gets commerce to work.
I think that this might be the pattern.

mkalkbrenner’s picture

#3572640: Do not perform logic in constructors is already targeting the issue for Masquerade. I also opened a new issue for simplenews.
But I'm sure that this (anti-) pattern is used a lot in contrib or custom modules. So the question is if anything can be done within commerce to avoid the circular references?

jsacksick’s picture

Commenting out these getStorage() calls in the constructors of the services of these two modules gets commerce to work.
I think that this might be the pattern.

This is exactly what I was suspecting as I fixed several of the constructors in Commerce as well.

What I don't understand is, in one of the backtrace shared I noticed the simple_sitemap_views which has the following:

  public function __construct(
    EntityTypeManagerInterface $entity_type_manager,
    ConfigFactoryInterface $config_factory,
    QueueFactory $queue_factory,
    Connection $database,
  ) {
    $this->viewStorage = $entity_type_manager->getStorage('view');
    $this->configFactory = $config_factory;
    $this->queueFactory = $queue_factory;
    $this->database = $database;
  }

I wanted to open an issue in the simple_sitemap module with a patch, but enabling the module on an install that runs Commerce 3.3.0 didn't cause any issue, so I didn't open the issue in the end.

I noticed the FeaturesAssigner service (from the Features module) is doing a lot too, but I didn't have bandwith to fix it:
https://git.drupalcode.org/project/features/-/blame/8.x-3.x/src/Features... but I have no idea if this is actually causing issues or not.

So the question is if anything can be done within commerce to avoid the circular references?

I don't think so... Symfony is triggering this error. But if this is affecting Commerce, I'm pretty sure this affects potentially every module that converted to OOP hooks, so Drupal core is going to have to find a way to circumvent this issue... or we'd need to revert to legacy hooks, which to me is kind out of the equation for now... As reverting these changes would be really time consuming...

sah62’s picture

I'm seeing similar errors with Drupal 11.3.3 and Commerce Core 3.3.0:

$ drush updb

In Container.php line 214:

  Circular reference detected for service "Drupal\commerce_order\Hook\CommerceOrderHooks", path: "search_api_solr.command_helper -> Drupa
  l\commerce_order\Hook\CommerceOrderHooks -> form_builder -> form_validator -> logger.channel.form -> Drupal\Core\Logger\LoggerChannelFa
  ctoryInterface -> Drupal\commerce_order\Hook\CommerceOrderHooks".


$ drush cr

In Container.php line 147:

  Circular reference detected for service "Drupal\Core\Logger\LoggerChannelFactoryInterface", path: "asset.js.collection_optimizer -> ass
  et.js.optimizer -> logger.channel.default -> Drupal\Core\Logger\LoggerChannelFactoryInterface -> logger.syslog -> Drupal\commerce_order
  \Hook\CommerceOrderHooks -> form_builder -> form_validator -> logger.channel.form".


$

what exactly do I need to comment out to eliminate these errors?

jsacksick’s picture

@sah62: Try temporarily removing the constructor from CommerceOrderHooks? (Just out of curiosity as I can't reproduce the issue).
Rebuild caches, then put back the constructor

mkalkbrenner’s picture

Rebuild caches, then put back the constructor

That didn't help here.

I don't think so... Symfony is triggering this error. But if this is affecting Commerce, I'm pretty sure this affects potentially every module that converted to OOP hooks, so Drupal core is going to have to find a way to circumvent this issue... or we'd need to revert to legacy hooks, which to me is kind out of the equation for now... As reverting these changes would be really time consuming...

We converted a lot of hooks in to OOP hooks over the last months. We also switched to attributes and fixed a huge amount of PHP8.4 deprecations. We did that across different projects with a lot of custom code and lot of contrib modules.
If I roll-back to Commerce 3.2, everything runs fine. Just Commerce 3.3 is trigering the issue.

But don't get me wrong. I consider the loading a storage in the constructor a bad design nad that should be fixed everywhere. But ther must be something in commerce itself. Regarding which drush command I'm. executing, I get different error messages. The message always starts with Circular reference detected for service "Drupal\commerce_cart\Hook\CommerceCartHooks", but dependency path is different. Sometimes it starts with twig, another contrib module or something from core.
But this path sometimes occurs as part of the error message and is suspicious:

Drupal\commerce_cart\Hook\CommerceCartHooks -> commerce_cart.cart_provider -> commerce_store.current_store -> Drupal\commerce_cart\Hook\CommerceCartHooks

It clearly is a circular reference, even if only triggered if a stirage gets loaded in a constructor, in this case the one of the Subcriber History:

  [Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException]                                                                                                       
  Circular reference detected for service "Drupal\commerce_cart\Hook\CommerceCartHooks", path: "default_content_deploy.exporter -> serializer -> Drupal\commerce_cart\Hook\CommerceCartHooks -> commerce_cart.cart_provider -> commerce_store.current_store -> Drupal\commerce_cart\Hook\CommerceCartHooks".                                                                        
                                                                                                                                                                                            

Exception trace:
  at /var/www/html/vendor/symfony/dependency-injection/Container.php:214
 Symfony\Component\DependencyInjection\Container::make() at /var/www/html/vendor/symfony/dependency-injection/Container.php:203
 Symfony\Component\DependencyInjection\Container->get() at /var/www/html/vendor/symfony/dependency-injection/ContainerBuilder.php:593
 Symfony\Component\DependencyInjection\ContainerBuilder->doGet() at /var/www/html/vendor/symfony/dependency-injection/ContainerBuilder.php:577
 Symfony\Component\DependencyInjection\ContainerBuilder->get() at /var/www/html/web/core/lib/Drupal/Core/DependencyInjection/ClassResolver.php:28
 Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition() at /var/www/html/web/core/lib/Drupal/Core/Utility/CallableResolver.php:100
 Drupal\Core\Utility\CallableResolver->getCallableFromDefinition() at /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:742
 Drupal\Core\Extension\ModuleHandler->getHookImplementationList() at /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:338
 Drupal\Core\Extension\ModuleHandler->invokeAllWith() at /var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:117
 Drupal\Core\Entity\EntityTypeManager->findDefinitions() at /var/www/html/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php:216
 Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() at /var/www/html/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php:25
 Drupal\Core\Plugin\DefaultPluginManager->getDefinition() at /var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:132
 Drupal\Core\Entity\EntityTypeManager->getDefinition() at /var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:260
 Drupal\Core\Entity\EntityTypeManager->getHandler() at /var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:192
 Drupal\Core\Entity\EntityTypeManager->getStorage() at /var/www/html/web/modules/contrib/simplenews/src/Subscription/SubscriptionManager.php:91
 Drupal\simplenews\Subscription\SubscriptionManager->__construct() at n/a:n/a
 ReflectionClass->newInstanceArgs() at /var/www/html/vendor/symfony/dependency-injection/ContainerBuilder.php:1197
...
jsacksick’s picture

If I roll-back to Commerce 3.2, everything runs fine. Just Commerce 3.3 is trigering the issue.

Well that is expected as Commerce 3.2 didn't define hooks via services.

@mkalkbrenner: I'm also confused, I thought the issues was fixed for you after patching Masquerade.
Reading your backtrace, it does seem triggered by the SubscriptionManager constructor which you didn't end up patching in the end?

    $this->subscriberStorage = $entity_type_manager->getStorage('simplenews_subscriber');
    $this->historyStorage = $entity_type_manager->getStorage('simplenews_subscriber_history');

I see you've opened an issue already (#3573781: Do not perform logic in constructors). So fixing the SubscriptionManager constructor doesn't do the trick?

mkalkbrenner’s picture

Yes, fixing the constructors of the Masquerade and the SubsrciptionManager services is solving the issue for us.
But I rolled back these patches just to perform further tests. And I'm convinced that there must be a bug in Commerce that just gets revealed by these bad designed services. I think so because no other of our OOP hooks has that issue.

jsacksick’s picture

@mkalkbrenner: What I don't understand is why I'm not able to reproduce the issue on my end... after I enabled the Simplenews module for example, there is no crash on my end...

I'm not sure what's different in Commerce hook services that would cause this... Let us know if you find anything...

sah62’s picture

@sah62: Try temporarily removing the constructor from CommerceOrderHooks? (Just out of curiosity as I can't reproduce the issue).
Rebuild caches, then put back the constructor

I can try, but exactly which lines should be temporarily commented out?

jsacksick’s picture

@mkalkbrenner: Do you have any custom store resolver in your codebase? Do you use the commerce_store_domain module? Can you try removing the CartProviderInterface from the constructor? I feel like this service might be too heavy to be injected to a hook service?

The CurrentStore service depends on the ChainStoreResolverInterface which collects all services tagged with the "commerce_store.store_resolver" tag. The resolvers are gathered during container compilation.

jsacksick’s picture

@sah62: mkalkbrenner confirmed my suggestion didn't do the trick. Could you share the full backtrace of your errors please?

sah62’s picture

Backtrace for "drush updb":

Exception trace:
  at /var/www/mysite/vendor/symfony/dependency-injection/Container.php:214
 Symfony\Component\DependencyInjection\Container::make() at /var/www/mysite/vendor/symfony/dependency-injection/Container.php:203
 Symfony\Component\DependencyInjection\Container->get() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:593
 Symfony\Component\DependencyInjection\ContainerBuilder->doGet() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:577
 Symfony\Component\DependencyInjection\ContainerBuilder->get() at /var/www/mysite/web/core/lib/Drupal/Core/DependencyInjection/ClassResolver.php:28
 Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition() at /var/www/mysite/web/core/lib/Drupal/Core/Utility/CallableResolver.php:100
 Drupal\Core\Utility\CallableResolver->getCallableFromDefinition() at /var/www/mysite/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:742
 Drupal\Core\Extension\ModuleHandler->getHookImplementationList() at /var/www/mysite/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:338
 Drupal\Core\Extension\ModuleHandler->invokeAllWith() at /var/www/mysite/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:117
 Drupal\Core\Entity\EntityTypeManager->findDefinitions() at /var/www/mysite/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php:216
 Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() at /var/www/mysite/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php:25
 Drupal\Core\Plugin\DefaultPluginManager->getDefinition() at /var/www/mysite/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:132
 Drupal\Core\Entity\EntityTypeManager->getDefinition() at /var/www/mysite/web/modules/contrib/symfony_mailer/src/Processor/EmailBuilderManager.php:87
 Drupal\symfony_mailer\Processor\EmailBuilderManager->processDefinition() at /var/www/mysite/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php:342
 Drupal\Core\Plugin\DefaultPluginManager->findDefinitions() at /var/www/mysite/web/modules/contrib/symfony_mailer/src/Processor/EmailBuilderManager.php:204
 Drupal\symfony_mailer\Processor\EmailBuilderManager->findDefinitions() at /var/www/mysite/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php:216
 Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() at /var/www/mysite/web/modules/contrib/symfony_mailer/src/Processor/MailerConfigOverride.php:92
 Drupal\symfony_mailer\Processor\MailerConfigOverride->buildCache() at /var/www/mysite/web/modules/contrib/symfony_mailer/src/Processor/MailerConfigOverride.php:52
 Drupal\symfony_mailer\Processor\MailerConfigOverride->loadOverrides() at /var/www/mysite/web/core/lib/Drupal/Core/Config/ConfigFactory.php:209
 Drupal\Core\Config\ConfigFactory->loadOverrides() at /var/www/mysite/web/core/lib/Drupal/Core/Config/ConfigFactory.php:169
 Drupal\Core\Config\ConfigFactory->doLoadMultiple() at /var/www/mysite/web/core/lib/Drupal/Core/Config/ConfigFactory.php:104
 Drupal\Core\Config\ConfigFactory->doGet() at /var/www/mysite/web/core/lib/Drupal/Core/Config/ConfigFactory.php:89
 Drupal\Core\Config\ConfigFactory->get() at /var/www/mysite/web/core/modules/syslog/src/Logger/SysLog.php:48
 Drupal\syslog\Logger\SysLog->__construct() at n/a:n/a
 ReflectionClass->newInstanceArgs() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:1197
 Symfony\Component\DependencyInjection\ContainerBuilder->createService() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:632
 Symfony\Component\DependencyInjection\ContainerBuilder->doGet() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:1315
 Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:1267
 Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:1794
 Symfony\Component\DependencyInjection\ContainerBuilder->callMethod() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:1223
 Symfony\Component\DependencyInjection\ContainerBuilder->createService() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:1317
 Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:1267
 Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:1167
 Symfony\Component\DependencyInjection\ContainerBuilder->createService() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:632
 Symfony\Component\DependencyInjection\ContainerBuilder->doGet() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:1315
 Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:1158
 Symfony\Component\DependencyInjection\ContainerBuilder->createService() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:632
 Symfony\Component\DependencyInjection\ContainerBuilder->doGet() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:1315
 Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:1267
 Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:1167
 Symfony\Component\DependencyInjection\ContainerBuilder->createService() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:632
 Symfony\Component\DependencyInjection\ContainerBuilder->doGet() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:1315
 Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:1267
 Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:1167
 Symfony\Component\DependencyInjection\ContainerBuilder->createService() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:632
 Symfony\Component\DependencyInjection\ContainerBuilder->doGet() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:1315
 Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:1267
 Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:1167
 Symfony\Component\DependencyInjection\ContainerBuilder->createService() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:632
 Symfony\Component\DependencyInjection\ContainerBuilder->doGet() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:577
 Symfony\Component\DependencyInjection\ContainerBuilder->get() at /var/www/mysite/web/core/lib/Drupal/Core/DependencyInjection/ClassResolver.php:28
 Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition() at /var/www/mysite/web/core/lib/Drupal/Core/Utility/CallableResolver.php:100
 Drupal\Core\Utility\CallableResolver->getCallableFromDefinition() at /var/www/mysite/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:742
 Drupal\Core\Extension\ModuleHandler->getHookImplementationList() at /var/www/mysite/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:338
 Drupal\Core\Extension\ModuleHandler->invokeAllWith() at /var/www/mysite/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:117
 Drupal\Core\Entity\EntityTypeManager->findDefinitions() at /var/www/mysite/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php:216
 Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() at /var/www/mysite/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php:25
 Drupal\Core\Plugin\DefaultPluginManager->getDefinition() at /var/www/mysite/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:132
 Drupal\Core\Entity\EntityTypeManager->getDefinition() at /var/www/mysite/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:260
 Drupal\Core\Entity\EntityTypeManager->getHandler() at /var/www/mysite/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:192
 Drupal\Core\Entity\EntityTypeManager->getStorage() at /var/www/mysite/web/modules/contrib/search_api/src/Utility/CommandHelper.php:92
 Drupal\search_api\Utility\CommandHelper->__construct() at /var/www/mysite/web/modules/contrib/search_api_solr/src/Utility/SolrCommandHelper.php:52
 Drupal\search_api_solr\Utility\SolrCommandHelper->__construct() at n/a:n/a
 ReflectionClass->newInstanceArgs() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:1197
 Symfony\Component\DependencyInjection\ContainerBuilder->createService() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:632
 Symfony\Component\DependencyInjection\ContainerBuilder->doGet() at /var/www/mysite/vendor/symfony/dependency-injection/ContainerBuilder.php:577
 Symfony\Component\DependencyInjection\ContainerBuilder->get() at /var/www/mysite/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php:289
 Drush\Runtime\LegacyServiceInstantiator->resolveFromContainer() at /var/www/mysite/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php:253
 Drush\Runtime\LegacyServiceInstantiator->resolveArgument() at n/a:n/a
 array_map() at /var/www/mysite/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php:223
 Drush\Runtime\LegacyServiceInstantiator->resolveArguments() at /var/www/mysite/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php:193
 Drush\Runtime\LegacyServiceInstantiator->instantiateObject() at /var/www/mysite/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php:167
 Drush\Runtime\LegacyServiceInstantiator->create() at /var/www/mysite/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php:117
 Drush\Runtime\LegacyServiceInstantiator->instantiateServices() at /var/www/mysite/vendor/drush/drush/src/Runtime/LegacyServiceInstantiator.php:54
 Drush\Runtime\LegacyServiceInstantiator->loadServiceFiles() at /var/www/mysite/vendor/drush/drush/src/Boot/DrupalBoot8.php:243
 Drush\Boot\DrupalBoot8->addDrupalModuleDrushCommands() at /var/www/mysite/vendor/drush/drush/src/Boot/DrupalBoot8.php:216
 Drush\Boot\DrupalBoot8->bootstrapDrupalFull() at /var/www/mysite/vendor/drush/drush/src/Boot/BootstrapManager.php:211
 Drush\Boot\BootstrapManager->doBootstrap() at /var/www/mysite/vendor/drush/drush/src/Boot/BootstrapManager.php:352
 Drush\Boot\BootstrapManager->bootstrapToPhaseIndex() at /var/www/mysite/vendor/drush/drush/src/Boot/BootstrapManager.php:304
 Drush\Boot\BootstrapManager->bootstrapToPhase() at /var/www/mysite/vendor/drush/drush/src/Boot/BootstrapHook.php:36
 Drush\Boot\BootstrapHook->initialize() at /var/www/mysite/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:44
 Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->doInitializeHook() at /var/www/mysite/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:36
 Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->callInitializeHook() at /var/www/mysite/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/InitializeHookDispatcher.php:29
 Consolidation\AnnotatedCommand\Hooks\Dispatchers\InitializeHookDispatcher->initialize() at /var/www/mysite/vendor/consolidation/annotated-command/src/CommandProcessor.php:145
 Consolidation\AnnotatedCommand\CommandProcessor->initializeHook() at /var/www/mysite/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:378
 Consolidation\AnnotatedCommand\AnnotatedCommand->initialize() at /var/www/mysite/vendor/symfony/console/Command/Command.php:302
 Symfony\Component\Console\Command\Command->run() at /var/www/mysite/vendor/symfony/console/Application.php:1102
 Symfony\Component\Console\Application->doRunCommand() at /var/www/mysite/vendor/drush/drush/src/Application.php:201
 Drush\Application->doRunCommand() at /var/www/mysite/vendor/symfony/console/Application.php:356
 Symfony\Component\Console\Application->doRun() at /var/www/mysite/vendor/symfony/console/Application.php:195
 Symfony\Component\Console\Application->run() at /var/www/mysite/vendor/drush/drush/src/Runtime/Runtime.php:113
 Drush\Runtime\Runtime->doRun() at /var/www/mysite/vendor/drush/drush/src/Runtime/Runtime.php:40
 Drush\Runtime\Runtime->run() at /var/www/mysite/vendor/drush/drush/drush.php:140
 include() at /var/www/mysite/vendor/bin/drush.php:119

Backtrace for "drush cr":

Exception trace:
  at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:147
 Drupal\Component\DependencyInjection\Container->get() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:426
 Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:249
 Drupal\Component\DependencyInjection\Container->createService() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:177
 Drupal\Component\DependencyInjection\Container->get() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:426
 Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:237
 Drupal\Component\DependencyInjection\Container->createService() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:177
 Drupal\Component\DependencyInjection\Container->get() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:426
 Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:237
 Drupal\Component\DependencyInjection\Container->createService() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:177
 Drupal\Component\DependencyInjection\Container->get() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:426
 Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:237
 Drupal\Component\DependencyInjection\Container->createService() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:177
 Drupal\Component\DependencyInjection\Container->get() at /var/www/mysite/web/core/lib/Drupal/Core/DependencyInjection/ClassResolver.php:28
 Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition() at /var/www/mysite/web/core/lib/Drupal/Core/Utility/CallableResolver.php:100
 Drupal\Core\Utility\CallableResolver->getCallableFromDefinition() at /var/www/mysite/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:742
 Drupal\Core\Extension\ModuleHandler->getHookImplementationList() at /var/www/mysite/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:338
 Drupal\Core\Extension\ModuleHandler->invokeAllWith() at /var/www/mysite/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:117
 Drupal\Core\Entity\EntityTypeManager->findDefinitions() at /var/www/mysite/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php:216
 Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() at /var/www/mysite/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php:25
 Drupal\Core\Plugin\DefaultPluginManager->getDefinition() at /var/www/mysite/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:132
 Drupal\Core\Entity\EntityTypeManager->getDefinition() at /var/www/mysite/web/modules/contrib/symfony_mailer/src/Processor/EmailBuilderManager.php:87
 Drupal\symfony_mailer\Processor\EmailBuilderManager->processDefinition() at /var/www/mysite/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php:342
 Drupal\Core\Plugin\DefaultPluginManager->findDefinitions() at /var/www/mysite/web/modules/contrib/symfony_mailer/src/Processor/EmailBuilderManager.php:204
 Drupal\symfony_mailer\Processor\EmailBuilderManager->findDefinitions() at /var/www/mysite/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php:216
 Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() at /var/www/mysite/web/modules/contrib/symfony_mailer/src/Processor/MailerConfigOverride.php:92
 Drupal\symfony_mailer\Processor\MailerConfigOverride->buildCache() at /var/www/mysite/web/modules/contrib/symfony_mailer/src/Processor/MailerConfigOverride.php:52
 Drupal\symfony_mailer\Processor\MailerConfigOverride->loadOverrides() at /var/www/mysite/web/core/lib/Drupal/Core/Config/ConfigFactory.php:209
 Drupal\Core\Config\ConfigFactory->loadOverrides() at /var/www/mysite/web/core/lib/Drupal/Core/Config/ConfigFactory.php:169
 Drupal\Core\Config\ConfigFactory->doLoadMultiple() at /var/www/mysite/web/core/lib/Drupal/Core/Config/ConfigFactory.php:104
 Drupal\Core\Config\ConfigFactory->doGet() at /var/www/mysite/web/core/lib/Drupal/Core/Config/ConfigFactory.php:89
 Drupal\Core\Config\ConfigFactory->get() at /var/www/mysite/web/core/modules/syslog/src/Logger/SysLog.php:48
 Drupal\syslog\Logger\SysLog->__construct() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:259
 Drupal\Component\DependencyInjection\Container->createService() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:177
 Drupal\Component\DependencyInjection\Container->get() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:426
 Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:273
 Drupal\Component\DependencyInjection\Container->createService() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:441
 Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:237
 Drupal\Component\DependencyInjection\Container->createService() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:177
 Drupal\Component\DependencyInjection\Container->get() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:426
 Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:249
 Drupal\Component\DependencyInjection\Container->createService() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:177
 Drupal\Component\DependencyInjection\Container->get() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:426
 Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:237
 Drupal\Component\DependencyInjection\Container->createService() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:177
 Drupal\Component\DependencyInjection\Container->get() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:426
 Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:237
 Drupal\Component\DependencyInjection\Container->createService() at /var/www/mysite/web/core/lib/Drupal/Component/DependencyInjection/Container.php:177
 Drupal\Component\DependencyInjection\Container->get() at /var/www/mysite/web/core/lib/Drupal.php:205
 Drupal::service() at /var/www/mysite/web/core/includes/common.inc:435
 drupal_flush_all_caches() at /var/www/mysite/web/core/includes/utility.inc:41
 drupal_rebuild() at /var/www/mysite/vendor/drush/drush/src/Commands/core/CacheRebuildCommands.php:65
 Drush\Commands\core\CacheRebuildCommands->rebuild() at n/a:n/a
 call_user_func_array() at /var/www/mysite/vendor/consolidation/annotated-command/src/CommandProcessor.php:276
 Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback() at /var/www/mysite/vendor/consolidation/annotated-command/src/CommandProcessor.php:212
 Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter() at /var/www/mysite/vendor/consolidation/annotated-command/src/CommandProcessor.php:175
 Consolidation\AnnotatedCommand\CommandProcessor->process() at /var/www/mysite/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:389
 Consolidation\AnnotatedCommand\AnnotatedCommand->execute() at /var/www/mysite/vendor/symfony/console/Command/Command.php:341
 Symfony\Component\Console\Command\Command->run() at /var/www/mysite/vendor/symfony/console/Application.php:1102
 Symfony\Component\Console\Application->doRunCommand() at /var/www/mysite/vendor/drush/drush/src/Application.php:201
 Drush\Application->doRunCommand() at /var/www/mysite/vendor/symfony/console/Application.php:356
 Symfony\Component\Console\Application->doRun() at /var/www/mysite/vendor/symfony/console/Application.php:195
 Symfony\Component\Console\Application->run() at /var/www/mysite/vendor/drush/drush/src/Runtime/Runtime.php:113
 Drush\Runtime\Runtime->doRun() at /var/www/mysite/vendor/drush/drush/src/Runtime/Runtime.php:40
 Drush\Runtime\Runtime->run() at /var/www/mysite/vendor/drush/drush/drush.php:140
 include() at /var/www/mysite/vendor/bin/drush.php:119
jsacksick’s picture

@sah62: In your backtrace I see symfony_mailer. Could you maybe try upgrading to 2.x? What version of the module are you running?

sidgrafix’s picture

@jsacksick

Symfony mailer is not the problem (anything you see in a backtrace is of the modules latest version) - backtrace also appears to be dependent on the page you are trying to access, or the page with the error.

The problem after some investigation is the fact that Drupal\Core\Hook\* (/core/lib/Drupal/Core/Hook) does not exist in Drupal 10.x.x - I just looked at the commerce.module file line 12 in order for LegayHook to work \Drupal\Core\Hook\Attribute\LegacyHook; is required. Drupal 10 does not have that in any version up to 10.6.3 (Doesn't exist just looked) Legacy Hook is used to easily adapt to the new hook class for Drupal 11 - I know what the docs say but they are not correct in saying you can use #[LegacyHook] with Drupal 10.

So this module will truly only work with Drupal 11 as it stands, some users may be able to fore some things but it will never be 100% and require many work arounds.

You may need to copy LegacyHook.php to commerce or something, but I gave up on the module I was working on before attempting anything like that. You just can't use something that doesn't exist. In order to make my module easily moveable to go from hooks in modules to using the Hook class that will be available in Drupal 11 was to just create some micro services the D10 version can use and the same services get used by the new hook classes which don't do anything until I upgrade the site to 11 from 10 at which point all the hooks in the module file could be removed (could probably be handles via an update script likely as well).

It may appear as everything installs correctly on a test drupal 10 install (I don't know) but anyone who has been using commerce 3.x as thie current version stands if you are on drupal 10 you cannot update to 3.3

jsacksick’s picture

@sidgrafix: The LegacyHook exists only in Drupal 11 so that the legacy hooks (present in the module files) aren't invoked in Drupal 11.
The LegacyHook attribute is completely ignored in Drupal 10, because it doesn't know what it is... I invite you to read more about the change from the change record: https://www.drupal.org/node/3442349.

I have Commerce 3.3.0 running on a Drupal 10.3.x install, and once again we have tests coverage for the previous Drupal core major version (which is Drupal 10).

sah62’s picture

@sah62: In your backtrace I see symfony_mailer. Could you maybe try upgrading to 2.x? What version of the module are you running?

@jsacksick I'm running Mailer Plus (DSM+) 1.6.2, the latest stable release. I see that a 2.0.0-beta4 release is available - is that what you're referring to?

jsacksick’s picture

@sah62: Yes, that is just a suggestion with no guarantee that the issue is going to be fixed. Ofc, whenever only perform tests locally and don't deploy anything to production until you confirm it works as expected.

sah62’s picture

@sah62: Yes, that is just a suggestion with no guarantee that the issue is going to be fixed. Ofc, whenever only perform tests locally and don't deploy anything to production until you confirm it works as expected.

I ran into some issues when running "drush updb" after the upgrade. Some of the updates failed:

>  [error]  Override setting for contact and contact_form must be equal in 2.x
>  [error]  Update failed: symfony_mailer_update_20002

I fixed this by removing the contact_form override setting.

>  [error]  'mailer_policy' entity with ID 'symfony_mailer.verify' already exists.
>  [error]  Update failed: symfony_mailer_update_20003

I fixed this by removing the email verification policy. Once those fixes were in place, both "drush updb" and "drush cr" run without error.

jsacksick’s picture

@sah62: Just to clarify, you were able to update to Symfony mailer 2.x and Commerce? Or only Symfony mailer?

sah62’s picture

@jsacksick: Yes, I'm now running Commerce Core 3.3.0 and Mailer Plus (DSM+) 2.0.0-beta4. Everything seems to be working.

jsacksick’s picture

@sah62: Awesome, that's good news! On which Drupal core version are you?

sah62’s picture

@jsacksick: 11.3.3

kenwest’s picture

I get this problem on Drupal 11.3.3 with Commerce Core, Domain and Simple SiteMaps installed.

The error is not consistent: I'm sick at the moment so I'm not sure if that's my environment or that's me! I upgraded to Commerce Core 3.3.0 while logged in and 'drush cr' worked ok - I logged out and site access produced the WSOD.

My error message (below) implicates Simple Sitemap while the stack trace (below) implicates Domain. In the spirit of Comment 21 (above) I checked both modules for use of getStorage() in __construct() functions and both follow that anti-pattern.

Error message when access causes WSOD:

Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: Circular reference detected for service "router.route_provider", path: "options_request_listener -> router.route_provider -> path_processor_manager -> simple_sitemap.engines.path_processor -> simple_sitemap.engines.index_now_submitter -> simple_sitemap.logger -> logger.channel.simple_sitemap -> logger.factory -> logger.syslog -> Drupal\commerce_order\Hook\CommerceOrderHooks -> form_builder -> form_submitter -> url_generator". in Drupal\Component\DependencyInjection\Container->get() (line 147 of /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php).

Stack trace when access causes WSOD:

TypeError: Drupal\Core\Routing\RequestContext::fromRequest(): Argument #1 ($request) must be of type Symfony\Component\HttpFoundation\Request, null given, called in /var/www/drupal/web/core/lib/Drupal/Core/Routing/RequestContext.php on line 28 in Drupal\Core\Routing\RequestContext->fromRequest() (line 34 of /var/www/drupal/web/core/lib/Drupal/Core/Routing/RequestContext.php) 
#0 /var/www/drupal/web/core/lib/Drupal/Core/Routing/RequestContext.php(28): Drupal\Core\Routing\RequestContext->fromRequest()
#1 [internal function]: Drupal\Core\Routing\RequestContext->fromRequestStack()
#2 /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(276): call_user_func_array()
#3 /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService()
#4 /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(426): Drupal\Component\DependencyInjection\Container->get()
#5 /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(273): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters()
#6 /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(441): Drupal\Component\DependencyInjection\Container->createService()
#7 /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(237): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters()
#8 /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService()
#9 /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(426): Drupal\Component\DependencyInjection\Container->get()
#10 /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(237): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters()
#11 /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService()
#12 /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(426): Drupal\Component\DependencyInjection\Container->get()
#13 /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(237): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters()
#14 /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService()
#15 /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(426): Drupal\Component\DependencyInjection\Container->get()
#16 /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(237): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters()
#17 /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(177): Drupal\Component\DependencyInjection\Container->createService()
#18 /var/www/drupal/web/core/lib/Drupal/Core/DependencyInjection/ClassResolver.php(28): Drupal\Component\DependencyInjection\Container->get()
#19 /var/www/drupal/web/core/lib/Drupal/Core/Utility/CallableResolver.php(100): Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition()
#20 /var/www/drupal/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(742): Drupal\Core\Utility\CallableResolver->getCallableFromDefinition()
#21 /var/www/drupal/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(338): Drupal\Core\Extension\ModuleHandler->getHookImplementationList()
#22 /var/www/drupal/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php(117): Drupal\Core\Extension\ModuleHandler->invokeAllWith()
#23 /var/www/drupal/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(216): Drupal\Core\Entity\EntityTypeManager->findDefinitions()
#24 /var/www/drupal/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php(25): Drupal\Core\Plugin\DefaultPluginManager->getDefinitions()
#25 /var/www/drupal/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php(132): Drupal\Core\Plugin\DefaultPluginManager->getDefinition()
#26 /var/www/drupal/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php(260): Drupal\Core\Entity\EntityTypeManager->getDefinition()
#27 /var/www/drupal/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php(192): Drupal\Core\Entity\EntityTypeManager->getHandler()
#28 /var/www/drupal/web/modules/contrib/domain/domain/src/DomainNegotiator.php(269): Drupal\Core\Entity\EntityTypeManager->getStorage()
#29 /var/www/drupal/web/modules/contrib/domain/domain/src/DomainNegotiator.php(218): Drupal\domain\DomainNegotiator->domainStorage()
#30 /var/www/drupal/web/modules/contrib/domain/domain/src/DomainNegotiator.php(170): Drupal\domain\DomainNegotiator->negotiateActiveHostname()
#31 /var/www/drupal/web/modules/contrib/domain/domain/src/DomainNegotiator.php(185): Drupal\domain\DomainNegotiator->negotiateActiveDomain()
#32 /var/www/drupal/web/modules/contrib/domain/domain_config/src/DomainConfigOverrider.php(461): Drupal\domain\DomainNegotiator->getActiveDomain()
#33 /var/www/drupal/web/modules/contrib/domain/domain_config/src/DomainConfigOverrider.php(481): Drupal\domain_config\DomainConfigOverrider->initiateContext()
#34 /var/www/drupal/web/modules/contrib/domain/domain_config/src/DomainConfigOverrider.php(363): Drupal\domain_config\DomainConfigOverrider->isDomainAvailable()
#35 /var/www/drupal/web/core/lib/Drupal/Core/Config/ConfigFactory.php(276): Drupal\domain_config\DomainConfigOverrider->getCacheSuffix()
#36 /var/www/drupal/web/core/lib/Drupal/Core/Config/ConfigFactory.php(295): Drupal\Core\Config\ConfigFactory->getCacheKeys()
#37 /var/www/drupal/web/core/lib/Drupal/Core/Config/ConfigFactory.php(154): Drupal\Core\Config\ConfigFactory->getConfigCacheKey()
#38 /var/www/drupal/web/modules/contrib/domain/domain_config_ui/src/Config/ConfigFactory.php(127): Drupal\Core\Config\ConfigFactory->doLoadMultiple()
#39 /var/www/drupal/web/core/lib/Drupal/Core/Config/ConfigFactory.php(104): Drupal\domain_config_ui\Config\ConfigFactory->doLoadMultiple()
#40 /var/www/drupal/web/modules/contrib/domain/domain_config_ui/src/Config/ConfigFactory.php(172): Drupal\Core\Config\ConfigFactory->doGet()
#41 /var/www/drupal/web/core/lib/Drupal/Core/Config/ConfigFactory.php(89): Drupal\domain_config_ui\Config\ConfigFactory->doGet()
#42 /var/www/drupal/web/core/lib/Drupal.php(423): Drupal\Core\Config\ConfigFactory->get()
#43 /var/www/drupal/web/modules/contrib/cleantalk/src/EventSubscriber/BootSubscriber.php(111): Drupal::config()
#44 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\cleantalk\EventSubscriber\BootSubscriber->handle()
#45 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#46 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(53): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#47 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(54): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#48 /var/www/drupal/web/core/lib/Drupal/Core/DrupalKernel.php(745): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#49 /var/www/drupal/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#50 {main}.
kenwest’s picture

I looked again at how 'drush cr' fails for me (Drupal 11.3.3). I can trace the trigger for the issue back to Core!

I can make the failure go away by commenting out the call to getStorage() in the constructor for Drupal\Core\Datetime\DateFormatter ...

  public function __construct(EntityTypeManagerInterface $entity_type_manager, LanguageManagerInterface $language_manager, TranslationInterface $translation, ConfigFactoryInterface $config_factory, RequestStack $request_stack) {
//    $this->dateFormatStorage = $entity_type_manager->getStorage('date_format');
    $this->languageManager = $language_manager;
    $this->stringTranslation = $translation;
    $this->configFactory = $config_factory;
    $this->requestStack = $request_stack;
  }

Prior to this change, drush cr gave the following trace ...

Exception trace:
  at /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php:147
 Drupal\Component\DependencyInjection\Container->get() at /var/www/drupal/web/core/lib/Drupal/Core/DependencyInjection/ClassResolver.php:28
 Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition() at /var/www/drupal/web/core/lib/Drupal/Core/Utility/CallableResolver.php:100
 Drupal\Core\Utility\CallableResolver->getCallableFromDefinition() at /var/www/drupal/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:742
 Drupal\Core\Extension\ModuleHandler->getHookImplementationList() at /var/www/drupal/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:338
 Drupal\Core\Extension\ModuleHandler->invokeAllWith() at /var/www/drupal/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:117
 Drupal\Core\Entity\EntityTypeManager->findDefinitions() at /var/www/drupal/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php:216
 Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() at /var/www/drupal/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php:25
 Drupal\Core\Plugin\DefaultPluginManager->getDefinition() at /var/www/drupal/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:132
 Drupal\Core\Entity\EntityTypeManager->getDefinition() at /var/www/drupal/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:260
 Drupal\Core\Entity\EntityTypeManager->getHandler() at /var/www/drupal/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:192
 Drupal\Core\Entity\EntityTypeManager->getStorage() at /var/www/drupal/web/modules/contrib/domain/domain/src/DomainNegotiator.php:269
 Drupal\domain\DomainNegotiator->domainStorage() at /var/www/drupal/web/modules/contrib/domain/domain/src/DomainNegotiator.php:218
 Drupal\domain\DomainNegotiator->negotiateActiveHostname() at /var/www/drupal/web/modules/contrib/domain/domain/src/DomainNegotiator.php:170
 Drupal\domain\DomainNegotiator->negotiateActiveDomain() at /var/www/drupal/web/modules/contrib/domain/domain/src/DomainNegotiator.php:185
 Drupal\domain\DomainNegotiator->getActiveDomain() at /var/www/drupal/web/modules/contrib/domain/domain_config/src/DomainConfigOverrider.php:461
 Drupal\domain_config\DomainConfigOverrider->initiateContext() at /var/www/drupal/web/modules/contrib/domain/domain_config/src/DomainConfigOverrider.php:481
 Drupal\domain_config\DomainConfigOverrider->isDomainAvailable() at /var/www/drupal/web/modules/contrib/domain/domain_config/src/DomainConfigOverrider.php:363
 Drupal\domain_config\DomainConfigOverrider->getCacheSuffix() at /var/www/drupal/web/core/lib/Drupal/Core/Config/ConfigFactory.php:276
 Drupal\Core\Config\ConfigFactory->getCacheKeys() at /var/www/drupal/web/core/lib/Drupal/Core/Config/ConfigFactory.php:295
 Drupal\Core\Config\ConfigFactory->getConfigCacheKey() at /var/www/drupal/web/core/lib/Drupal/Core/Config/ConfigFactory.php:154
 Drupal\Core\Config\ConfigFactory->doLoadMultiple() at /var/www/drupal/web/modules/contrib/domain/domain_config_ui/src/Config/ConfigFactory.php:127
 Drupal\domain_config_ui\Config\ConfigFactory->doLoadMultiple() at /var/www/drupal/web/core/lib/Drupal/Core/Config/ConfigFactory.php:104
 Drupal\Core\Config\ConfigFactory->doGet() at /var/www/drupal/web/modules/contrib/domain/domain_config_ui/src/Config/ConfigFactory.php:172
 Drupal\domain_config_ui\Config\ConfigFactory->doGet() at /var/www/drupal/web/core/lib/Drupal/Core/Config/ConfigFactory.php:89
 Drupal\Core\Config\ConfigFactory->get() at /var/www/drupal/web/core/modules/syslog/src/Logger/SysLog.php:48
 Drupal\syslog\Logger\SysLog->__construct() at /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php:259
 Drupal\Component\DependencyInjection\Container->createService() at /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php:177
 Drupal\Component\DependencyInjection\Container->get() at /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php:426
 Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() at /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php:273
 Drupal\Component\DependencyInjection\Container->createService() at /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php:177
 Drupal\Component\DependencyInjection\Container->get() at /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php:426
 Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() at /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php:249
 Drupal\Component\DependencyInjection\Container->createService() at /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php:177
 Drupal\Component\DependencyInjection\Container->get() at /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php:426
 Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() at /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php:237
 Drupal\Component\DependencyInjection\Container->createService() at /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php:177
 Drupal\Component\DependencyInjection\Container->get() at /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php:426
 Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() at /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php:237
 Drupal\Component\DependencyInjection\Container->createService() at /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php:177
 Drupal\Component\DependencyInjection\Container->get() at /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php:426
 Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() at /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php:237
 Drupal\Component\DependencyInjection\Container->createService() at /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php:177
 Drupal\Component\DependencyInjection\Container->get() at /var/www/drupal/web/core/lib/Drupal/Core/DependencyInjection/ClassResolver.php:28
 Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition() at /var/www/drupal/web/core/lib/Drupal/Core/Utility/CallableResolver.php:100
 Drupal\Core\Utility\CallableResolver->getCallableFromDefinition() at /var/www/drupal/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:742
 Drupal\Core\Extension\ModuleHandler->getHookImplementationList() at /var/www/drupal/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:338
 Drupal\Core\Extension\ModuleHandler->invokeAllWith() at /var/www/drupal/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:117
 Drupal\Core\Entity\EntityTypeManager->findDefinitions() at /var/www/drupal/web/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php:216
 Drupal\Core\Plugin\DefaultPluginManager->getDefinitions() at /var/www/drupal/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php:25
 Drupal\Core\Plugin\DefaultPluginManager->getDefinition() at /var/www/drupal/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:132
 Drupal\Core\Entity\EntityTypeManager->getDefinition() at /var/www/drupal/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:260
 Drupal\Core\Entity\EntityTypeManager->getHandler() at /var/www/drupal/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php:192
 Drupal\Core\Entity\EntityTypeManager->getStorage() at /var/www/drupal/web/core/lib/Drupal/Core/Datetime/DateFormatter.php:97
 Drupal\Core\Datetime\DateFormatter->__construct() at /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php:259
 Drupal\Component\DependencyInjection\Container->createService() at /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php:177
 Drupal\Component\DependencyInjection\Container->get() at /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php:426
 Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters() at /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php:237
 Drupal\Component\DependencyInjection\Container->createService() at /var/www/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php:177
 Drupal\Component\DependencyInjection\Container->get() at /var/www/drupal/web/core/lib/Drupal.php:205
 Drupal::service() at /var/www/drupal/web/modules/contrib/scheduler/scheduler.module:1262
 scheduler_cache_flush() at n/a:n/a
 call_user_func_array() at /var/www/drupal/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:389
 Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}() at /var/www/drupal/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:340
 Drupal\Core\Extension\ModuleHandler->invokeAllWith() at /var/www/drupal/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:388
 Drupal\Core\Extension\ModuleHandler->invokeAll() at /var/www/drupal/web/core/includes/common.inc:421
 drupal_flush_all_caches() at /var/www/drupal/web/core/includes/utility.inc:41
 drupal_rebuild() at /var/www/drupal/vendor/drush/drush/src/Commands/core/CacheRebuildCommands.php:65
 Drush\Commands\core\CacheRebuildCommands->rebuild() at n/a:n/a
 call_user_func_array() at /var/www/drupal/vendor/consolidation/annotated-command/src/CommandProcessor.php:276
 Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback() at /var/www/drupal/vendor/consolidation/annotated-command/src/CommandProcessor.php:212
 Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter() at /var/www/drupal/vendor/consolidation/annotated-command/src/CommandProcessor.php:175
 Consolidation\AnnotatedCommand\CommandProcessor->process() at /var/www/drupal/vendor/consolidation/annotated-command/src/AnnotatedCommand.php:389
 Consolidation\AnnotatedCommand\AnnotatedCommand->execute() at /var/www/drupal/vendor/symfony/console/Command/Command.php:341
 Symfony\Component\Console\Command\Command->run() at /var/www/drupal/vendor/symfony/console/Application.php:1102
 Symfony\Component\Console\Application->doRunCommand() at /var/www/drupal/vendor/drush/drush/src/Application.php:201
 Drush\Application->doRunCommand() at /var/www/drupal/vendor/symfony/console/Application.php:356
 Symfony\Component\Console\Application->doRun() at /var/www/drupal/vendor/symfony/console/Application.php:195
 Symfony\Component\Console\Application->run() at /var/www/drupal/vendor/drush/drush/src/Runtime/Runtime.php:113
 Drush\Runtime\Runtime->doRun() at /var/www/drupal/vendor/drush/drush/src/Runtime/Runtime.php:40
 Drush\Runtime\Runtime->run() at /var/www/drupal/vendor/drush/drush/drush.php:140
 include() at /var/www/drupal/vendor/bin/drush.php:119

Note the call to scheduler_cache_flush(). Perhaps the Commerce team could try reproducing the problem by installing the Scheduler module before 'drush cr'?

jsacksick’s picture

@kenwest: And then it just works? And if you put back the code it fails again?

kenwest’s picture

Yes. Note the call to scheduler_cache_flush() in my trace. Perhaps the Commerce team could try reproducing the problem by installing the Scheduler module before 'drush cr'?

Note that the ServiceCircularReferenceException error I was getting was ...

[Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException]                                                                                                        
  Circular reference detected for service "Drupal\commerce_order\Hook\CommerceOrderHooks", path: "scheduler.manager -> date.formatter -> Drupal\commerce_order\Hook\CommerceOrderHooks -> form_builder -> form_validator -> logger.channel.form -> logger.factory -> logger.syslog".

... which clarifies the dependency scheduler.manager has on date.formatter.

jsacksick’s picture

I'm working on a project daily, already on production that is on D11.3.3, and has the Simple Sitemap module (version 4.2.3), as well as Scheduler (version 2.2.2) installed with no issues... Rebuilding caches doesn't trigger any error on my end.
In fact, that same codebase powers 6 different websites (all different instances). None of them are suffering from this.
The following other modules are installed (non exhaustive list):

  1. Commerce Shipping
  2. Commerce API
  3. Commerce Wishlist
  4. jsonapi_hypermedia
  5. jsonapi_resources 0
  6. jsonapi_search_api
  7. jsonapi_search_api_facets
  8. jsonapi_user_resources

(127 modules in total).

kenwest’s picture

In my Comment 44 (above) I mentioned the Domain module, and reproduced the stack trace I get when i get a WSOD. I can prevent the WSOD by commenting out a line in the constructor for the Drupal\domain_config\DomainConfigOverrider class ...

  public function __construct(StorageInterface $storage, ModuleHandlerInterface $module_handler) {
    $this->storage = $storage;
    $this->moduleHandler = $module_handler;
//    $this->initialize();
  }

... noting the initialize() method uses the $storage member (a similar pattern to what @mkalkbrenner discovered).

BTW My modules are ...

  1. Drupal 11.3.3
  2. Simple Sitemap 4.2.3
  3. Scheduler 2.2.2
  4. Domain 2.0.0-rc2
jsacksick’s picture

@kenwest: I see that this service doesn't exist in Domain 3.x... But guessing migrating from 2.x to 3.x is out of the equation for you which I can understand... Not sure if there is a migration path from 2.x to 3.x, but found the following note on the project page:

Major Architectural Change introduced in 3.x
Domain 3.x migrates to use Drupal core's Config Collections system for managing domain configuration overrides, replacing the custom override system used in 2.x.

kenwest’s picture

When I upgrade Domain to 3.0.0-beta2 both problems go away: drush cr works as expected and there is no WSOD. I hope my input here was helpful and not distracting!

cspitzlay’s picture

@jsacksick: Re #31:

Unfortunately mkalkbrenner is not online at the moment and may or may not be back
during the next couple of days. FWIW, I will answer your questions from #31
to the best of my knowledge (I don't have his updated code yet).

@mkalkbrenner: Do you have any custom store resolver in your codebase? Do you use the commerce_store_domain module? Can you try removing the CartProviderInterface from the constructor? I feel like this service might be too heavy to be injected to a hook service?

Yes, we have several custom resolvers in the chain:
- One that uses the user session.
- A custom one that has the StoreDomainResolver from commerce_store_domain as injected dependency, among other services.
- StoreDomainResolver is there by itself, too.
- OrderStoreResolver from commerce_order
- DefaultStoreResolver from commerce_store

jsacksick’s picture

@cspitzlay: Because commerce_store_domain was instantiating the storage class from the constructor, that was fixed and a new release of commerce_store_domain was released.

@kenwest: Great to hear that your problem goes away after updating to Domain 3.0.0-beta2.

cspitzlay’s picture

@jsacksick: I'm pretty sure that mkalkbrenner's tests were done with the latest release of commerce_store_domain, since the release was already on 2026-02-13.

I ran a general composer update, removing any failing patches.
(I assume mkalkbrenner already tackled the patches more cleanly;
this is just for reproducing the issue)

Then I got a circular dependency error for CommerceCartHooks when executing drush cr.

And indeed, as soon as I comment out the CartProviderInterface parameter in __construct of CommerceCartHooks the drush cr succeeds.

  public function __construct(
    #[Autowire(service: 'commerce_cart.cron')]
    protected readonly CronInterface $cron,
    protected readonly ModuleHandlerInterface $moduleHandler,
//    protected readonly CartProviderInterface $cartProvider,
    protected readonly OrderAssignmentInterface $orderAssignment,
    protected readonly CartSessionInterface $cartSession,
    protected readonly EntityTypeManagerInterface $entityTypeManager,
  ) {}
jsacksick’s picture

And then @cspitzlay, as soon as you put back to the CartProviderInterface it fails?

cspitzlay’s picture

Yes. Then drush cr fails again.

jsacksick’s picture

Status: Active » Needs review

Any chance I could get the changes from the opened MR tested?
@sidgrafix, @bobburns or @cspitzlay perhaps?

cspitzlay’s picture

Status: Needs review » Active

Quick response:
drush cr and drush updb both succeed with this change.
I haven't done any deeper tests yet, though.

cspitzlay’s picture

Status: Active » Needs review

Revert: Accidentally changed the status ...

cspitzlay’s picture

Status: Needs review » Reviewed & tested by the community

Ok, when trying to test the actual functionality I found two broken plugins of ours, but I think that is due to the 3.3 upgrade itself and not caused by your MR. That needs to be fixed in our custom code.

After patching / sabotaging the broken plugins I could use the cart and run it through the checkout flow.

  • I also executed our custom checkout flow test and it passed.
  • One other cart-related test failed but that was due to the sabotaged plugin.
  • I executed our API tests, some of which create carts and check them out programmatically. All passed.

  • jsacksick committed 8774285e on 3.x
    fix: #3573220 Updating from commerce 3.2 to 3.3 causes WSOD for every...
jsacksick’s picture

Status: Reviewed & tested by the community » Fixed

Thank you! Merged, will tag another minor release. Hopefully the issue is fixed for everybody.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

sidgrafix’s picture

@jsacksick went to test MR as patch which failed during composer update for commerce but that was because 3.3.1 was already available and installed. Drush updb ran commerce updates and all appears to be good to go! My bad on compatibility.. Thank you!

cspitzlay’s picture

@jsacksick: Thank you!

bobburns’s picture

Upgrade to 3.3.1 throws

The website encountered an unexpected error. Try again later.
Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "Drupal\commerce_number_pattern\Hook\CommerceNumberPatternTokenHooks". in Drupal\Component\DependencyInjection\Container->get() (line 159 of core/lib/Drupal/Component/DependencyInjection/Container.php).

Requires a cache rebuild and still no add to cart works

mediengenosse’s picture

Upgrade from 3.2.0 to 3.3.2 still impossible due to mentioned bug on two existing websites @php8.4.18.

After deinstalling drupal/scheduler and drupal/simple_sitemap (which do cause circular references) I still get similar errors when trying to
start drush updb after composer update to version 3.3.2:

Circular reference detected for service "date.formatter", path: "scheduler.
  manager -> date.formatter -> Drupal\commerce\Hook\CommerceHooks -> commerce
  .inbox_message_fetcher -> date.formatter".

and

  Circular reference detected for service "Drupal\Core\Logger\LoggerChannelFa
  ctoryInterface", path: "webform.elements_validator -> form_builder -> form_
  validator -> logger.channel.form -> Drupal\Core\Logger\LoggerChannelFactory
  Interface -> Drupal\commerce\Hook\CommerceHooks -> commerce.inbox_message_f
  etcher -> commerce.logger -> Drupal\Core\Logger\LoggerChannelFactoryInterfa
  ce".
jsacksick’s picture

@mediengenosse: I'm running Commerce 3.3.x completely fine with Scheduler and Simple sitemap installed...

Could you share the full backtrace?

mediengenosse’s picture

StatusFileSize
new10.07 KB

@jsacksick: Enclosed you please find the backtrace

jsacksick’s picture

@ mediengenosse: Are you running Symfony mailer 1.6.x? Can you try upgrading to the 2.0.0-beta4 version?

mediengenosse’s picture

Yes, I do use Symfony mailer 1.6.2.

I tried upgrading to the 2.0.0-beta4 version but mailer_transport (as part of symfony mailer) is preventing the upgrade.
Uninstalling Symfony mailer with its mailer_transport and trying to reinstall the 2.0 beta version did not succeed, as it is being prevented by Mailer transport even then. Therefore I had to completely remove Symfony Mailer.

Upgrading to Commerce to version 3.3 and updating the database worked flawlessly and it does work like expected – after completely removing Symfony Mailer.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.