Skip to content

Error and Stacktrace not matching - even with proper sourcemaps uploaded #9046

@arnaudambro

Description

@arnaudambro

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which SDK are you using?

@sentry/react

SDK Version

7.69.0

Framework Version

18.2.0

Link to Sentry event

https://sentry.fabrique.social.gouv.fr/organizations/incubateur/issues/114896/events/ce7e6016a8134227996c9ca4aebb83ac/

SDK Setup

https://github.com/SocialGouv/mano/blob/main/dashboard/src/app.js#L61

import { createBrowserHistory } from 'history';
import * as Sentry from '@sentry/react';
import { BrowserTracing } from '@sentry/tracing';
const history = createBrowserHistory();

Sentry.init({
  dsn: MY_DSN,
  environment: 'dashboard',
  release: PACKAGE_JSON_VERSION, // 1.2.3
  integrations: [
    new BrowserTracing({
      routingInstrumentation: Sentry.reactRouterV5Instrumentation(history),
    }),
  ],
  
  // Set tracesSampleRate to 1.0 to capture 100%
  // of transactions for performance monitoring.
  // We recommend adjusting this value in production
  tracesSampleRate: 1.0,
  ignoreErrors: [
    'Network request failed',
    'Failed to fetch',
    'NetworkError',
    // ???
    'withrealtime/messaging',
    // This error seems to happen only in firefox and to be ignorable.
    // The "fetch" failed because user has navigated.
    // Since other browsers don't have this problem, we don't care about it,
    // it may be a false positive.
    'AbortError: The operation was aborted',
  ],
});

https://github.com/SocialGouv/mano/blob/main/dashboard/Dockerfile#L22

FROM node:14-alpine as builder

RUN apk add --no-cache gcc autoconf automake build-base libpng-dev nasm

WORKDIR /app

RUN chown node:node /app

COPY dashboard/package.json .
COPY dashboard/yarn.lock .

RUN yarn --frozen-lockfile

COPY dashboard/. .

ENV NODE_ENV=production

RUN --mount=type=secret,id=sentry_auth_token \
    yarn build; \
    if [ -f "/run/secrets/sentry_auth_token" ]; then \
        export SENTRY_AUTH_TOKEN=$(cat /run/secrets/sentry_auth_token); \
        yarn sentry:sourcemaps; \
    fi


FROM ghcr.io/socialgouv/docker/nginx4spa:7.0.1

COPY --from=builder /app/build /usr/share/nginx/html

https://github.com/SocialGouv/mano/blob/main/dashboard/package.json#L80

{
  "scripts": {
    "sentry:sourcemaps": "sentry-cli sourcemaps inject --org incubateur --project mano ./build && sentry-cli --url https://sentry.fabrique.social.gouv.fr/ sourcemaps upload --org incubateur --project mano ./build --log-level=debug  --release $npm_package_version"
  }
}

Steps to Reproduce

Here is what I see

image

Settings about "scrape missing JavaScript"

Seen in #7250 - but still the same after changing the setting - at least for old issues - should I wait for new issues ?

image

Proof of my sourcemaps :)

image

Expected Result

person is undefined ?

Actual Result

s is undefined

Metadata

Metadata

Assignees

No one assigned

    Labels

    Package: reactIssues related to the Sentry React SDK

    Projects

    Status

    Waiting for: Product Owner

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions