Skip to content

[Flaky CI]: Error in test/reactrouter-cross-usage.test.tsx #20199

@s1gr1d

Description

@s1gr1d

Flakiness Type

Other / Unknown

Name of Job

Browser Unit Tests

Name of Test

packages/react/test/reactrouter-cross-usage.test.tsx

Link to Test Run

https://github.com/getsentry/sentry-javascript/actions/runs/24241618203/job/70778626111?pr=20198

Details

  ⎯⎯⎯⎯⎯⎯ Unhandled Errors ⎯⎯⎯⎯⎯⎯
  
  Vitest caught 1 unhandled error during the test run.
  This might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected.
  
  ⎯⎯⎯⎯ Unhandled Rejection ⎯⎯⎯⎯⎯
  TypeError: Cannot set properties of undefined (setting 'updateName')
   ❯ getActiveSpan test/reactrouter-cross-usage.test.tsx:85:12
       83|       const span = actual.getActiveSpan();
       84| 
       85|       span.updateName = mockNavigationSpan.updateName;
         |            ^
       86|       span.setAttribute = mockNavigationSpan.setAttribute;
       87| 
   ❯ getActiveRootSpan src/reactrouter-compat-utils/utils.ts:313:16
   ❯ subscriber src/reactrouter-compat-utils/instrumentation.tsx:423:31
   ❯ forEach ../../node_modules/@remix-run/router/router.ts:1179:7
   ❯ updateState ../../node_modules/@remix-run/router/router.ts:1178:22
   ❯ completeNavigation ../../node_modules/@remix-run/router/router.ts:1311:5
   ❯ handleLoaders ../../node_modules/@remix-run/router/router.ts:1951:7
   ❯ startNavigation ../../node_modules/@remix-run/router/router.ts:1659:15
   ❯ Object.navigate ../../node_modules/@remix-run/router/router.ts:1441:18
  
  This error originated in "test/reactrouter-cross-usage.test.tsx" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
  The latest test that might've caused the error is "should create separate spans for same route with different params". It might mean one of the following:
  - The error was thrown, while Vitest was running this test.
  - If the error occurred after the test had been completed, this was the last documented test before it was thrown.

Metadata

Metadata

Assignees

No one assigned
    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