The error, use session after the session is killed.

Created on 4 March 2024, 4 months ago
Updated 30 April 2024, 2 months ago

The issue appears after saving a payment on an order.

The direct error message:

RuntimeException
: Failed to start the session because headers have already been sent by "/home/d/Work/gitlab/project-sandbox-d10/vendor/symfony/http-foundation/Response.php" at line 426. in
Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start()
(line
132
of
/home/d/Work/gitlab/project-sandbox-d10/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php
)

Full dump:

#0 /home/d/Work/gitlab/project-sandbox-d10/web/core/lib/Drupal/Core/Session/SessionManager.php(144): Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start()
#1 /home/d/Work/gitlab/project-sandbox-d10/web/core/lib/Drupal/Core/Session/SessionManager.php(109): Drupal\Core\Session\SessionManager->startNow()
#2 /home/d/Work/gitlab/project-sandbox-d10/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php(311): Drupal\Core\Session\SessionManager->start()
#3 /home/d/Work/gitlab/project-sandbox-d10/vendor/symfony/http-foundation/Session/Session.php(222): Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->getBag()
#4 /home/d/Work/gitlab/project-sandbox-d10/vendor/symfony/http-foundation/Session/Session.php(242): Symfony\Component\HttpFoundation\Session\Session->getBag()
#5 /home/d/Work/gitlab/project-sandbox-d10/vendor/symfony/http-foundation/Session/Session.php(77): Symfony\Component\HttpFoundation\Session\Session->getAttributeBag()
#6 /home/d/Work/gitlab/project-sandbox-d10/web/modules/contrib/elogger/elogger.module(85): Symfony\Component\HttpFoundation\Session\Session->set()
#7 [internal function]: elogger_entity_presave()
#8 /home/d/Work/gitlab/project-sandbox-d10/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(409): call_user_func_array()
#9 /home/d/Work/gitlab/project-sandbox-d10/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(388): Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}()
#10 /home/d/Work/gitlab/project-sandbox-d10/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(408): Drupal\Core\Extension\ModuleHandler->invokeAllWith()
#11 /home/d/Work/gitlab/project-sandbox-d10/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(217): Drupal\Core\Extension\ModuleHandler->invokeAll()
#12 /home/d/Work/gitlab/project-sandbox-d10/web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(900): Drupal\Core\Entity\EntityStorageBase->invokeHook()
#13 /home/d/Work/gitlab/project-sandbox-d10/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(529): Drupal\Core\Entity\ContentEntityStorageBase->invokeHook()
#14 /home/d/Work/gitlab/project-sandbox-d10/web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(753): Drupal\Core\Entity\EntityStorageBase->doPreSave()
#15 /home/d/Work/gitlab/project-sandbox-d10/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(483): Drupal\Core\Entity\ContentEntityStorageBase->doPreSave()
#16 /home/d/Work/gitlab/project-sandbox-d10/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(806): Drupal\Core\Entity\EntityStorageBase->save()
#17 /home/d/Work/gitlab/project-sandbox-d10/web/core/lib/Drupal/Core/Entity/EntityBase.php(339): Drupal\Core\Entity\Sql\SqlContentEntityStorage->save()
#18 /home/d/Work/gitlab/project-sandbox-d10/web/modules/custom/insurance/modules/green_card_insurance/src/Services/InsuranceService.php(222): Drupal\Core\Entity\EntityBase->save()
#19 /home/d/Work/gitlab/project-sandbox-d10/web/modules/custom/insurance/modules/green_card_insurance/src/EventSubscriber/OrderEventSubscriber.php(87): Drupal\green_card_insurance\Services\InsuranceService->createInsurance()
#20 [internal function]: Drupal\green_card_insurance\EventSubscriber\OrderEventSubscriber->createRealInsurance()
#21 /home/d/Work/gitlab/project-sandbox-d10/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func()
#22 /home/d/Work/gitlab/project-sandbox-d10/web/modules/contrib/commerce/modules/order/src/OrderStorage.php(129): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#23 /home/d/Work/gitlab/project-sandbox-d10/web/modules/contrib/commerce/modules/order/src/OrderStorage.php(78): Drupal\commerce_order\OrderStorage->doOrderPreSave()
#24 /home/d/Work/gitlab/project-sandbox-d10/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(529): Drupal\commerce_order\OrderStorage->invokeHook()
#25 /home/d/Work/gitlab/project-sandbox-d10/web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(753): Drupal\Core\Entity\EntityStorageBase->doPreSave()
#26 /home/d/Work/gitlab/project-sandbox-d10/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(483): Drupal\Core\Entity\ContentEntityStorageBase->doPreSave()
#27 /home/d/Work/gitlab/project-sandbox-d10/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(806): Drupal\Core\Entity\EntityStorageBase->save()
#28 /home/d/Work/gitlab/project-sandbox-d10/web/modules/contrib/commerce/modules/order/src/OrderStorage.php(159): Drupal\Core\Entity\Sql\SqlContentEntityStorage->save()
#29 /home/d/Work/gitlab/project-sandbox-d10/web/core/lib/Drupal/Core/Entity/EntityBase.php(339): Drupal\commerce_order\OrderStorage->save()
#30 /home/d/Work/gitlab/project-sandbox-d10/web/modules/contrib/commerce/modules/payment/src/PaymentOrderUpdater.php(101): Drupal\Core\Entity\EntityBase->save()
#31 /home/d/Work/gitlab/project-sandbox-d10/web/modules/contrib/commerce/modules/payment/src/PaymentOrderUpdater.php(59): Drupal\commerce_payment\PaymentOrderUpdater->updateOrder()
#32 /home/d/Work/gitlab/project-sandbox-d10/web/modules/contrib/commerce/modules/payment/src/PaymentOrderUpdater.php(112): Drupal\commerce_payment\PaymentOrderUpdater->updateOrders()
#33 /home/d/Work/gitlab/project-sandbox-d10/web/core/lib/Drupal/Core/EventSubscriber/KernelDestructionSubscriber.php(51): Drupal\commerce_payment\PaymentOrderUpdater->destruct()
#34 [internal function]: Drupal\Core\EventSubscriber\KernelDestructionSubscriber->onKernelTerminate()
#35 /home/d/Work/gitlab/project-sandbox-d10/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func()
#36 /home/d/Work/gitlab/project-sandbox-d10/vendor/symfony/http-kernel/HttpKernel.php(115): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#37 /home/d/Work/gitlab/project-sandbox-d10/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(63): Symfony\Component\HttpKernel\HttpKernel->terminate()
#38 /home/d/Work/gitlab/project-sandbox-d10/web/core/lib/Drupal/Core/DrupalKernel.php(688): Drupal\Core\StackMiddleware\StackedHttpKernel->terminate()
#39 /home/d/Work/gitlab/project-sandbox-d10/web/index.php(22): Drupal\Core\DrupalKernel->terminate()
#40 {main}

πŸ› Bug report
Status

Fixed

Version

1.1

Component

Code

Created by

πŸ‡²πŸ‡©Moldova nick.murza Moldova

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024