Skip to content

A query remains indefinitely in "fetching" status when the component where it is originated crashes #1182

@ingro

Description

@ingro

Describe the bug
A query remains indefinitely in "fetching" status when the component where it is originated crashes and the error is catched by an error boundary.

To Reproduce
I've created a codesandbox to show the bug, you can see it here: https://codesandbox.io/s/loving-grothendieck-5ovgm
Steps to reproduce the behavior:

  1. Go to the codesanbox;
  2. Click on "Show Posts"
  3. Close the error overlay, you can see that the global fetching indicator shows that 1 query is still running, and if you open the devtools you can see the query in "fetching" status
  4. You could then go back to the home and then click to the "todos" list, it works as expected but the global fetching indicator still remains to 1 after the fetch is completed

Expected behavior
The query originated in the crashed component should not hang and be removed from the query cache.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome
  • Version: 86

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions