Please teach in order to solve the problem.
cd /vagrant
sudo php bin/magento setup:upgrade
sudo php bin/magento setup:di:compile
sudo php bin/magento setup:static-content:deploy
sudo php bin/magento setup:static-content:deploy ja_JP
sudo php bin/magento cache:flush;
sudo php bin/magento cache:clean
sudo php bin/magento indexer:reindex
sudo find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
sudo find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
sudo chown -R :www-data .
sudo chmod u+x bin/magento
1 exception(s):
Exception #0 (InvalidArgumentException): Unable to serialize value.Exception #0 (InvalidArgumentException): Unable to serialize value. #0 /vagrant/vendor/magento/framework/App/PageCache/Kernel.php(153):
Magento\Framework\Serialize\Serializer\Json->serialize(Array)
#1 /vagrant/vendor/magento/module-page-cache/Model/Controller/Result/BuiltinPlugin.php(96):
Magento\Framework\App\PageCache\Kernel->process(Object(Magento\Framework\App\Response\Http\Interceptor))
#2 /vagrant/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))
#3 /vagrant/vendor/magento/framework/Interception/Interceptor.php(153):
Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#4 /vagrant/generated/code/Magento/Framework/View/Result/Page/Interceptor.php(26):
Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult',
Array, Array)
#5 /vagrant/vendor/magento/framework/App/Http.php(139): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#6 /vagrant/vendor/magento/framework/App/Bootstrap.php(257): Magento\Framework\App\Http->launch()
#7 /vagrant/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#8 {main}
Best Answer
There is a workaround - you can check if string is serialized and then use
serialize($string)
. Change unserialize to:and add function to check if string is serialized: