https://github.com/magento/magento2/blob/2.3-develop/pub/get.php#L56


The main thing that ObjectManager is not initialized by this time and we are getting exception
https://github.com/magento/magento2/blob/2.3.3/lib/internal/Magento/Framework/App/ObjectManager.php#L36

ObjectManager initialization will be done at application bootstrap, here
https://github.com/magento/magento2/blob/2.3-develop/pub/get.php#L75
In case you have different servers/nodes/containers for webserver and php, webserver will not serve static content and pass request to the backend (PHP magento)...
No exception during file serving process
RuntimeException - ObjectManager isn\'t initialized
Hi @oncesk. Thank you for your report.
To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento give me 2.3-develop instance - upcoming 2.3.x release
For more details, please, review the Magento Contributor Assistant documentation.
@oncesk do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
Hi @engcom-Echo. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.
[ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.3-develop branchDetails
- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!
[ ] 5. Add label Issue: Confirmed once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
@engcom-Echo Thank you for verifying the issue.
Unfortunately, not enough information was provided to acknowledge ticket. Please consider adding the following:
Once all required information is added, please add label "Issue: Confirmed" again.
Thanks!
:white_check_mark: Confirmed by @engcom-Echo
Thank you for verifying the issue. Based on the provided information internal tickets MC-29342 were created
Issue Available: @engcom-Echo, _You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself._
Hi @oncesk, can you provide a specific scenario where we can reproduce this issue? Thanks!
There seems to be a bug in pub/get.php:
$mediaDirectory is read from var/resource_config.json where in our setup it is set to /var/www/html/pub/media/. $relativePath is simply the URL path of the HTTP request, e.g. /media/catalog/product/cache/ccd8d44c60afb81c13822e813fe440e5/0/1/01_065_0211_0_i_01_1eaf.jpg$mediaAbsPath is set by joining $mediaDirectory and $relativePath with a /This leads to a $mediaAbsPath like /var/www/html/pub/media//media/catalog/product/cache/ccd8d44c60afb81c13822e813fe440e5/0/1/01_600_1002_0_i_01_265c.jpg, i.e. the media directory appears twice in the path, which doesn't seem to be correct.
I'm getting this issue after upgrading from 2.3.5-p1 to 2.3.5-p2.
Most helpful comment
There seems to be a bug in
pub/get.php:$mediaDirectoryis read fromvar/resource_config.jsonwhere in our setup it is set to/var/www/html/pub/media/.$relativePathis simply the URL path of the HTTP request, e.g./media/catalog/product/cache/ccd8d44c60afb81c13822e813fe440e5/0/1/01_065_0211_0_i_01_1eaf.jpg$mediaAbsPathis set by joining$mediaDirectoryand$relativePathwith a/This leads to a
$mediaAbsPathlike/var/www/html/pub/media//media/catalog/product/cache/ccd8d44c60afb81c13822e813fe440e5/0/1/01_600_1002_0_i_01_265c.jpg, i.e. themediadirectory appears twice in the path, which doesn't seem to be correct.