Domanda

After the update process using the Composer has finished I am getting an Unable to unserialize value. Error: Syntax error error with any CLI command I try running (like upgrade or cache flush).


I followed the guide on Magento 2.2: Unable to unserialize value? and modified already. The error is still there, so I output the string that is serialized into a text file and the result is https://pastebin.com/PaqxNAfA.

This is my unserialize function in Json.php:

public function unserialize($string)
{

    if($this->is_serialized($string))
    {
        var_dump($string); 
        $string = $this->serialize($string);
    }
    $result = json_decode($string, true);
    if (json_last_error() !== JSON_ERROR_NONE) {
        throw new \InvalidArgumentException("Unable to unserialize value. Error: " . json_last_error_msg());
    }
    return $result;
}

function is_serialized($value, &$result = null) {...}

I ran this CLI command to get the string:

php bin/magento cache:clean > output.txt    

Any idea how to solve that?

È stato utile?

Soluzione

You can solve it by running these commands:

composer update -vvv
redis-cli flushall
bin/magento cache:clean
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange
scroll top