2

Fresh 2.3.3 install with 2.3.4 composer upgrade.

If I try clicking Paypal or Stripe checkout (default magento 2 checkout) I get this error.

INTERNAL ERROR. DETAILS ARE AVAILABLE IN MAGENTO LOG FILE. REPORT ID: WEBAPI-5E3EBD55C7D77

LOG FILE SHOWS:

[2020-02-08 13:11:36] main.CRITICAL: Report ID: webapi-5e3eb38834d5a; Message: Infinite loop detected, review the trace for the looping path {"exception":"[object] (Exception(code: 0): Report ID: webapi-5e3eb38834d5a; Message: Infinite loop detected, review the trace for the looping path at /vendor/magento/framework/Webapi/ErrorProcessor.php:208, LogicException(code: 0): Infinite loop detected, review the trace for the looping path at /vendor/magento/module-checkout/Model/Session.php:241)"} []

Anyone able to shed some light on this? stupidly I made it live - so I have a live broken website.

Thanks!

2
  • at first enable the manintenance mode and allow only your IP address (devdocs.magento.com/guides/v2.3/reference/cli/…) so that you can buy some time to debug this issue
    – Haijerome
    Feb 8, 2020 at 14:18
  • check this github repo thread github.com/magento/magento2/pull/14812 for more information about this error. You can also post your issue (with steps to reproduce) there in this thread which can get you a solid help as the person added this code might address your issue.
    – Haijerome
    Feb 8, 2020 at 14:54

5 Answers 5

4

change in file vendor/magento/module-checkout/Model/Session.php

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.

3

Delete your cookies and try again.

0

Don't try this on production

just a quicker workaround to get your checkout fixed.

edit this file vendor/magento/module-checkout/Model/Session.php (Override this file using preferences or use plugins if you know how-to)

app/code/Magento/Checkout/Model/Session.php

and go to method public function getQuote()

comment / remove these lines

if ($this->isLoading) {
                throw new \LogicException("Infinite loop detected, review the trace for the looping path");
            }

....

$this->isLoading = true;

.....

$this->isLoading = false;

this isLoading flag variable has been added for this purpose as documented in the code

A flag to track when the quote is being loaded and attached to the session object. Used in trigger_recollect infinite loop detection.

check this file on official magento2.3.4 repo for more information

https://github.com/magento/magento2/blob/2.3.4/app/code/Magento/Checkout/Model/Session.php

4
  • check this github repo thread github.com/magento/magento2/pull/14812 for more information about this error. You can also post your issue (with steps to reproduce) there in this thread which can get you a solid help as the person added this code might address your issue.
    – Haijerome
    Feb 8, 2020 at 14:54
  • I tried the above but it just broke the entire website. Am I missing something? I'm in real trouble now that my website is not working! Feb 8, 2020 at 18:24
  • Then revert these changes ....follow up with the GitHub thread and open an issue in magento2 GitHub repo with the proper steps to reproduce
    – Haijerome
    Feb 8, 2020 at 18:28
  • I have the same error. Why not try this in production? Feb 17, 2020 at 13:59
0

This is a stripe issue. Upgrade your stripe extension to the latest version (1.6.x) and it will be solved. Stripe module: https://stripe.com/docs/plugins/magento/install

Related Magento 2 core issue: https://github.com/magento/magento2/issues/26786

0

For temporary solution (works for me)(I face issue in Magento2.3.5 with one of third party payment module)

First you need to update third party module to latest one.

Or for temporary fix. (Not recommended)

You can replace/override Session.php file from Magento 2.3.3 to your current version

vendor/magento/module-checkout/Model/Session.php

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.