0
Fatal error: Uncaught ReflectionException: Class Magento\Framework\App\ResourceConnection\Proxy does not exist in /var/www/html/magento2/vendor/magento/framework/Code/Reader/ClassReader.php:26 Stack trace: #0 /var/www/html/magento2/vendor/magento/framework/Code/Reader/ClassReader.php(26): ReflectionClass->__construct('Magento\\Framewo...') #1 /var/www/html/magento2/vendor/magento/framework/ObjectManager/Definition/Runtime.php(54): Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\\Framewo...') #2 /var/www/html/magento2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(48): Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Magento\\Framewo...') #3 /var/www/html/magento2/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...') #4 /var/www/html/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(167): Magento\Framework\ObjectManager\ObjectManager->get('Mage in /var/www/html/magento2/vendor/magento/framework/Code/Reader/ClassReader.php on line 26

Everytime I use command:

bin/magento setup:upgrade

I had the error. After this command I use:

bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush

And site is working again. Magento 2.3.4 installed on VPS server 4GB RAM, 50GB SSD. System is Ubuntu 18.04 using Nginx and Percona 5.7 and Elasticsearch 6.8.8 on same server. My php.ini configuration:

memory_limit = 2G

max_execution_time = 3600

max_input_time = 1800

upload_max_filesize = 10M

zlib.output_compression = On

I am using developer mode in Magento 2.3.4. What Can I check ? I installed CustomChekout module, and on this VPS server got error:

knockout.js:3381 Uncaught TypeError: Unable to process binding "foreach: function(){return {data:currentBillingAddress().customAttributes,as:'element'} }"
Message: Unable to process binding "text: function(){return $parent.getCustomAttributeLabel(element) }"
Message: Cannot read property 'customer-email' of undefined

at UiClass.getCustomAttributeLabel (billing-address.js:258)
at text (eval at createBindingsStringEvaluator (knockout.js:2982), <anonymous>:3:72)
at update (knockout.js:4659)
at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.js:3373)
at Function.evaluateImmediate_CallReadThenEndDependencyDetection (knockout.js:2173)
at Function.evaluateImmediate_CallReadWithDependencyDetection (knockout.js:2140)
at Function.evaluateImmediate (knockout.js:2101)
at Object.ko.computed.ko.dependentObservable (knockout.js:1954)
at knockout.js:3371
at Object.arrayForEach (knockout.js:159)

Where could be a problem ?

0

The contents of generated/ and pub/static/ are automatically cleared each time you run:

bin/magento setup:upgrade

This is intentional since an upgrade implies there is new code and/or theme changes to process. Also new modules are automatically enabled when upgrading. If you know there are no code changes then you can avoid the reflection error with this command:

bin/magento setup:upgrade --keep-generated
-1

Please run this command:

chmod -R 777 var pub generated
1
  • Please do not ever run this command. No files in those directories should be executable. – clockworkgeek Nov 24 '20 at 10:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.