1

i am currently searching to fix the problem. After updating from Magento 2.3.5-p2 to 2.4 we get the following error message:

1 exception(s):
Exception #0 (InvalidArgumentException): Unable to serialize value. Error: Malformed UTF-8 characters, possibly incorrectly encoded

Exception #0 (InvalidArgumentException): Unable to serialize value. Error: Malformed UTF-8 characters, possibly incorrectly encoded
<pre>#1 Magento\ReCaptchaCustomer\Plugin\Block\Account\InjectRecaptchaInAuthenticationPopup->afterGetJsLayout(&Magento\Customer\Block\Account\AuthenticationPopup\Interceptor#00000000189bf373000000001cfdb34f#, '{"components":{"...') called at [vendor/magento/framework/Interception/Interceptor.php:146]
#2 Magento\Customer\Block\Account\AuthenticationPopup\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#3 Magento\Customer\Block\Account\AuthenticationPopup\Interceptor->___callPlugins('getJsLayout', array(), array(array('inject_recaptcha...'))) called at [generated/code/Magento/Customer/Block/Account/AuthenticationPopup/Interceptor.php:26]
#4 Magento\Customer\Block\Account\AuthenticationPopup\Interceptor->getJsLayout() called at [vendor/magento/module-customer/view/frontend/templates/account/authentication-popup.phtml:17]
#5 include('/var/www/share/m...') called at [vendor/magento/framework/View/TemplateEngine/Php.php:71]
#6 Magento\Framework\View\TemplateEngine\Php->render(&Magento\Customer\Block\Account\AuthenticationPopup\Interceptor#00000000189bf373000000001cfdb34f#, '/var/www/share/m...', array('csp' => &Magento\Csp\Api\InlineUtilInterface\Proxy#00000000189bee30000000001cfdb34f#, 'secureRenderer' => &Magento\Framework\View\Helper\SecureHtmlRenderer\Proxy#00000000189beba4000000001cfdb34f#, 'escaper' => &Magento\Framework\Escaper\Interceptor#00000000189bedc6000000001cfdb34f#)) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#7 Magento\Framework\View\TemplateEngine\Php\Interceptor->___callParent('render', array(&Magento\Customer\Block\Account\AuthenticationPopup\Interceptor#00000000189bf373000000001cfdb34f#, '/var/www/share/m...', array('escaper' => &Magento\Framework\Escaper\Interceptor#00000000189bedc6000000001cfdb34f#))) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#8 Magento\Framework\View\TemplateEngine\Php\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Customer\Block\Account\AuthenticationPopup\Interceptor#00000000189bf373000000001cfdb34f#, '/var/www/share/m...', array()) called at [app/code/Amasty/Fpc/Plugin/Holepunch/TemplateRenderer.php:58]
#9 Amasty\Fpc\Plugin\Holepunch\TemplateRenderer->aroundRender(&Magento\Framework\View\TemplateEngine\Php\Interceptor#00000000189be0de000000001cfdb34f#, &Closure#00000000189be1fa000000001cfdb34f#, &Magento\Customer\Block\Account\AuthenticationPopup\Interceptor#00000000189bf373000000001cfdb34f#, '/var/www/share/m...', array()) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#10 Magento\Framework\View\TemplateEngine\Php\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Customer\Block\Account\AuthenticationPopup\Interceptor#00000000189bf373000000001cfdb34f#, '/var/www/share/m...', array()) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#11 Magento\Framework\View\TemplateEngine\Php\Interceptor->___callPlugins('render', array(&Magento\Customer\Block\Account\AuthenticationPopup\Interceptor#00000000189bf373000000001cfdb34f#, '/var/www/share/m...', array()), array(array('Amasty_Base::Add...'))) called at [generated/code/Magento/Framework/View/TemplateEngine/Php/Interceptor.php:26]
#12 Magento\Framework\View\TemplateEngine\Php\Interceptor->render(&Magento\Customer\Block\Account\AuthenticationPopup\Interceptor#00000000189bf373000000001cfdb34f#, '/var/www/share/m...', array()) called at [vendor/magento/framework/View/Element/Template.php:273]
#13 Magento\Framework\View\Element\Template->fetchView('/var/www/share/m...') called at [generated/code/Magento/Customer/Block/Account/AuthenticationPopup/Interceptor.php:180]
#14 Magento\Customer\Block\Account\AuthenticationPopup\Interceptor->fetchView('/var/www/share/m...') called at [vendor/magento/framework/View/Element/Template.php:303]
#15 Magento\Framework\View\Element\Template->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1111]
#16 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1115]
#17 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:675]
#18 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#19 Magento\Customer\Block\Account\AuthenticationPopup\Interceptor->___callParent('toHtml', array()) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#20 Magento\Customer\Block\Account\AuthenticationPopup\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#21 Magento\Customer\Block\Account\AuthenticationPopup\Interceptor->___callPlugins('toHtml', array(), array(array('inject_plugin'))) called at [generated/code/Magento/Customer/Block/Account/AuthenticationPopup/Interceptor.php:481]
#22 Magento\Customer\Block\Account\AuthenticationPopup\Interceptor->toHtml() called at [vendor/magento/framework/View/Layout.php:566]
#23 Magento\Framework\View\Layout->_renderBlock('authentication-p...') called at [vendor/magento/framework/View/Layout.php:542]
#24 Magento\Framework\View\Layout->renderNonCachedElement('authentication-p...') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#25 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('authentication-p...') called at [vendor/magento/framework/View/Layout.php:497]
#26 Magento\Framework\View\Layout->renderElement('authentication-p...', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#27 Magento\Framework\View\Layout\Interceptor->renderElement('authentication-p...', false) called at [vendor/magento/framework/View/Layout.php:594]
#28 Magento\Framework\View\Layout->_renderContainer('content', false) called at [vendor/magento/framework/View/Layout.php:544]
#29 Magento\Framework\View\Layout->renderNonCachedElement('content') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#30 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('content') called at [vendor/magento/framework/View/Layout.php:497]
#31 Magento\Framework\View\Layout->renderElement('content', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#32 Magento\Framework\View\Layout\Interceptor->renderElement('content', false) called at [vendor/magento/framework/View/Layout.php:594]
#33 Magento\Framework\View\Layout->_renderContainer('main', false) called at [vendor/magento/framework/View/Layout.php:544]
#34 Magento\Framework\View\Layout->renderNonCachedElement('main') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#35 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main') called at [vendor/magento/framework/View/Layout.php:497]
#36 Magento\Framework\View\Layout->renderElement('main', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#37 Magento\Framework\View\Layout\Interceptor->renderElement('main', false) called at [vendor/magento/framework/View/Layout.php:594]
#38 Magento\Framework\View\Layout->_renderContainer('columns', false) called at [vendor/magento/framework/View/Layout.php:544]
#39 Magento\Framework\View\Layout->renderNonCachedElement('columns') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#40 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('columns') called at [vendor/magento/framework/View/Layout.php:497]
#41 Magento\Framework\View\Layout->renderElement('columns', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#42 Magento\Framework\View\Layout\Interceptor->renderElement('columns', false) called at [vendor/magento/framework/View/Layout.php:594]
#43 Magento\Framework\View\Layout->_renderContainer('main.content', false) called at [vendor/magento/framework/View/Layout.php:544]
#44 Magento\Framework\View\Layout->renderNonCachedElement('main.content') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#45 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main.content') called at [vendor/magento/framework/View/Layout.php:497]
#46 Magento\Framework\View\Layout->renderElement('main.content', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#47 Magento\Framework\View\Layout\Interceptor->renderElement('main.content', false) called at [vendor/magento/framework/View/Layout.php:594]
#48 Magento\Framework\View\Layout->_renderContainer('page.wrapper', false) called at [vendor/magento/framework/View/Layout.php:544]
#49 Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#50 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.wrapper') called at [vendor/magento/framework/View/Layout.php:497]
#51 Magento\Framework\View\Layout->renderElement('page.wrapper', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#52 Magento\Framework\View\Layout\Interceptor->renderElement('page.wrapper', false) called at [vendor/magento/framework/View/Layout.php:594]
#53 Magento\Framework\View\Layout->_renderContainer('root', false) called at [vendor/magento/framework/View/Layout.php:544]
#54 Magento\Framework\View\Layout->renderNonCachedElement('root') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#55 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('root') called at [vendor/magento/framework/View/Layout.php:497]
#56 Magento\Framework\View\Layout->renderElement('root', true) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#57 Magento\Framework\View\Layout\Interceptor->renderElement('root') called at [vendor/magento/framework/View/Layout.php:963]
#58 Magento\Framework\View\Layout->getOutput() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#59 Magento\Framework\View\Layout\Interceptor->___callParent('getOutput', array()) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#60 Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#61 Magento\Framework\View\Layout\Interceptor->___callPlugins('getOutput', array(), array(array('layout-model-cac...'))) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:494]
#62 Magento\Framework\View\Layout\Interceptor->getOutput() called at [vendor/magento/framework/View/Result/Page.php:258]
#63 Magento\Framework\View\Result\Page->render(&Magento\Framework\App\Response\Http\Interceptor#00000000189be84b000000001cfdb34f#) called at [vendor/magento/framework/View/Result/Layout.php:171]
#64 Magento\Framework\View\Result\Layout->renderResult(&Magento\Framework\App\Response\Http\Interceptor#00000000189be84b000000001cfdb34f#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#65 Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', array(&Magento\Framework\App\Response\Http\Interceptor#00000000189be84b000000001cfdb34f#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#66 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Response\Http\Interceptor#00000000189be84b000000001cfdb34f#) called at [app/code/Amasty/GdprCookie/Plugin/ProcessPageResult.php:57]
#67 Amasty\GdprCookie\Plugin\ProcessPageResult->aroundRenderResult(&Magento\Framework\View\Result\Page\Interceptor#00000000189be1ca000000001cfdb34f#, &Closure#00000000189bed39000000001cfdb34f#, &Magento\Framework\App\Response\Http\Interceptor#00000000189be84b000000001cfdb34f#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#68 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Response\Http\Interceptor#00000000189be84b000000001cfdb34f#) called at [app/code/Amasty/PageSpeedOptimizer/Plugin/ProcessPageResult.php:40]
#69 Amasty\PageSpeedOptimizer\Plugin\ProcessPageResult->aroundRenderResult(&Magento\Framework\View\Result\Page\Interceptor#00000000189be1ca000000001cfdb34f#, &Closure#00000000189bed39000000001cfdb34f#, &Magento\Framework\App\Response\Http\Interceptor#00000000189be84b000000001cfdb34f#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#70 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Response\Http\Interceptor#00000000189be84b000000001cfdb34f#) called at [app/code/Magezon/Core/Plugin/View/Result/Layout.php:24]
#71 Magezon\Core\Plugin\View\Result\Layout->aroundRenderResult(&Magento\Framework\View\Result\Page\Interceptor#00000000189be1ca000000001cfdb34f#, &Closure#00000000189bed39000000001cfdb34f#, &Magento\Framework\App\Response\Http\Interceptor#00000000189be84b000000001cfdb34f#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#72 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Response\Http\Interceptor#00000000189be84b000000001cfdb34f#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#73 Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', array(&Magento\Framework\App\Response\Http\Interceptor#00000000189be84b000000001cfdb34f#), NULL) called at [generated/code/Magento/Framework/View/Result/Page/Interceptor.php:130]
#74 Magento\Framework\View\Result\Page\Interceptor->renderResult(&Magento\Framework\App\Response\Http\Interceptor#00000000189be84b000000001cfdb34f#) called at [vendor/magento/framework/App/Http.php:120]
#75 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]
#76 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:263]
#77 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#00000000189be810000000001cfdb34f#) called at [index.php:39]
</pre>

Anyone a solution approach?

1 Answer 1

7

The previous version of reCaptcha, msp/recaptcha, stored the keys in plain text. It appears that the migration to the replacement magento modules copies the keys to the new core_config_data paths. However these are configured to be encrypted. So, when 2.4.x loads these values and decrypts them, the result is the malformed UTF-8 in your error.

Deleting and re-saving the keys (for all stores) should resolve the problem

2
  • Legend! That did it. Too many people encouraging others to edit core vendor files as a solution to this problem.
    – Tobe_Sta
    Commented Jan 10, 2022 at 0:08
  • The issue is referenced here - github.com/magento/magento2/issues/30486
    – bjjn
    Commented Jan 20, 2022 at 9:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.