0
1 exception(s):
Exception #0 (Exception): Warning: include(/home/milkezuq/public_html/magetest/generated/metadata/frontend.php): failed to open stream: No such file or directory in /home/milkezuq/public_html/magetest/vendor/magento/framework/App/ObjectManager/ConfigLoader/Compiled.php on line 31

Exception #0 (Exception): Warning: include(/home/milkezuq/public_html/magetest/generated/metadata/frontend.php): failed to open stream: No such file or directory in /home/milkezuq/public_html/magetest/vendor/magento/framework/App/ObjectManager/ConfigLoader/Compiled.php on line 31
#0 /home/milkezuq/public_html/magetest/vendor/magento/framework/App/ObjectManager/ConfigLoader/Compiled.php(31): Magento\Framework\App\ErrorHandler->handler(2, 'include(/home/m...', '/home/milkezuq/...', 31, Array)
#1 /home/milkezuq/public_html/magetest/vendor/magento/framework/App/ObjectManager/ConfigLoader/Compiled.php(31): include()
#2 /home/milkezuq/public_html/magetest/vendor/magento/framework/App/Http.php(132): Magento\Framework\App\ObjectManager\ConfigLoader\Compiled->load('frontend')
#3 /home/milkezuq/public_html/magetest/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()
#4 /home/milkezuq/public_html/magetest/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#5 {main}

1 Answer 1

2

Issue of ObjectManager and Factory method from generated directory to resolve it Follow below steps :

run below commands in sequence :

  1. rm -rf generated
  2. php bin/magento setup:upgrade
  3. php bin/magento setup:di:compile
  4. php bin/magento setup:static-content:deploy -f
  5. php bin/magento cache:clean
  6. php bin/magento cache:flush
5
  • As you said I run given commands in sequence. But nothing happened Mar 14, 2018 at 12:11
  • It runs successfully after removing generated directory . But it is not good idea. Mar 14, 2018 at 12:20
  • @RajeshKumar - No it is good way - as generated directory always generates again , when you run setup:di:compile again and when you refresh your page. its auto generated directory so there is no issue Mar 14, 2018 at 12:21
  • Now I again run these commands in given sequence. And it runs perfectly. Thanks a lot @Manthan Dave Mar 14, 2018 at 12:29
  • @RajeshKumar - Thanks !! Happy to help and keep helping :) Mar 14, 2018 at 12:31

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.