After I ran the update from Magento 2.2.8 to Magento 2.3.2, I am getting this error whenever I run a CLI command like upgrade or cache,

main.CRITICAL: Type Error occurred when creating object: Magento\Framework\Interception\Config\Config, Return value of Magento\Framework\Interception\Config\CacheManager::load() must be of the type array or null, string returned [] []

Any idea how to solve that?


  • 1
    Check all 3rd party extension and those extensions create custom cache
    – Amit Bera
    Jan 21, 2020 at 4:48
  • You need to find out those cache tags, those might create the wrong way. that why this error occurring
    – Amit Bera
    Jan 21, 2020 at 4:49
  • I disabled all 3rd party extensions in config.php but I cant run the cache commands because of this error ... I deleted the /var/vache folder manually but the problem is still there.
    – EOB
    Jan 21, 2020 at 7:13
  • @EOB, did you find solution on it. Feb 26, 2020 at 11:12
  • hello @EOB i have same problem, did you get any solution? Sep 12, 2020 at 6:22

3 Answers 3


Anyone still facing the same issue with magento 2.3.4?

php bin/magento cache:flush

An exception was raised while creating "Request"; no instance returned

The reason was redis cache. Flush it and everything will work smooth.

redis-cli -h HOSTNAME



After update from 2.1.9 to 2.3.5,

I execute CLI command like upgrade or compile or cache clean

Then also getting JSON Serializer error [Unable to unserialize value. Error: Syntax error]


Solved by : https://magecomp.com/blog/solved-unable-to-unserialize-value-magento-2-2/

and also CacheManager error, it solve by clear the redis cache

Ref : https://www.shellhacks.com/redis-delete-all-keys-redis-cli/


Type Error Occurred When Creating Object

This error says something is wrong when creating an object. Generally, the reason for this error is when you’ve passed arguments from the calling method but not receive those arguments in the called function.

For instance, I’ve passed four parameters in the calling function and receive three arguments in a called function that means one argument is missing. It results in the error Type Error Occurred When Creating Object in Magento 2.

Sometimes, we’ve created that object, but because of the compilation issue, the object is not created in the generator. Generally, I’ve observed that many programmers tend to delete the whole generated folder to overcome this issue.

However, it’s risky to remove that folder every time which may lead to data loss. Therefore, I’ve come up with the solution to this error instead of removing that folder.

Check out the solution here:

Solution for Type Error Occurred When Creating Object in Magento 2 Pass the below commands in your store’s command line:

1. php bin/magento setup:upgrade  
2. php bin/magento setup:di:compile 
3. php bin/magento setup:static-content:deploy -f 
4. php bin/magento cache:flush
5. php bin/magento cache:clean config

That’s it.

If you have any doubts regarding this error, just mention them in the Comments section below.

I would be happy to help.

Thank You.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.