Hello,
We have been working on an extension that injects a js script on checkout.
Recently we got the following on the installation and varnish test:
{ "command": "function checkFpmService { for i in 1 2 3 4 5 6; do sleep 5; httpCode=`curl --fail --insecure --silent --output \/dev\/null --write-out \"%{http_code}\" https:\/\/magento2.docker\/eqp-non-existent-page.html`; if [ $httpCode -eq 404 ]; then return 0; else echo \"The expected HTTP response code for an un-existent Magento URL page is 404, got $httpCode It could be because the FPM service is not ready yet or this Magento installation is broken.\"; fi; done; return 1; }; checkFpmService;", "output": "Finished with the \"1\" exit code. Process output:\n\nThe expected HTTP response code for an un-existent Magento URL page is 404, got 500 It could be because the FPM service is not ready yet or this Magento installation is broken.\nThe expected HTTP response code for an un-existent Magento URL page is 404, got 500 It could be because the FPM service is not ready yet or this Magento installation is broken.\nThe expected HTTP response code for an un-existent Magento URL page is 404, got 500 It could be because the FPM service is not ready yet or this Magento installation is broken.\nThe expected HTTP response code for an un-existent Magento URL page is 404, got 500 It could be because the FPM service is not ready yet or this Magento installation is broken.\nThe expected HTTP response code for an un-existent Magento URL page is 404, got 500 It could be because the FPM service is not ready yet or this Magento installation is broken.\nThe expected HTTP response code for an un-existent Magento URL page is 404, got 500 It could be because the FPM service is not ready yet or this Magento installation is broken.\n\n" }
We reached out to Adobe/Magento support and were told to try to replicate this in the cloud docker environment.
After building a cloud docker environment in production and development mode, the error did not replicate.
Are there are generic areas to look at in the code that will cause this?
If it helps, we can provide the github url to the extension package.
Try to follow these two steps:
These changes has allowed to pass the varnish test for us.