Skip to main content

Magento2 Unable to unserialize value

do you have this error always after each upgrade and you are not able to figure out which value cause this issue?

the best way is to debug the issue and find which one by going to this file 


go to this function 


 public function serialize($data)
        $result = json_encode($data);
        if (false === $result) {
            //{chose your way to log the $data}
            throw new \InvalidArgumentException("Unable to serialize value. Error: " . json_last_error_msg());
        return $result;

then try to log the data before throwing the exception 

once you log the data you can now search in the core_config_data

for me I always use this way