Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry logic in async action creators for cart causes infinite loops #344

Closed
ericerway opened this issue Oct 9, 2018 · 3 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@ericerway
Copy link

ericerway commented Oct 9, 2018

2018-10-09_13-26-49 2018-10-09 13_31_29

Experiencing an infinite loop in devtools when trying to add to cart when using a Cloud instance of 2.3.0.

Note: For users on slower machines, this is very difficult to debug as it crashes the browser tab.

@ericerway ericerway added the bug Something isn't working label Oct 9, 2018
@DrewML
Copy link
Contributor

DrewML commented Oct 9, 2018

Another developer attempting to contribute to venia-concept yesterday hit this infinite loop just visiting the homepage after starting up the app for local dev.

I haven't seen the code behind this at all, but a wild guess would be some attempted error recovery when calling out to the REST APIs.

Update: I'm now replicating this locally. Definitely the retry logic. Doesn't seem to have a working exit condition.

@DrewML
Copy link
Contributor

DrewML commented Oct 9, 2018

Looks like several of the async action creators in cart/asyncActions.js do a retry upon failure, and the code has no max retry logic. Can quickly see by searching for the string retry in that file

@DrewML DrewML changed the title Infinite loop with Venia add to cart Retry logic in async action creators for cart causes infinite loops Oct 9, 2018
@mhhansen
Copy link
Contributor

mhhansen commented Oct 9, 2018

same thing happened to me yesterday when I was testing the PWAServer refactor,
seems could be related to the cartId being NULL (didn't check the code, not sure how it works)

here are a few shots with the stack trace that I was able to capture yesterday.
after reloading the page, everything worked OK.

screen shot 2018-10-08 at 8 38 31 pm

screen shot 2018-10-08 at 8 40 59 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants