Problem/Motivation

Cannot log in using Drupal account, but can with miniOrange SSO

Steps to reproduce

  1. Log out
  2. Log back in using Drupal account

Expect to be logged in - a session started.

Instead:

You see the logged in page, but also the login link at the top right hand side and no menu items.

This error appears in the error log:

RuntimeException: Failed to start the session because headers have already been sent by "<drupal root>/vendor/symfony/http-foundation/Response.php" at line 1224. in Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage->start() (line 152 of <drupal root>/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php)
#0 <drupal root>/web/core/lib/Drupal/Core/Session/SessionManager.php(162): Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage->start()
#1 <drupal root>/web/core/lib/Drupal/Core/Session/SessionManager.php(193): Drupal/Core/Session/SessionManager->startNow()
#2 <drupal root>/vendor/symfony/http-foundation/Session/Session.php(189): Drupal/Core/Session/SessionManager->save()
#3 <drupal root>/web/core/lib/Drupal/Core/StackMiddleware/Session.php(60): Symfony/Component/HttpFoundation/Session/Session->save()
#4 <drupal root>/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal/Core/StackMiddleware/Session->handle()
#5 <drupal root>/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal/Core/StackMiddleware/KernelPreHandle->handle()
#6 <drupal root>/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal/page_cache/StackMiddleware/PageCache->pass()
#7 <drupal root>/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal/page_cache/StackMiddleware/PageCache->handle()
#8 <drupal root>/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal/Core/StackMiddleware/ReverseProxyMiddleware->handle()
#9 <drupal root>/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal/Core/StackMiddleware/NegotiationMiddleware->handle()
#10 <drupal root>/web/core/lib/Drupal/Core/DrupalKernel.php(716): Stack/StackedHttpKernel->handle()
#11 <drupal root>/web/index.php(19): Drupal/Core/DrupalKernel->handle()
#12 {main}

Environment

  • OS - Windows 10 and Windows Database Server
  • Web server - IIS
  • PHP v7.4
  • Database - MySQL 8.0
  • Drupal 9.2.0
  • Browser - Edge, Chrome ot Firefox

Proposed resolution

Commenting out line 1224 of <drupal root>/vendor/symfony/http-foundation/Response.php appears to cure the issue, but I am worried about side effects. My knowledge of Drupal is insufficient to be able to determine this - it was a quick fix, but someone with more knowledge than I can probably determine where the patch should really take place.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

spalmstrom created an issue. See original summary.

longwave’s picture

larowlan’s picture

Status: Active » Postponed (maintainer needs more info)
Issue tags: -user login +Bug Smash Initiative

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.1.10 (June 4, 2021) and Drupal 9.2.10 (November 24, 2021) were the last bugfix releases of those minor version series. Drupal 9 bug reports should be targeted for the 9.3.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

kristen pol’s picture

Thanks for reporting this issue. We rely on issue reports like this one to resolve bugs and improve Drupal core.

As part of the Bug Smash Initiative, we are triaging issues that are marked "Postponed (maintainer needs more info)". This issue was marked "Postponed (maintainer needs more info)" more than a year ago, and there has been no activity since then.

Since we need more information to move forward with this issue, I am keeping the status at Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

Thanks!

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

tinto’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

I have tried to reproduce this behaviour on a production site that uses MiniOrange SSO, but I could not recreate the errors described in the issue summary. I realize this may not be the ideal environment to attempt to recreate this issue, but it couldn't hurt to try. :)

By the way, is this really a core issue if it requires installing a contrib module?

Considering the result of my attempt and taking into account the fact that this issue has gone stale quite some time ago, with no further updates despite previous requests for further info, I'm closing this issue.

If anyone does manage to recreate this problem, please feel free to reopen this issue and provide clear steps to reproduce (starting with "Install a fresh install of Drupal version..."). Thank you!