Error: "Unable to unserialize value" during composer update

Hello Craig,

Today I tried to update all my modules running the following command
composer update

Quite a few things were updated. Then I run bin/magento setup:upgrade.

Then, in the end, the following message was shown: "Unable to unserialize value."

What does it mean? I have never come across the message and updated the composer a few times.

Thank you.


If you’re running Redis, try to flush it first and then re-run the upgrade script:

  1. redis-cli flushall
  2. bin/magento setup:upgrade

Hi Craig,

Thank you for your prompt response.
I’m not running redis yet.

Have you got a differnet idea?

Sorry. The only time I ran into this issue was a long time ago in a slightly different scenario (I was seeing the error in the browser and not the CLI). Turned out to be session caching by Redis which I posted the aforementioned solution to on stackexchange.

Are you running any other session storage tools like memcached, Varnish or anything like that which you could flush? Perhaps @thomas may have run into this one?

Hi Craig,

I found it. The worrning message relats to Plum Rocket module.
I updated every single one one by one until the error was shown.

Thank you for your time.


Damn, I was going to mention it as a possibility but decided I was about to bark up the wrong tree.

Something to take away from this then is that if the bin/magento setup:upgrade command ever results in an error in the future then it’s definitely worth investigating the item above the error message - Which in this case was Plumrocket_SizeChart. Obviously, this won’t always be the case but it’s a good thing to remember when working on your debugging leads.

Thank you for sharing your findings :+1:


Is it possible to run a command to update my composer excluding let’s say 1 module rather than installing modules one by one?
Soemthing like composer update (exclude plumrocet module)?


I’m not sure if there is a specific command for that as I don’t know the Composer tool that well.

My personal workflow is to only update one module at a time anyway. This methodology is useful because it helps narrow down issues I may run into afterwards. For example, if I update 10 modules and something broke which wasn’t immediately obvious - I then have to work out which of the 10 was the problem.


However, there is another way of achieving what you want to achieve though, which is done by locking down the versions.

During installation of a module, you can do one of the following:

  1. Specify an exact version number
  2. Don’t specify an exact version number

When you specify a version number, you “lock it in” so that future upgrade commands ignore it.

However, if you want to change this option post-installation then this can be done by editing the composer.json file. For this example, I’m going to refer to a sagepaysuite module:

"ebizmarts/sagepaysuite": "^1.0",

Note the prefix of the version number:

  • ~ means update you to the next patch version if available
  • ^ means update you to the next minor patch version if available
  • no prefix locks in the version and never updates unless you specifically tell it to

So, to achieve what you’re after I would:

  1. Find the current version number(s) of your Plumrocket modules
  2. Find the entries in the composer.json file and replace whatever value is currently in there

For example if I currently had sagepaysuite v1.1 installed and wanted to “lock it in” so that it wasn’t affected by future composer update or setup/upgrade commands then I would edit the entry to look like this:

"ebizmarts/sagepaysuite": "1.1",

Important Note: If you’ve already run the composer update command, then it’s likely that the composer.json entry has already been changed. This is why you should check which version you have installed first rather than just remove the prefix. Also, make sure you do this to any related modules just in case any dependencies upgrade it anyway (albeit I don’t think it would but Im not sure).

1 Like

Thank you very much.