Magento 2.3.4, Checkout has no shipping Methods, and no way to continue
-
08-04-2021 - |
Вопрос
My Magento 2.3.4 site, has an error I cannot identify. The Checkout process has no shipping methods, and has no way to continue. You can enter or select an address, but the shipping methods are blank, and there is no way to proceed to the next step.
I can find nothing in anything in any logs, and I don't know what this could be, or how I can troubleshoot this. I can provide additional details on request, and will post them right away.
Решение 2
Just to help future searchers, I identified a specific REST API that was returning a 500 error, by checking the JS console in the browser.
/rest/default/V1/carts/mine/estimate-shipping-methods-by-address-id
The 500 error was caused by disabling the AMPQ module, and I had to patch the composer package named magento/framework-message-queue
Git issue , https://github.com/magento/magento2/pull/25508.
Другие советы
I faced a similar issue after updating a site from 2.3.3 to 2.3.4. Where the checkout would get stuck loading shipping methods. In my case the ajax request for fetching shipping methods would eventually return a 500 error after running out of memory.
It turned out to be a 3rd party module that introduced a cyclical dependency loop. By adding a new user context to the Magento\Authorization\Model\CompositeUserContext
type. In hind sight knowing it was a 3rd party module issue, I would recommend disabling each 3rd party module one by one and see if can identify the offending module and bring it up with the vendor.
But the route I took to identifying the issue was the following.
- tail error logs
tail -fn0 /var/log/php-fpm/error.log /var/log/nginx/error.log /var/www/mage/var/log/exception.log
- Reproduce error so we get a log, which was a memory limit exceeded in the php-fpm log, pointing to the
create
method in the following file/vendor/magento/framework/ObjectManager/Factory/Compiled.php:53
- Logged requested type parameter to file
file_put_contents('/var/www/mage/tmp.log', $requestedType.PHP_EOL, FILE_APPEND);
- Retrigger the checkout issue, and process the log file for the repeated classes
- Noticed a vendor module appearing a lot in the log, so disable the module and that fixed the checkout issue.