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.
1 Answer
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 :-