0

On my site at http://139.59.47.100/ ,anyother url(http://139.59.47.100/daily-deals) except the home page is coming fine but for the homepage,i am getting the error "unable to serialize value".I have tried several fixes available for this like clearing the cache,recompiling,re deploying static assets etc.

Below is the exact error message.

{"0":"Unable to serialize value.","1":"#0 /var/www/html/vendor/magento/framework/App/PageCache/Kernel.php(153): Magento\Framework\Serialize\Serializer\Json->serialize(Array)\n#1 /var/www/html/vendor/magento/module-page-cache/Model/Controller/Result/BuiltinPlugin.php(96): Magento\Framework\App\PageCache\Kernel->process(Object(Magento\Framework\App\Response\Http\Interceptor))\n#2 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(146): Magento\PageCache\Model\Controller\Result\BuiltinPlugin->afterRenderResult(Object(Magento\Framework\View\Result\Page\Interceptor), Object(Magento\Framework\View\Result\Page\Interceptor), Object(Magento\Framework\App\Response\Http\Interceptor))\n#3 /var/www/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))\n#4 /var/www/html/generated/code/Magento/Framework/View/Result/Page/Interceptor.php(130): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, Array)\n#5 /var/www/html/vendor/magento/framework/App/Http.php(139): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))\n#6 /var/www/html/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch()\n#7 /var/www/html/vendor/magento/framework/App/Bootstrap.php(257): Magento\Framework\App\Http\Interceptor->launch()\n#8 /var/www/html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))\n#9 {main}","url":"/","script_name":"/index.php"}

  • did you check why the value can't be serialized? Unfourtunatly magento2 won't tell you the exact problem why the value can't be serialized, but you can modify the code for dbugging purposes in order to print the json error – Philipp Sander Jan 4 at 14:22
0

I have encountered this. To get around it, I used this solution: https://magento.stackexchange.com/a/198109/69191

Other solutions are resetting permissions and flushing your Magento caches, including things like memcache and Redis.

  • I will try this and let you know.I have tried changing permissions and also flushing the default magento caches. – Dhruv Marwha Jan 5 at 5:30
  • Tried that solution but it did not work.Anything else that i can try? – Dhruv Marwha Jan 5 at 6:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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