1

I am getting this error

In Serialize.php line 33:

  Unable to unserialize value.

However, I do not believe this is the same issue as mentioned in this thread.

I am using Docker for M2 local dev setup. Repo is fully updated, composer dependencies updated. I can run through setup:upgrade and setup:di:compile.

With caching enabled, I manually flush redis, as metioned in other thread redis-cli flushall. Then I run bin/magento. Presumably the cache is built in redis... Then again I run bin/magento, expecting to see faster performance, however the error is there.

Turns out the unserialze method in /vendor/magento/framework/Serialize/Serializer/Serialize.php is being passed the empty string.

public function unserialize($string)
{
    if (false === $string || null === $string || '' === $string) {
        throw new \InvalidArgumentException('Unable to unserialize value.');
    }
    // ...
}

If I add an early return inside that if block, like return null, the error becomes The search failed because of a search engine misconfiguration., so perhaps search engine config has not made it into redis on first call of bin/magento?

Any ideas what is wrong, or how to address?

0

We are using Magento cloud and it turns out I needed to add the crypt value from the cloud environment's app/etc/env.php where I took the DB snapshot from to my local app/etc/env.php file in order for my local environment to work with said snapshot.

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.