Skip to content

[RUM] TypeError: Cannot read properties of undefined (reading '_nonReactive') in TanStack Router #1387

Description

@dawsontoth

Summary

Datadog RUM error tracking reports a recurring TypeError inside @tanstack/router-core that has been active since June 2026 and is still occurring in v2.125.4. 1 occurrence was observed in the last 24 hours.

Datadog Error Tracking: https://app.datadoghq.com/error-tracking/issue/3b73dfac-5d74-11f1-9916-da7ad0900002

Error Details

  • Type: TypeError
  • Message: Cannot read properties of undefined (reading '_nonReactive')
  • Location: @tanstack/router-core@1.171.6load-matches.jsjs()
  • First seen: v2.110.2 (2026-06-01)
  • Last seen: v2.125.4 (2026-06-29)
  • Platform: Browser
  • 24h occurrences: 1

Context

This error occurs during route match loading in TanStack Router. The _nonReactive property read on undefined suggests a match or context object is being accessed before it is initialized — likely during navigation to a route that hasn't fully resolved yet, or during concurrent route transitions.

Note: the CLAUDE.md for this repo documents a known TanStack Router upgrade regression (1.133 → 1.170+) where getParentRoute / addChildren mismatches cause route params to be dropped. This error may be related to that class of issue or to a specific route's match state becoming undefined.

Impact

  • Ongoing since June 2026
  • Non-crash error (handled), but indicates a routing code path with a potential undefined dereference
  • Affects users navigating in the app

Suggested Investigation

  1. Check if any recently added or modified route has a getParentRoute / addChildren mismatch (see src/router/rootRouteTree.ts and the regression tests in src/router/__tests__/orgUndefinedRepro.test.ts).
  2. Reproduce by navigating between routes rapidly or directly deep-linking to routes that involve route matches being loaded.
  3. Add a null check or guard around the _nonReactive access in the router's match loading path if the router version allows it; otherwise consider pinning or upgrading @tanstack/router-core.

Labels

bug rum

Metadata

Metadata

Assignees

Labels

rumFrom real user monitoring where we aim to keep users happy

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions