0

I am getting a strange error with Magento. When I go to checkout out and do store pickup, set up a coupon code to pay for item and then I hit the checkout button, I get thrown this error page. Any help would be greatly appreciated.

A red error will appear and it says Infinite loop detected.

Exception #0 (Exception): Notice: Trying to get property 'Message' of non-object in vendor/magento/module-fedex/Model/Carrier.php on line 582
<pre>#1 Magento\Fedex\Model\Carrier->_prepareRateResponse() called at [vendor/magento/module-fedex/Model/Carrier.php:554]
#2 Magento\Fedex\Model\Carrier->_getQuotes() called at [vendor/magento/module-fedex/Model/Carrier.php:301]
#3 Magento\Fedex\Model\Carrier->collectRates() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#4 Magento\Fedex\Model\Carrier\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#5 Magento\Fedex\Model\Carrier\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#6 Magento\Fedex\Model\Carrier\Interceptor->___callPlugins() called at [generated/code/Magento/Fedex/Model/Carrier/Interceptor.php:23]
#7 Magento\Fedex\Model\Carrier\Interceptor->collectRates() called at [vendor/magento/module-shipping/Model/Shipping.php:337]
#8 Magento\Shipping\Model\Shipping->collectCarrierRates() called at [vendor/magento/module-shipping/Model/Shipping.php:244]
#9 Magento\Shipping\Model\Shipping->collectRates() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#10 Magento\Shipping\Model\Shipping\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#11 Magento\Shipping\Model\Shipping\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#12 Magento\Shipping\Model\Shipping\Interceptor->___callPlugins() called at [generated/code/Magento/Shipping/Model/Shipping/Interceptor.php:23]
#13 Magento\Shipping\Model\Shipping\Interceptor->collectRates() called at [vendor/magento/module-quote/Model/Quote/Address.php:1076]
#14 Magento\Quote\Model\Quote\Address->requestShippingRates() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#15 Magento\Quote\Model\Quote\Address\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#16 Magento\Quote\Model\Quote\Address\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#17 Magento\Quote\Model\Quote\Address\Interceptor->___callPlugins() called at [generated/code/Magento/Quote/Model/Quote/Address/Interceptor.php:23]
#18 Magento\Quote\Model\Quote\Address\Interceptor->requestShippingRates() called at [vendor/magento/module-quote/Model/Quote/Address.php:1003]
#19 Magento\Quote\Model\Quote\Address->collectShippingRates() called at [vendor/magento/module-sales-rule/Helper/CartFixedDiscount.php:55]
#20 Magento\SalesRule\Helper\CartFixedDiscount->calculateShippingAmountWhenAppliedToShipping() called at [vendor/magento/module-sales-rule/Helper/CartFixedDiscount.php:163]
#21 Magento\SalesRule\Helper\CartFixedDiscount->getQuoteTotalsForRegularShipping() called at [vendor/magento/module-sales-rule/Helper/CartFixedDiscount.php:188]
#22 Magento\SalesRule\Helper\CartFixedDiscount->getBaseRuleTotals() called at [vendor/magento/module-sales-rule/Model/Rule/Action/Discount/CartFixed.php:108]
#23 Magento\SalesRule\Model\Rule\Action\Discount\CartFixed->calculate() called at [vendor/magento/module-sales-rule/Model/RulesApplier.php:226]
#24 Magento\SalesRule\Model\RulesApplier->getDiscountData() called at [vendor/magento/module-sales-rule/Model/RulesApplier.php:202]
#25 Magento\SalesRule\Model\RulesApplier->applyRule() called at [vendor/magento/module-sales-rule/Model/RulesApplier.php:134]
#26 Magento\SalesRule\Model\RulesApplier->applyRules() called at [vendor/magento/module-sales-rule/Model/Validator.php:301]
#27 Magento\SalesRule\Model\Validator->process() called at [vendor/magento/module-sales-rule/Model/Quote/Discount.php:172]
#28 Magento\SalesRule\Model\Quote\Discount->collect() called at [vendor/magento/module-quote/Model/Quote/TotalsCollector.php:274]
#29 Magento\Quote\Model\Quote\TotalsCollector->collectAddressTotals() called at [vendor/magento/module-quote/Model/Quote/TotalsCollector.php:148]
#30 Magento\Quote\Model\Quote\TotalsCollector->collect() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#31 Magento\Quote\Model\Quote\TotalsCollector\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#32 Magento\Quote\Model\Quote\TotalsCollector\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#33 Magento\Quote\Model\Quote\TotalsCollector\Interceptor->___callPlugins() called at [generated/code/Magento/Quote/Model/Quote/TotalsCollector/Interceptor.php:23]
#34 Magento\Quote\Model\Quote\TotalsCollector\Interceptor->collect() called at [vendor/magento/module-quote/Model/Quote.php:2015]
#35 Magento\Quote\Model\Quote->collectTotals() called at [vendor/amasty/module-special-promo/Model/DiscountRegistry.php:263]
#36 Amasty\Rules\Model\DiscountRegistry->updateQuoteData() called at [vendor/amasty/module-special-promo/Plugin/LayoutProcessor.php:55]
#37 Amasty\Rules\Plugin\LayoutProcessor->afterProcess() called at [vendor/magento/framework/Interception/Interceptor.php:146]
#38 Magento\Checkout\Block\Checkout\LayoutProcessor\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#39 Magento\Checkout\Block\Checkout\LayoutProcessor\Interceptor->___callPlugins() called at [generated/code/Magento/Checkout/Block/Checkout/LayoutProcessor/Interceptor.php:23]
#40 Magento\Checkout\Block\Checkout\LayoutProcessor\Interceptor->process() called at [vendor/magento/module-checkout/Block/Onepage.php:81]
#41 Magento\Checkout\Block\Onepage->getJsLayout() called at [vendor/magento/module-checkout/view/frontend/templates/onepage.phtml:23]
#42 include() called at [vendor/magento/framework/View/TemplateEngine/Php.php:71]
#43 Magento\Framework\View\TemplateEngine\Php->render() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#44 Magento\Framework\View\TemplateEngine\Php\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#45 Magento\Framework\View\TemplateEngine\Php\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#46 Magento\Framework\View\TemplateEngine\Php\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/View/TemplateEngine/Php/Interceptor.php:23]
#47 Magento\Framework\View\TemplateEngine\Php\Interceptor->render() called at [vendor/magento/framework/View/Element/Template.php:273]
#48 Magento\Framework\View\Element\Template->fetchView() called at [vendor/magento/framework/View/Element/Template.php:303]
#49 Magento\Framework\View\Element\Template->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1111]
#50 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1115]
#51 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:675]
#52 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [vendor/magento/framework/View/Layout.php:578]
#53 Magento\Framework\View\Layout->_renderBlock() called at [vendor/magento/framework/View/Layout.php:555]
#54 Magento\Framework\View\Layout->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#55 Magento\Framework\View\Layout->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#56 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#57 Magento\Framework\View\Layout->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#58 Magento\Framework\View\Layout->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#59 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#60 Magento\Framework\View\Layout->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#61 Magento\Framework\View\Layout->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#62 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#63 Magento\Framework\View\Layout->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#64 Magento\Framework\View\Layout->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#65 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#66 Magento\Framework\View\Layout->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#67 Magento\Framework\View\Layout->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#68 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#69 Magento\Framework\View\Layout->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#70 Magento\Framework\View\Layout->renderElement() called at [vendor/magento/framework/View/Layout.php:606]
#71 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:557]
#72 Magento\Framework\View\Layout->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:510]
#73 Magento\Framework\View\Layout->renderElement() called at [vendor/magento/framework/View/Layout.php:975]
#74 Magento\Framework\View\Layout->getOutput() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#75 Magento\Framework\View\Layout\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#76 Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#77 Magento\Framework\View\Layout\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:41]
#78 Magento\Framework\View\Layout\Interceptor->getOutput() called at [vendor/magento/framework/View/Result/Page.php:258]
#79 Magento\Framework\View\Result\Page->render() called at [vendor/magento/framework/View/Result/Layout.php:171]
#80 Magento\Framework\View\Result\Layout->renderResult() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#81 Magento\Framework\View\Result\Page\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#82 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#83 Magento\Framework\View\Result\Page\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/View/Result/Page/Interceptor.php:23]
#84 Magento\Framework\View\Result\Page\Interceptor->renderResult() called at [vendor/magento/framework/App/Http.php:120]
#85 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:23]
#86 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:263]
#87 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:29]
</pre>

1 Answer 1

0

In case anyone else runs into this. I found the answer on Github

enter link description here

This error comes in 2.3.4 or later versions because of

if($quote->getTotalsCollectedFlag() === false) { $quote->collectTotals(); }

Here, $quote->collectTotals(); generates error because of recursive call

so, by commenting // $quote->collectTotals(); or whole if condition it will not go in infinite and code will work properly.

Actually there is no need of $quote->collectTotals(); in this file.

Credit to Amit-Hariyani commented on Nov 26, 2020 - GITHUB

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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