1

I upgraded magento 2.1.4 to 2.3.5p1. I first upgraded it to 2.2.3 and then to 2.3.5 through command line.

After upgrade, I am getting Fatal error: Uncaught InvalidArgumentException: Unable to unserialize value. Error: Syntax error in /var/www/production/vendor/magento/framework/Serialize/Serializer/Json.php:39 on frontend and unable to run any magento command in terminal.

In terminal it gives error - "Unable to unserialize value. Error: Syntax error"

Please provide a solution to this.

Checked all permissions and ownership also.

enter image description here

11
  • check this link --- magento.stackexchange.com/a/265492/85907 – Mohit Patel Aug 5 '20 at 12:10
  • I tried the above link but it changes the error to "Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\Cache\FrontendInterface in /var/www/production/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50 " on frontend. and PHP Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\Cache\FrontendInterface in /var/www/production/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50 in terminal – chanchal Aug 5 '20 at 12:23
  • check this link --- community.magento.com/t5/Magento-2-x-Version-Upgrades/… and any problem let me know – Mohit Patel Aug 5 '20 at 12:25
  • I tried to run the commands but each magento command gives error -" PHP Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\Cache\FrontendInterface in /var/www/production/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50 " – chanchal Aug 5 '20 at 12:40
  • Delete your vendor folder and execute composer update again – Black Aug 5 '20 at 13:16
1

The issue was fixed with below steps.

Edit your index.php put this at the start of the file:

die('maintenance'); 

to stop requests hitting the box and breaking things. (this can happen even if you are in maintenance mode) edit app/etc/env.php make sure:

  • deploy mode set to developer
  • caches all set to 0
  • make sure your composer.json extra contains "magento-force": "override"

then run the following:

echo "flushall" | redis-cli 
   mkdir vendor_backup 
   mv vendor/magento vendor_backup/ 
   composer install 
   rm -rf generated/* 
   Changing permissions. 
   php bin/magento setup:upgrade 
   php bin/magento deploy:mode:set production 
   php bin/magento cache:enable 
   php bin/magento cache:flush

remove the amends to index.php

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.