Embed code problem after drupal cache clearing

Hi friends,

could you help me with this issue:

When someone put to his site generated code of h5p content from my Drupal 8 site, after every clearing drupal cache(for examp. "drush cr" command) on clients side(where embed code is inserted) instead the content appears:
"The website encountered an unexpected error. Please try again later." - message.

In the other hand drupal log messages showing next error:

"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\Render\HtmlResponse. in Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (line 154 of /home/user/web/mysite.com/public_html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php)."

How to solve this issue? :/

Thank you!

   
fnoks's picture

There's an issue for this problem here: https://h5ptechnology.atlassian.net/browse/HFP-1971

I know, this issue was created based my question.

Hello, I am encountering the same issue. Is there a chance this issue has a solution? It's also posted on the Drupal site as well.