Leaked metadata was detected

Created on 19 August 2022, almost 2 years ago
Updated 13 February 2023, over 1 year ago

Problem/Motivation

When accessing e.g. /openid-connect/google/redirect , the browser displays the generic "The website encountered an unexpected error. Please try again later.". The apache error log records:

Uncaught PHP Exception LogicException: "The controller result claims to be providing relevant cache metadata, but leaked metadata was detected. Please ensure you are not rendering content too early. Returned object class: Drupal\\Core\\Routing\\TrustedRedirectResponse." at /path/to/drupal/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php line 154

I am using Drupal 9.4.5 hosted on Ubuntu 20.04 and PHP 7.4.3

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom alt36

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡΅πŸ‡­Philippines mjgruta

    Having the same issue. Using the following:
    Drupal: 8.9.19
    PHP: 7.3.28
    openid_connect: 8.x-1.2
    openid_connect_windows_aad: 8.x-1.4
    openid_connect_login_redirect: 1.0.0-beta2

    LogicException: The controller result claims to be providing relevant cache metadata, but leaked metadata was detected. Please ensure you are not rendering content too early. Returned object class: Drupal\Core\Routing\TrustedRedirectResponse. in Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (line 154 of /var/www/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php).

Production build 0.69.0 2024