1

On a clean installation after copying theme files and running the setup:upgrade command, suddenly all pages are blank (including admin). I enabled error reporting and get this on all pages:

Fatal error: Uncaught RuntimeException: 
Can't create directory /var/www/magento/generated/code/Magento/Framework/App/ResourceConnection/. Class Magento\Framework\App\ResourceConnection\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 /var/www/magento/vendor/magento/framework/Code/Generator.php:135 Stack trace: 
#0 /var/www/magento/vendor/magento/framework/Code/Generator/Autoloader.php(35): Magento\Framework\Code\Generator->generateClass('Magento\\Framewo...') 
#1 [internal function]: Magento\Framework\Code\Generator\Autoloader->load('Magento\\Framewo...') 
#2 [internal function]: spl_autoload_call('Magento\\Framewo...') 
#3 /var/www/magento/vendor/magento/framework/Code/ in /var/www/magento/vendor/magento/framework/Code/Generator.php on line 135

What should I do?

troldog
  • 113
  • 2
  • 6

2 Answers2

0

I struggled with this for hours and then figured out my docker instance was out of space. Deleted all var/log files and everything started working again.

A symptom was that everytime I would run start my docker swarm it would indeed start 2 or 3 of the services needed for Magento. The expected output if you start your docker swarm multiple times is that it should just tell you each of the services are "up to date" instead of starting any of them.

Hope this helps somebody.

-1

Please try to run this command:

chmod -R 777  var pub generated

if it works, please leave a comment!