0

enter image description here

1 exception(s): Exception #0 (InvalidArgumentException): Unable to unserialize value when i add new customer and open existing customer In Admin side, Error is mention in above screenshot.

  • which magento version you are using? – Dhiren Vasoya Mar 6 at 14:16
0

Open the this file :- /vendor/magento/framework/Serialize/Serializer/Json.php

Find:

public function unserialize($string)
{
    $result = json_decode($string, true);
    if (json_last_error() !== JSON_ERROR_NONE) {
        throw new \InvalidArgumentException('Unable to unserialize value.');
    }
    return $result;
}

replace by:

public function unserialize($string)
{
    $result = json_decode($string, true);
    if (json_last_error() !== JSON_ERROR_NONE) {
        if(false !== @unserialize($string)){
            return unserialize($string);
        }
        throw new \InvalidArgumentException('Unable to unserialize value.');
    }
    return $result;
}

And run the php bin/magento c:f

And refer this links :-

Magento 2.2: Unable to unserialize value?

| improve this answer | |

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.