0

Getting this error in admin pannel of Magento Cloud instance when copying custom option of one product to another via action.

I Think It seems as some permission of generated and cache folders. Any idea how this can be done on Magento Cloud.

Can not copy the options to the product ID=345345, the error is:

The specified "/app/sdnfksnfksdnfkd/generated/code/Magento/Catalog/Api/Data/ProductCustomOptionValuesInterfaceFactory.php.3963" file could not be written Warning!file_put_contents(/app/sdnfksnfksdnfkd/generated/code/Magento/Catalog/Api/Data/ProductCustomOptionValuesInterfaceFactory.php.3963): failed to open stream: Read-only file system Class Magento\Catalog\Api\Data\ProductCustomOptionValuesInterfaceFactory 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.

Any idea how this can be resolved.

Any suggestion how this can be resolved ??

  • It happened because of the generated folder is read-only but some generated dependency was not created during setup:di:compile on the Build phase. Need to investigate your code. Which third-party modules do you use? You can read more information in this article: How to add new dependencies to classes – BaDos Mar 29 at 18:19

Your Answer

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

Browse other questions tagged or ask your own question.