- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Exception #0 (InvalidArgumentException): Unable to serialize value. Error: Malformed UTF-8 character
Since upgrading from 2.3.5 to 2.4 I am getting the following on all pages on the frontend.
I have cleared all caches, tried editing the json file relating to serializing with no joy.
Any help greatly appreciated.
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#000000007612b3790000000073f665aa#, '{"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('/home/maryjanela...') called at [vendor/magento/framework/View/TemplateEngine/Php.php:71] #6 Magento\Framework\View\TemplateEngine\Php->render(&Magento\Customer\Block\Account\AuthenticationPopup\Interceptor#000000007612b3790000000073f665aa#, '/home/maryjanela...', array('csp' => &Magento\Csp\Api\InlineUtilInterface\Proxy#000000007612bd530000000073f665aa#, 'secureRenderer' => &Magento\Framework\View\Helper\SecureHtmlRenderer\Proxy#000000007612bd520000000073f665aa#, 'escaper' => &Magento\Framework\Escaper#000000007612b4520000000073f665aa#)) called at [vendor/magento/framework/View/Element/Template.php:273] #7 Magento\Framework\View\Element\Template->fetchView('/home/maryjanela...') called at [generated/code/Magento/Customer/Block/Account/AuthenticationPopup/Interceptor.php:180] #8 Magento\Customer\Block\Account\AuthenticationPopup\Interceptor->fetchView('/home/maryjanela...') called at [vendor/magento/framework/View/Element/Template.php:303] #9 Magento\Framework\View\Element\Template->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1111] #10 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1115] #11 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:675] #12 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [generated/code/Magento/Customer/Block/Account/AuthenticationPopup/Interceptor.php:479] #13 Magento\Customer\Block\Account\AuthenticationPopup\Interceptor->toHtml() called at [vendor/magento/framework/View/Layout.php:566] #14 Magento\Framework\View\Layout->_renderBlock('authentication-p...') called at [vendor/magento/framework/View/Layout.php:542] #15 Magento\Framework\View\Layout->renderNonCachedElement('authentication-p...') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206] #16 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('authentication-p...') called at [vendor/magento/framework/View/Layout.php:497] #17 Magento\Framework\View\Layout->renderElement('authentication-p...', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193] #18 Magento\Framework\View\Layout\Interceptor->renderElement('authentication-p...', false) called at [vendor/magento/framework/View/Layout.php:594] #19 Magento\Framework\View\Layout->_renderContainer('content', false) called at [vendor/magento/framework/View/Layout.php:544] #20 Magento\Framework\View\Layout->renderNonCachedElement('content') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206] #21 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('content') called at [vendor/magento/framework/View/Layout.php:497] #22 Magento\Framework\View\Layout->renderElement('content', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193] #23 Magento\Framework\View\Layout\Interceptor->renderElement('content', false) called at [vendor/magento/framework/View/Layout.php:594] #24 Magento\Framework\View\Layout->_renderContainer('main', false) called at [vendor/magento/framework/View/Layout.php:544] #25 Magento\Framework\View\Layout->renderNonCachedElement('main') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206] #26 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main') called at [vendor/magento/framework/View/Layout.php:497] #27 Magento\Framework\View\Layout->renderElement('main', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193] #28 Magento\Framework\View\Layout\Interceptor->renderElement('main', false) called at [vendor/magento/framework/View/Layout.php:594] #29 Magento\Framework\View\Layout->_renderContainer('columns', false) called at [vendor/magento/framework/View/Layout.php:544] #30 Magento\Framework\View\Layout->renderNonCachedElement('columns') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206] #31 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('columns') called at [vendor/magento/framework/View/Layout.php:497] #32 Magento\Framework\View\Layout->renderElement('columns', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193] #33 Magento\Framework\View\Layout\Interceptor->renderElement('columns', false) called at [vendor/magento/framework/View/Layout.php:594] #34 Magento\Framework\View\Layout->_renderContainer('main.content', false) called at [vendor/magento/framework/View/Layout.php:544] #35 Magento\Framework\View\Layout->renderNonCachedElement('main.content') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206] #36 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main.content') called at [vendor/magento/framework/View/Layout.php:497] #37 Magento\Framework\View\Layout->renderElement('main.content', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193] #38 Magento\Framework\View\Layout\Interceptor->renderElement('main.content', false) called at [vendor/magento/framework/View/Layout.php:594] #39 Magento\Framework\View\Layout->_renderContainer('page.wrapper', false) called at [vendor/magento/framework/View/Layout.php:544] #40 Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206] #41 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.wrapper') called at [vendor/magento/framework/View/Layout.php:497] #42 Magento\Framework\View\Layout->renderElement('page.wrapper', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193] #43 Magento\Framework\View\Layout\Interceptor->renderElement('page.wrapper', false) called at [vendor/magento/framework/View/Layout.php:594] #44 Magento\Framework\View\Layout->_renderContainer('root', false) called at [vendor/magento/framework/View/Layout.php:544] #45 Magento\Framework\View\Layout->renderNonCachedElement('root') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206] #46 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('root') called at [vendor/magento/framework/View/Layout.php:497] #47 Magento\Framework\View\Layout->renderElement('root', true) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193] #48 Magento\Framework\View\Layout\Interceptor->renderElement('root') called at [vendor/magento/framework/View/Layout.php:963] #49 Magento\Framework\View\Layout->getOutput() called at [vendor/magento/framework/Interception/Interceptor.php:58] #50 Magento\Framework\View\Layout\Interceptor->___callParent('getOutput', array()) called at [vendor/magento/framework/Interception/Interceptor.php:138] #51 Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153] #52 Magento\Framework\View\Layout\Interceptor->___callPlugins('getOutput', array(), array(array('layout-model-cac...', 'cloudflare-plugi...'))) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:494] #53 Magento\Framework\View\Layout\Interceptor->getOutput() called at [vendor/magento/framework/View/Result/Page.php:258] #54 Magento\Framework\View\Result\Page->render(&Magento\Framework\App\Response\Http\Interceptor#000000007612b5b10000000073f665aa#) called at [vendor/magento/framework/View/Result/Layout.php:171] #55 Magento\Framework\View\Result\Layout->renderResult(&Magento\Framework\App\Response\Http\Interceptor#000000007612b5b10000000073f665aa#) called at [vendor/magento/framework/Interception/Interceptor.php:58] #56 Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', array(&Magento\Framework\App\Response\Http\Interceptor#000000007612b5b10000000073f665aa#)) called at [vendor/magento/framework/Interception/Interceptor.php:138] #57 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Response\Http\Interceptor#000000007612b5b10000000073f665aa#) called at [app/code/Magefan/RocketJavaScript/Model/Controller/ResultPlugin.php:57] #58 Magefan\RocketJavaScript\Model\Controller\ResultPlugin->aroundRenderResult(&Magento\Framework\View\Result\Page\Interceptor#000000007612b0d30000000073f665aa#, &Closure#000000007612b46f0000000073f665aa#, &Magento\Framework\App\Response\Http\Interceptor#000000007612b5b10000000073f665aa#) called at [vendor/magento/framework/Interception/Interceptor.php:135] #59 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Response\Http\Interceptor#000000007612b5b10000000073f665aa#) called at [vendor/magento/framework/Interception/Interceptor.php:153] #60 Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', array(&Magento\Framework\App\Response\Http\Interceptor#000000007612b5b10000000073f665aa#), NULL) called at [generated/code/Magento/Framework/View/Result/Page/Interceptor.php:130] #61 Magento\Framework\View\Result\Page\Interceptor->renderResult(&Magento\Framework\App\Response\Http\Interceptor#000000007612b5b10000000073f665aa#) called at [vendor/magento/framework/App/Http.php:120] #62 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24] #63 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:263] #64 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#000000007612b5b70000000073f665aa#) called at [index.php:39] </pre>
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Exception #0 (InvalidArgumentException): Unable to serialize value. Error: Malformed UTF-8 chara
Hello @pickardo
Can you try below answer if it works for you :
Hope it works !

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Exception #0 (InvalidArgumentException): Unable to serialize value. Error: Malformed UTF-8 chara
I have tried the above, it seems to have solved the homepage, category and product pages but when going to checkout it throws this error...
1 exception(s): Exception #0 (InvalidArgumentException): Unable to serialize value. Exception #0 (InvalidArgumentException): Unable to serialize value. <pre>#1 Magento\Checkout\Block\Onepage->getJsLayout() called at [vendor/magento/framework/Interception/Interceptor.php:58] #2 Magento\Checkout\Block\Onepage\Interceptor->___callParent('getJsLayout', array()) called at [vendor/magento/framework/Interception/Interceptor.php:138] #3 Magento\Checkout\Block\Onepage\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153] #4 Magento\Checkout\Block\Onepage\Interceptor->___callPlugins('getJsLayout', array(), array(array('klarnaKpOnepageC...'))) called at [generated/code/Magento/Checkout/Block/Onepage/Interceptor.php:26] #5 Magento\Checkout\Block\Onepage\Interceptor->getJsLayout() called at [vendor/magento/module-checkout/view/frontend/templates/onepage.phtml:23] #6 include('/home/maryjanela...') called at [vendor/magento/framework/View/TemplateEngine/Php.php:71] #7 Magento\Framework\View\TemplateEngine\Php->render(&Magento\Checkout\Block\Onepage\Interceptor#000000003c218da500000000231fbcb5#, '/home/maryjanela...', array('csp' => &Magento\Csp\Api\InlineUtilInterface\Proxy#000000003c218c1600000000231fbcb5#, 'secureRenderer' => &Magento\Framework\View\Helper\SecureHtmlRenderer\Proxy#000000003c218c1700000000231fbcb5#, 'escaper' => &Magento\Framework\Escaper#000000003c21864e00000000231fbcb5#)) called at [vendor/magento/framework/View/Element/Template.php:273] #8 Magento\Framework\View\Element\Template->fetchView('/home/maryjanela...') called at [vendor/magento/framework/View/Element/Template.php:303] #9 Magento\Framework\View\Element\Template->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1111] #10 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1115] #11 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:675] #12 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [vendor/magento/framework/View/Layout.php:566] #13 Magento\Framework\View\Layout->_renderBlock('checkout.root') called at [vendor/magento/framework/View/Layout.php:542] #14 Magento\Framework\View\Layout->renderNonCachedElement('checkout.root') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206] #15 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('checkout.root') called at [vendor/magento/framework/View/Layout.php:497] #16 Magento\Framework\View\Layout->renderElement('checkout.root', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193] #17 Magento\Framework\View\Layout\Interceptor->renderElement('checkout.root', false) called at [vendor/magento/framework/View/Layout.php:594] #18 Magento\Framework\View\Layout->_renderContainer('content', false) called at [vendor/magento/framework/View/Layout.php:544] #19 Magento\Framework\View\Layout->renderNonCachedElement('content') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206] #20 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('content') called at [vendor/magento/framework/View/Layout.php:497] #21 Magento\Framework\View\Layout->renderElement('content', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193] #22 Magento\Framework\View\Layout\Interceptor->renderElement('content', false) called at [vendor/magento/framework/View/Layout.php:594] #23 Magento\Framework\View\Layout->_renderContainer('main', false) called at [vendor/magento/framework/View/Layout.php:544] #24 Magento\Framework\View\Layout->renderNonCachedElement('main') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206] #25 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main') called at [vendor/magento/framework/View/Layout.php:497] #26 Magento\Framework\View\Layout->renderElement('main', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193] #27 Magento\Framework\View\Layout\Interceptor->renderElement('main', false) called at [vendor/magento/framework/View/Layout.php:594] #28 Magento\Framework\View\Layout->_renderContainer('columns', false) called at [vendor/magento/framework/View/Layout.php:544] #29 Magento\Framework\View\Layout->renderNonCachedElement('columns') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206] #30 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('columns') called at [vendor/magento/framework/View/Layout.php:497] #31 Magento\Framework\View\Layout->renderElement('columns', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193] #32 Magento\Framework\View\Layout\Interceptor->renderElement('columns', false) called at [vendor/magento/framework/View/Layout.php:594] #33 Magento\Framework\View\Layout->_renderContainer('main.content', false) called at [vendor/magento/framework/View/Layout.php:544] #34 Magento\Framework\View\Layout->renderNonCachedElement('main.content') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206] #35 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main.content') called at [vendor/magento/framework/View/Layout.php:497] #36 Magento\Framework\View\Layout->renderElement('main.content', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193] #37 Magento\Framework\View\Layout\Interceptor->renderElement('main.content', false) called at [vendor/magento/framework/View/Layout.php:594] #38 Magento\Framework\View\Layout->_renderContainer('page.wrapper', false) called at [vendor/magento/framework/View/Layout.php:544] #39 Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206] #40 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.wrapper') called at [vendor/magento/framework/View/Layout.php:497] #41 Magento\Framework\View\Layout->renderElement('page.wrapper', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193] #42 Magento\Framework\View\Layout\Interceptor->renderElement('page.wrapper', false) called at [vendor/magento/framework/View/Layout.php:594] #43 Magento\Framework\View\Layout->_renderContainer('root', false) called at [vendor/magento/framework/View/Layout.php:544] #44 Magento\Framework\View\Layout->renderNonCachedElement('root') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206] #45 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('root') called at [vendor/magento/framework/View/Layout.php:497] #46 Magento\Framework\View\Layout->renderElement('root', true) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193] #47 Magento\Framework\View\Layout\Interceptor->renderElement('root') called at [vendor/magento/framework/View/Layout.php:963] #48 Magento\Framework\View\Layout->getOutput() called at [vendor/magento/framework/Interception/Interceptor.php:58] #49 Magento\Framework\View\Layout\Interceptor->___callParent('getOutput', array()) called at [vendor/magento/framework/Interception/Interceptor.php:138] #50 Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153] #51 Magento\Framework\View\Layout\Interceptor->___callPlugins('getOutput', array(), array(array('layout-model-cac...', 'cloudflare-plugi...'))) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:494] #52 Magento\Framework\View\Layout\Interceptor->getOutput() called at [vendor/magento/framework/View/Result/Page.php:258] #53 Magento\Framework\View\Result\Page->render(&Magento\Framework\App\Response\Http\Interceptor#000000003c2187ad00000000231fbcb5#) called at [vendor/magento/framework/View/Result/Layout.php:171] #54 Magento\Framework\View\Result\Layout->renderResult(&Magento\Framework\App\Response\Http\Interceptor#000000003c2187ad00000000231fbcb5#) called at [vendor/magento/framework/Interception/Interceptor.php:58] #55 Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', array(&Magento\Framework\App\Response\Http\Interceptor#000000003c2187ad00000000231fbcb5#)) called at [vendor/magento/framework/Interception/Interceptor.php:138] #56 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Response\Http\Interceptor#000000003c2187ad00000000231fbcb5#) called at [app/code/Magefan/RocketJavaScript/Model/Controller/ResultPlugin.php:57] #57 Magefan\RocketJavaScript\Model\Controller\ResultPlugin->aroundRenderResult(&Magento\Framework\View\Result\Page\Interceptor#000000003c21803300000000231fbcb5#, &Closure#000000003c21867300000000231fbcb5#, &Magento\Framework\App\Response\Http\Interceptor#000000003c2187ad00000000231fbcb5#) called at [vendor/magento/framework/Interception/Interceptor.php:135] #58 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Response\Http\Interceptor#000000003c2187ad00000000231fbcb5#) called at [vendor/magento/framework/Interception/Interceptor.php:153] #59 Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', array(&Magento\Framework\App\Response\Http\Interceptor#000000003c2187ad00000000231fbcb5#), NULL) called at [generated/code/Magento/Framework/View/Result/Page/Interceptor.php:130] #60 Magento\Framework\View\Result\Page\Interceptor->renderResult(&Magento\Framework\App\Response\Http\Interceptor#000000003c2187ad00000000231fbcb5#) called at [vendor/magento/framework/App/Http.php:120] #61 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24] #62 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:263] #63 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#000000003c2187ab00000000231fbcb5#) called at [index.php:39] </pre>
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Exception #0 (InvalidArgumentException): Unable to serialize value. Error: Malformed UTF-8 chara
Please run below commands :
chmod -R 777 pub/static/ pub/media/ var/ generated/ rm -rf generated/metadata/ generated/code/ var/cache/mage- var/page_cache/mage- var/view_preprocessed/ var/di/ pub/static/_* pub/static/frontend/ pub/static/adminhtml/ php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy -f php bin/magento c:f chmod -R 777 pub/static/ pub/media/ var/ generated/
Let us know if still doesn't work after this !

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Exception #0 (InvalidArgumentException): Unable to serialize value. Error: Malformed UTF-8 chara
Hi Guarav,
I entered the commands and still no joy at checkout 🤷♂️
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Exception #0 (InvalidArgumentException): Unable to serialize value. Error: Malformed UTF-8 chara
If you have varnish cache installed, please refresh varnish cache.
Also check in incognito mode.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Exception #0 (InvalidArgumentException): Unable to serialize value. Error: Malformed UTF-8 chara
I use redis, used redis-cli FLUSHALL and FLUSHDB and checked in incognito mode still the same issue.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Exception #0 (InvalidArgumentException): Unable to serialize value. Error: Malformed UTF-8 chara
I'm not quit sure why this has worked but I disabled onepage checkout, cleared the cache then reenabled it and it now seems to be working ok.
I'm guessing this had something to do with the cache not clearing properly somewhere.
Thank you for your help 👌😎
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Exception #0 (InvalidArgumentException): Unable to serialize value. Error: Malformed UTF-8 chara
I was running into the same error. What i found fixed it was making sure you have Google Recaptha turned off. I haven't tried it with valid keys yet but turning them all off under the security tab fixed my issue.
Rich
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Exception #0 (InvalidArgumentException): Unable to serialize value. Error: Malformed UTF-8 chara
Magento 2 checkout cart showing unable to unserialize value. Error syntax error for that error this solution may work.
Go to this path and replace method with below code. After applying this code please run below command
redis-cli flushall
vendor/magento/framework/Serialize/Serializer/Json.php
public function unserialize($string)
{
$result = json_decode($string, true);
if (json_last_error() !== JSON_ERROR_NONE) {
if(false !== @unserialize($string)){
return unserialize($string);
}
throw new \InvalidArgumentException('Unable to unserialize value.');
}
return $result;
}
And try to override this file using preference :
<preference for="Magento\Framework\Serialize\Serializer\Json" type="Namespace\ModuleName\Serialize\Serializer\Json" />