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
All mutations get stuck in paused state if one of them fails #6825
Comments
I just realized that when this happens, I can get the first paused mutation from mutationCache and then simply use |
I'd like to reopen this issue. We have the same problem. We're wokring on a react native project with react query v5.25.0. After two retries (as a response to switching between online and offline) our mutation remains with the status "pending" and the isPaused flag set to true even though the retry parameter is set to 10 - similar as mentioned in this issue. |
I never got to look at the reproduction because the issue was closed immediately. Reopening and will take a look soon. |
FYI: I opened a discussion to an issue we faced that goes in a similar direction but is rather arguable if this should be handled by the react query package or not |
definitely an issue here. I'm not happy with the whole implementation of resuming paused mutations. I introduced the Need to think about this holistically. all ideas are welcome :) |
Describe the bug
isPaused: true
state.isPaused: true
state (correctly so!)isPaused: true
stateI noticed that when I get mutations cache,
resuming
property always has the Promise as a value that never resolves. Maybe this is relevant to the issue?Your minimal, reproducible example
https://codesandbox.io/p/sandbox/jolly-driscoll-6lqrv4
Steps to reproduce
This is a video of what I am doing:
Screen.Recording.2024-02-03.at.7.50.40.PM.mov
This is a repository which I am using for the video above:
https://github.com/maxyatsenko/tanstack-query-offline-bug
Expected behavior
As a user I expected query to start all the mutations again once I'm online.
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
Tested this with latest Chrome and Edge.
Tanstack Query adapter
react-query
TanStack Query version
5.18.1
TypeScript version
4.4.2
Additional context
No response
The text was updated successfully, but these errors were encountered: