0
votes

i have upload magento files and data base from backup i was take from old other account on the same serve and all files is completed and the server account has the same configuration but when i try to deploy it it give me that error on front end

Fatal error: Uncaught InvalidArgumentException: Unable to unserialize value. Error: Malformed UTF-8 characters, possibly incorrectly encoded in /home/u922728750/domains/6alabaty.com/public_html/vendor/magento/framework/Serialize/Serializer/Json.php:39 Stack trace: #0 /home/u922728750/domains/6alabaty.com/public_html/vendor/magento/framework/Interception/Config/CacheManager.php(69): Magento\Framework\Serialize\Serializer\Json->unserialize('{"Magento\\Stor...') #1 /home/u922728750/domains/6alabaty.com/public_html/vendor/magento/framework/Interception/Config/Config.php(118): Magento\Framework\Interception\Config\CacheManager->load('interception') #2 /home/u922728750/domains/6alabaty.com/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(121): Magento\Framework\Interception\Config\Config->__construct(Object(Magento\Framework\ObjectManager\Config\Reader\Dom\Proxy), Object(Magento\Framework\Config\Scope), Object(Magento\Framework\App\Cache\Type\Config), Object(Magento\Framework\ObjectManager\Relati in /home/u922728750/domains/6alabaty.com/public_html/vendor/magento/framework/Serialize/Serializer/Json.php on line 39

and the jason file code is

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Magento\Framework\Serialize\Serializer;

use Magento\Framework\Serialize\SerializerInterface;

/**
 * Serialize data to JSON, unserialize JSON encoded data
 *
 * @api
 * @since 101.0.0
 */
class Json implements SerializerInterface
{
    /**
     * @inheritDoc
     * @since 101.0.0
     */
    public function serialize($data)
    {
        $result = json_encode($data);
        if (false === $result) {
            throw new \InvalidArgumentException("Unable to serialize value. Error: " . json_last_error_msg());
        }
        return $result;
    }

    /**
     * @inheritDoc
     * @since 101.0.0
     */
    public function unserialize($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;
    }
}

i have try alot of solutions and all of them is not working please help me

1

1 Answers

0
votes

Looks like magento is trying to json_decode some string that is not utf8. The json standard requires utf8.

Looks like it is reading some config data? Maybe some config files have non-utf8 in them?