Skip to content

Upgrading @sentry/react from 7.99.0 to 7.100.1 breaks setUser with : adding } #10598

@ihmpavel

Description

@ihmpavel

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/react

SDK Version

7.100.1

Framework Version

18.2.0

Link to Sentry event

No response

SDK Setup

Sentry.init({
    dsn: 'xxx',
    integrations: [
      Sentry.reactRouterV6BrowserTracingIntegration({
        useEffect,
        useLocation,
        useNavigationType,
        createRoutesFromChildren,
        matchRoutes,
      }),
      Sentry.replayIntegration(),
    ],
    tracesSampleRate: 0.33,
    release: `${name}@${version}`,
    replaysSessionSampleRate: 0.33,
    replaysOnErrorSampleRate: 1.0,
    normalizeDepth: 6,
  })

Steps to Reproduce

  1. Init Sentry
  2. After user login, call Sentry.setUser({ id: 'Manager:123' })
  3. Expected to see user Manager:123 in administration
  4. From browser is sent Manager}:123 (checked network; our code is setting Manager:123)
  5. In Sentry dashboard is Manager}:123 for events with `@sentry/react

Expected Result

Before version 7.99.0 everything worked as expected. In version 7.100.1 7.99.0...7.100.1 something happened to @sentry/react and started adding } to user.id while calling Sentry.setUser({ id: 'Manager:123' })

Actual Result

Version 7.100.1 should set in code Sentry.setUser({ id: 'Manager:123' }) and in UI the user.id should be Manager:123 instead of Manager}:123

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Waiting for: Community

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions