magento2: Upgrade from 2.3.0 => 2.3.1 failed. "Unable to unserialize value"

Hey,

I was trying to upgrade from Magento 2.3.0 to Magento 2.3.1 via composer. While downloading all dependencies worked, the setup:upgrade command fails instantly. Any way to fix this? Details below:

Preconditions (*)

  1. Magento 2.3.0
  2. No changes made to any core code files
  3. PHP 7.2.16
  4. memory_limit 2G

Steps to reproduce (*)

  1. Change directory to the Magento root.
  2. Run composer require magento/product-community-edition 2.3.1 --no-update
  3. Run composer update
  4. Run php bin/magento setup:upgrade

Expected result (*)

  1. The upgrade procedure should start
  2. After that you should be able to compile, deploy etc.
  3. Upgrade should succeed

Actual result (*)

  1. When running setup:upgrade the following error appears: Unable to unserialize value. Error: Syntax error

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 3
  • Comments: 18 (4 by maintainers)

Most upvoted comments

Clearing redis cache ( redis-cli flushall ) resolved the issue for me.

@abcpremium Flush your redis cache. And you should be all set. I am facing different error during compilation.

In Generator.php line 218:

Source class “\Magento\Elasticsearch6\Model\Adapter\FieldMapper\ProductField” for “Magento\Elasticsearch6\Model\Adapter\FieldMapper\P roductFieldMapper” generation does not exist.

Clearing redis cache ( redis-cli flushall ) resolved the issue for me.

This should be part of the steps outlined in the upgrade document (https://devdocs.magento.com/guides/v2.3/comp-mgr/cli/cli-upgrade.html). The command should be run after composer update and before bin/magento cache:clean.

The Magento team should take note of this.