0
votes

I can not login or open the admin page of magento after the installation, and when I opened the log file I found this error. Please assist to fix it. [10-Jun-2019 07:05:15 UTC] PHP Fatal error: Uncaught RuntimeException: The specified "C:/wamp64/www/Magento/generated/code/Magento/Framework/ObjectManager/Config/Reader/Dom/Proxy.php.15900" file couldn't be written. Warning!file_put_contents(C:/wamp64/www/Magento/generated/code/Magento/Framework/ObjectManager/Config/Reader/Dom/Proxy.php.15900): failed to open stream: Permission denied Class Magento\Framework\ObjectManager\Config\Reader\Dom\Proxy generation error: The requested class did not generate properly, because the 'generated' directory permission is read-only. If --- after running the 'bin/magento setup:di:compile' CLI command when the 'generated' directory permission is set to write --- the requested class did not generate properly, then you must add the generated class object to the signature of the related construct method, only. in C:\wamp64\www\Magento\vendor\magento\framework\Code\Generator.php:135 Stack trace:

0 C:\wamp64\www\Magento\vendor\magento\framework\Code\Generator\Autoloader.php(35): Magento\Framework\Code\Generator->generateCl in C:\wamp64\www\Magento\vendor\magento\framework\Code\Generator.php on line 135

[10-Jun-2019 07:33:12 UTC] PHP Fatal error: Uncaught RuntimeException: The specified "C:/wamp64/www/Magento/generated/code/Magento/Backend/Model/MenuFactory.php.7848" file couldn't be written. Warning!file_put_contents(C:/wamp64/www/Magento/generated/code/Magento/Backend/Model/MenuFactory.php.7848): failed to open stream: Resource temporarily unavailable Class Magento\Backend\Model\MenuFactory generation error: The requested class did not generate properly, because the 'generated' directory permission is read-only. If --- after running the 'bin/magento setup:di:compile' CLI command when the 'generated' directory permission is set to write --- the requested class did not generate properly, then you must add the generated class object to the signature of the related construct method, only. in C:\wamp64\www\Magento\vendor\magento\framework\Code\Generator.php:135 Stack trace:

0 C:\wamp64\www\Magento\vendor\magento\framework\Code\Generator\Autoloader.php(35): Magento\Framework\Code\Generator->generateClass('Magento\Backend...')

1 [internal function]: Ma in C:\wamp64\www\Magento\vendor\magento\framework\Code\Reader\ClassReader.php on line 35

1
Welcome to SO. You should be more precise in your question ti have a chance to get a valuable feedback. See How to Ask - xiawi

1 Answers

0
votes

IMHO, I think you have problem with the permission of generated\code folder. These folder should have writable permission:

  • vendor
  • app/etc
  • pub/static
  • var
  • Any other static resources
  • generated/code
  • generated/metadata
  • var/view_preprocessed

Please refer to this link to have more detail: https://devdocs.magento.com/guides/v2.3/config-guide/prod/prod_file-sys-perms.html