TransWikia.com

Magento 2: Running any command getting error Class MagentoWebapiModelCacheTypeWeb ApiInterceptor does not exist

Magento Asked by irshad on November 15, 2021

Running any command

s:up , s:di:c s:s:d -f cache getting error

Class MagentoWebapiModelCacheTypeWebApiInterceptor does not
exist

And like below images, any help will be appreciate.enter image description here

2 Answers

You need to flush the DI generated and the Redis too, run these commands to do it:

rm -rf generated/*
redis-cli -n 0 flushall
php -r "echo opcache_reset();"
bin/magento setup:di:compile

Answered by Rafael Corrêa Gomes on November 15, 2021

Please, check that interceptor class on your server:

ls -la generated/code/Magento/Webapi/Model/Cache/Type/Webapi/Interceptor.php

(from Magento root dir.)

In case it has a wrong permissions change it according your needs (usually make it accessible by web-server user is enough).

Another case that interceptor class used somewhere in your code directly (or in third-party extensions) but it must not be used directly. Use grep on your code directory to check it.

Another case is when file totally missed from the Magento (missed base class MagentoWebapiModelCacheTypeWebApi). In that case I'll recommend you to update Magento using composer.

Answered by Siarhey Uchukhlebau on November 15, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP