On Drupal 10.2.2 after updating to 2.0.0 when trying to login, get taken to Access Denied page, with this error logged below. Goes away when unchecking Active within the module.

RuntimeException: Failed to start the session because headers have already been sent by "/home/user/web/website.com/public_html/vendor/symfony/http-foundation/Response.php" at line 433. in Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start() (line 132 of /home/user/web/website.com/public_html/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php)

#0 /home/user/web/website.com/public_html/web/core/lib/Drupal/Core/Session/SessionManager.php(144): Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start()
#1 /home/user/web/website.com/public_html/web/core/lib/Drupal/Core/Session/SessionManager.php(109): Drupal\Core\Session\SessionManager->startNow()
#2 /home/user/web/website.com/public_html/vendor/symfony/http-foundation/Session/Session.php(59): Drupal\Core\Session\SessionManager->start()
#3 /home/user/web/website.com/public_html/web/core/modules/big_pipe/src/Render/BigPipe.php(240): Symfony\Component\HttpFoundation\Session\Session->start()
#4 /home/user/web/website.com/public_html/web/core/modules/big_pipe/src/Render/BigPipe.php(295): Drupal\big_pipe\Render\BigPipe->performPreSendTasks()
#5 /home/user/web/website.com/public_html/web/core/modules/big_pipe/src/Render/BigPipeResponse.php(112): Drupal\big_pipe\Render\BigPipe->sendContent()
#6 /home/user/web/website.com/public_html/vendor/symfony/http-foundation/Response.php(425): Drupal\big_pipe\Render\BigPipeResponse->sendContent()
#7 /home/user/web/website.com/public_html/web/index.php(20): Symfony\Component\HttpFoundation\Response->send()
#8 {main}

.

Issue fork email_tfa-3418819

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

peterbkk created an issue. See original summary.

abdulaziz zaid’s picture

Thx peterbkk,

can you give me the steps?

I tested and the error is not showing.

Drupal 10.2.2
PHP 8.2

peterbkk’s picture

Hi Abdulaziz,

I went through my settings again, I should of provided this information originally sorry.

If I set to be Globally Enabled and Force Email TFA for Specific roles, users of those roles will get the email code and can login as expected.

When I try to login with a user that doesn't have an enforced role, they get access denied and the error I mentioned above gets logged.

These same settings on 1.0.7 work correctly however, with the idea being only users with roles that have elevated permissions are forced to use Email TFA.

Great module by the way, thank you.

abdulaziz zaid’s picture

Status: Active » Needs review
StatusFileSize
new535 bytes

Hi peterbkk,

Thank you for clarifying.

Can you try the patch?

peterbkk’s picture

Hi Abdulaziz,

That patch resolved the issue, thank you so much!

  • abdulaziz zaid committed 62705241 on 2.0.x
    Issue #3418819 by abdulaziz zaid, peterbkk: RuntimeException: Failed to...
abdulaziz zaid’s picture

Status: Needs review » Fixed
abdulaziz zaid’s picture

Status: Fixed » Closed (fixed)

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