Skip to content

AbortError: signal is aborted without reason is bubbling up when using loader with basepath #4517

Description

@rhuanbarreto

Which project does this relate to?

Router

Describe the bug

Initial conditions:

  • Router configured with basepath: "/somepath"
  • Loader in the root route that uses the abortController

Action:

  • Access the frontend at "/"

Outcome:

The loader gets aborted during the first render cycle (correctly) due to a redirect to the basepath. But the AbortSignal is sent without a reason, which defaults to a DOMException AbortError: signal is aborted without reason that gets caught by the ErrorBoundary and it doesn't let the application render.

Your Example Website or App

https://stackblitz.com/edit/github-jef391fi?file=src%2Froutes%2F__root.tsx

Steps to Reproduce the Bug or Issue

Access the repro URL and you will see the error.

Expected behavior

Expected to not trigger the ErrorBoundary

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions