Skip to content

@tanstack/react-query doesn't work when bootstraped alongside sentry. #91

Open
@KoCoder

Description

@KoCoder

Which project does this relate to?

Create Tanstack App

Describe the bug

@tanstack/react-query breaks, when Sentry is installed (atleast using create-tsrouter-app)

Your Example Website or App

https://github.com/KoCoder/tsrouter-sentry-query

Steps to Reproduce the Bug or Issue

  1. npx create-tsrouter-app@latest --add-ons
  2. Select: Start, (tRPC), Query and Sentry
  3. Start the development Server.
  4. Navigate to /demo/tanstack-query.
    (On Firefox/Zen:) Now you should see an Error Message: TypeError: router.ClientSsr is undefined.
    (On Chome:) Now you should see an Error Message: Cannot read properties of undefined (reading 'getStreamedValue')
    These exceptions get thrown inside the _experimental_beforeQuery Method @tanstack/react-router-with-query/index.tsx#L69
    Now I've bootstrapped another ts-app without Sentry. Tanstack-Query works now. Currently I'm trying to find the root-cause of this.

Expected behavior

I have expected that a newly created application works out of the box, without the exception mentioned above.

Screenshots or Videos

Image

Platform

  • OS: Arch Linux (6.13.8-arch1-1)
  • Browser: Chrome, Firefox (Zen-Browser)
    • Chrome-Version: 134.0.6998.88 (Official Build) (64-bit)
    • Zen-Version: 1.10.3b (Firefox 136.0.4) (64-bit)

Additional context

No response

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