Uncaught PHP Exception TypeError: "Drupal\Core\Render\Renderer::doTrustedCallback(): Argument #1 ($callback) must be of type callable, array given, called in /core/lib/Drupal/Core/Render/Renderer.php on line 797" at /core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php line 57

This issue has been occurring since I upgraded Drupal (From Drupal 9.5.5 to Drupal 10.1.5). This issue is only coming after loggedin.

This issue is happening in AWS but not in my local not sure why this is happening.

User interface changes

Release notes snippet

Thanks in advance.

Comments

rahul_sankrit created an issue. See original summary.

cilefen’s picture

Status: Active » Postponed (maintainer needs more info)
Issue tags: -core

This looks like a duplicate of #3224723: Issue with doTrustedCallback() must be callable, array given. Please confirm that.

rahul_sankrit’s picture

Yes, but the Drupal version is different.

cilefen’s picture

rahul_sankrit’s picture

This issue is resolved now for me.
I followed the following steps and the error was gone.
1. Update Drupal 9.5.11.
2. Then upgrade Drupal 10.1.3.
3. Finally Update the latest version of Drupal 10.1.6.

Thank you.

cilefen’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
amjad23’s picture

i have update the durpal 9.5 to 10.1.6 but i am facing issue

"Drupal\Core\Render\Renderer::doTrustedCallback(): Argument #1 ($callback) must be of type callable, array given, called in

and

TypeError: implode(): Argument #2 ($array) must be of type ?array, bool given in stack-cors/src/CorsService.php(199): implode(', ', true)