Skip to content

useFetcher stuck in loading state #10668

@seanlennaerts

Description

@seanlennaerts

Reproduction

https://stackblitz.com/edit/remix-run-remix-m5bfh5qe?file=app%2Froutes%2F_index.tsx

  1. click on [✅ Trigger revalidation w/o redirect] button to see the fetcher state go through idle -> submitting -> loading -> idle as expected
  2. click on [❗ Trigger revalidation w/ redirect] button to see it go to through idle -> submitting -> loading where it gets stuck

System Info

System:
  OS: Linux 5.0 undefined
  CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Memory: 0 Bytes / 0 Bytes
  Shell: 1.0 - /bin/jsh
Binaries:
  Node: 20.19.1 - /usr/local/bin/node
  Yarn: 1.22.19 - /usr/local/bin/yarn
  npm: 10.8.2 - /usr/local/bin/npm
  pnpm: 8.15.6 - /usr/local/bin/pnpm
npmPackages:
  @remix-run/dev: * => 2.16.8 
  @remix-run/node: * => 2.16.8 
  @remix-run/react: * => 2.16.8 
  @remix-run/serve: * => 2.16.8 
  vite: ^6.0.0 => 6.3.5

Used Package Manager

npm

Expected Behavior

Even if the fetcher's revalidation is interrupted by a redirect I expect the fetcher's state to eventually resolve to idle

Actual Behavior

When a fetcher's revalidation is interrupted by a redirect it gets stuck in a loading state

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions