Exception.log file Error:
{"exception":"[object] (ReflectionException(code: -1): Class Magento\Framework\App\Http\Interceptor does not exist
- 
 2Same, I just installed magento fresh from composer and are facing problems already... they need to improve their documentation.Black– Black2019年11月29日 09:51:40 +00:00Commented Nov 29, 2019 at 9:51
- 
 Good day I have the following problem, try the permission commands to the folders and nothing Class "Magento\Framework\App\Request\BackpressureValidator" does not exist Exception #0 (ReflectionException): Class "Magento\Framework\App\Request\BackpressureValidator" does not exist <pre>#1 Magento\Framework\Code\Reader\ClassReader->getConstructor() called at [vendor/magento/framework/ObjectManager/Definition/Runtime.php:54] #2 Magento\Framework\ObjectManager\Definition\Runtime->getParameters() called at [vendor/magento/framework/ObjectManager/Factory/Compiled.php:100] #3 Magento\Framework\ObjectMcarlos Quintero– carlos Quintero2023年05月30日 14:16:35 +00:00Commented May 30, 2023 at 14:16
7 Answers 7
The Interceptor file is deleted. Need to recreate Interceptor
Run di:compile command
php bin/magento setup:di:compile
This occurs Because you can inject Magento\Framework\App\Http in any our class
try following steps
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:Deploy -f
chmod -R 777 var/ generated/
- 
 4@WaqarAli, why chmod 777 ??? This is insecureBlack– Black2019年11月29日 09:54:46 +00:00Commented Nov 29, 2019 at 9:54
- 
 1you need full permission on server because magento delete and create new files in var, pub, and gernated folder when setup:upgrade command runsWaqar Ali– Waqar Ali2019年11月29日 10:15:58 +00:00Commented Nov 29, 2019 at 10:15
- 
 3it would be better to usefind var/ -type d -exec chmod 775 {} + && find var/ -type f -exec chmod 665 {} +(repeated for the generated dir also) that way you set the executable bit on the directories, and the read write permission for the user and group on the files, without wholesale blanketing everything with executable bits.Tschallacka– Tschallacka2021年03月30日 20:25:04 +00:00Commented Mar 30, 2021 at 20:25
- 
 that works for me thanksSebastian– Sebastian2021年04月15日 02:43:07 +00:00Commented Apr 15, 2021 at 2:43
- 
 I was only facing this issue on my dev environment (docker). this solution worked for me well enough for my dev environment, but I would not include thechmod -R 777 ...on a production server if it could be at all avoided.chris.nesbit1– chris.nesbit12021年07月19日 17:50:00 +00:00Commented Jul 19, 2021 at 17:50
Run commands:
 chmod -R 777 var
 chmod -R 777 pub/static
 chmod -R 777 generated
SOLVED.
chmod -R 777 var/* generated/* pub/static/
[Run di:compile command]
php bin/magento setup:di:compile
[and flush the cache]
php bin/magento cache:flush
- 
 2however you should never run setup:di:compile when in developer modeBogdan Tomi– Bogdan Tomi2021年05月27日 10:51:51 +00:00Commented May 27, 2021 at 10:51
An interceptor may also be missing if its parent class' constructor fails for some reason.
An example of this is when you override a class, but your override's constructor fails due to a bad class reference in the constructor arguments or for some other reason.
For me the problem was that I missed the backslash when defining construct function arguments:
public function __construct(
 Magento\Framework\App\Action\Context $context
) {
was instead of
public function __construct(
 \Magento\Framework\App\Action\Context $context
) {