cancel
Showing results for 
Search instead for 
Did you mean: 

Upgrade to Magento 2.2.1 - Unable to unserialize value

SOLVED

Upgrade to Magento 2.2.1 - Unable to unserialize value

Hi,

I'm facing "Unable to unserialize valu"

Exception #0 (InvalidArgumentException): Unable to unserialize value.
#0 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/module-eav/Model/Attribute.php(109): Magento\Framework\Serialize\Serializer\Json->unserialize('a:2:{s:15:"max_...')
#1 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/module-customer/Model/AttributeMetadataConverter.php(90): Magento\Eav\Model\Attribute->getValidateRules()
#2 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/module-customer/Model/Metadata/CustomerMetadata.php(77): Magento\Customer\Model\AttributeMetadataConverter->createMetadataAttribute(Object(Magento\Customer\Model\Attribute))
#3 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/module-customer/Model/Metadata/CachedMetadata.php(71): Magento\Customer\Model\Metadata\CustomerMetadata->getAttributeMetadata('firstname')
#4 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/module-customer/Block/Widget/AbstractWidget.php(99): Magento\Customer\Model\Metadata\CachedMetadata->getAttributeMetadata('firstname')
#5 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/module-customer/Block/Widget/Name.php(203): Magento\Customer\Block\Widget\AbstractWidget->_getAttribute('firstname')
#6 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/module-customer/Block/Widget/Name.php(230): Magento\Customer\Block\Widget\Name->_getAttribute('firstname')
#7 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/module-customer/view/frontend/templates/widget/name.phtml(69): Magento\Customer\Block\Widget\Name->getStoreLabel('firstname')
#8 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/TemplateEngine/Php.php(59): include('/hsphere/local/...')
#9 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Element/Template.php(270): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Customer\Block\Widget\Name), '/hsphere/local/...', Array)
#10 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Element/Template.php(300): Magento\Framework\View\Element\Template->fetchView('/hsphere/local/...')
#11 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Element/AbstractBlock.php(667): Magento\Framework\View\Element\Template->_toHtml()
#12 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/module-customer/view/frontend/templates/form/register.phtml(20): Magento\Framework\View\Element\AbstractBlock->toHtml()
#13 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/TemplateEngine/Php.php(59): include('/hsphere/local/...')
#14 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Element/Template.php(270): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Customer\Block\Form\Register), '/hsphere/local/...', Array)
#15 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Element/Template.php(300): Magento\Framework\View\Element\Template->fetchView('/hsphere/local/...')
#16 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Element/AbstractBlock.php(667): Magento\Framework\View\Element\Template->_toHtml()
#17 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Layout.php(558): Magento\Framework\View\Element\AbstractBlock->toHtml()
#18 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Layout.php(534): Magento\Framework\View\Layout->_renderBlock('customer_form_r...')
#19 /hsphere/local/home/forevera/foreveramber.biz/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('customer_form_r...')
#20 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('customer_form_r...')
#21 /hsphere/local/home/forevera/foreveramber.biz/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('customer_form_r...', true)
#22 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('customer_form_r...')
#23 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('content')
#24 /hsphere/local/home/forevera/foreveramber.biz/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('content')
#25 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('content')
#26 /hsphere/local/home/forevera/foreveramber.biz/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('content', true)
#27 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('content')
#28 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('main')
#29 /hsphere/local/home/forevera/foreveramber.biz/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('main')
#30 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main')
#31 /hsphere/local/home/forevera/foreveramber.biz/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('main', true)
#32 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('main')
#33 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('columns')
#34 /hsphere/local/home/forevera/foreveramber.biz/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('columns')
#35 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('columns')
#36 /hsphere/local/home/forevera/foreveramber.biz/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('columns', true)
#37 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('columns')
#38 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('main.content')
#39 /hsphere/local/home/forevera/foreveramber.biz/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('main.content')
#40 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main.content')
#41 /hsphere/local/home/forevera/foreveramber.biz/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('main.content', true)
#42 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('main.content')
#43 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('page.wrapper')
#44 /hsphere/local/home/forevera/foreveramber.biz/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper')
#45 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.wrapper')
#46 /hsphere/local/home/forevera/foreveramber.biz/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('page.wrapper', true)
#47 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('page.wrapper')
#48 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Layout.php(536): Magento\Framework\View\Layout->_renderContainer('root')
#49 /hsphere/local/home/forevera/foreveramber.biz/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('root')
#50 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Layout.php(489): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('root')
#51 /hsphere/local/home/forevera/foreveramber.biz/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('root', true)
#52 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Layout.php(954): Magento\Framework\View\Layout\Interceptor->renderElement('root')
#53 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Layout->getOutput()
#54 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Layout\Interceptor->___callParent('getOutput', Array)
#55 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}()
#56 /hsphere/local/home/forevera/foreveramber.biz/generated/code/Magento/Framework/View/Layout/Interceptor.php(494): Magento\Framework\View\Layout\Interceptor->___callPlugins('getOutput', Array, Array)
#57 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Result/Page.php(257): Magento\Framework\View\Layout\Interceptor->getOutput()
#58 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/View/Result/Layout.php(170): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#59 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#60 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', Array)
#61 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#62 /hsphere/local/home/forevera/foreveramber.biz/generated/code/Magento/Framework/View/Result/Page/Interceptor.php(130): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, Array)
#63 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/App/Http.php(139): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#64 /hsphere/local/home/forevera/foreveramber.biz/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()
#65 /hsphere/local/home/forevera/foreveramber.biz/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#66 {main}

 error after upgrading to Magento 2.2.1 in customer_module.

Disabled all custom modules, error coming up when trying to create a customer in frontend and in backend when try to list all customers..

Could I just delete customers from DB tables to resolve this issu?

Thanks

Peter

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Upgrade to Magento 2.2.1 - Unable to unserialize value

The problem is in /vendor/magento/framework/Serialize/Serializer/Json.php

and I used the solution in below link. Changing a code in json.php

It working fine for now.

https://magento.stackexchange.com/questions/194010/magento-2-2-unable-to-unserialize-value

View solution in original post

4 REPLIES 4

Re: Upgrade to Magento 2.2.1 - Unable to unserialize value

The problem is in /vendor/magento/framework/Serialize/Serializer/Json.php

and I used the solution in below link. Changing a code in json.php

It working fine for now.

https://magento.stackexchange.com/questions/194010/magento-2-2-unable-to-unserialize-value

Re: Upgrade to Magento 2.2.1 - Unable to unserialize value

This answer above was helpful, though the issue stemmed from data cached in redis which was stored serialized instead of as a JSON array. This was the actual solution in my case: <a href="https://magento.stackexchange.com/a/196825/48552 ">https://magento.stackexchange.com/a/196825/48552 </a>

redis-cli flushall

Now we have 3 different redis instances on different ports so also had to use the -p xxxx parameter. 

Re: Upgrade to Magento 2.2.1 - Unable to unserialize value

 

I just upgraded from 2.2.1 to 2.2.3 and this issue came back for me.

 

Before the upgrade the solution of replacing the Json.php code was working for me, now it results in me getting HTTP ERROR 500 on most pages.

Re: Upgrade to Magento 2.2.1 - Unable to unserialize value

Did you find a solution for you 500 error problem after changing the json.php file? I got the same...