Skip to content

Uploaded Android bundle is 0MB and event processing keeps failing due to it #2683

Closed
@StampixSMO

Description

@StampixSMO

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

  • @sentry/react-native (>= 1.0.0)
  • react-native-sentry (<= 0.43.2)

SDK version: 4.10.1

react-native version: 0.70.6

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise

If you are using sentry.io, please post a link to your issue so we can take a look:

https://sentry.io/organizations/stampix-zb/issues/3496972388/?project=6259211&query=is%3Aunresolved+os.name%3AAndroid&referrer=issue-stream&statsPeriod=14d

Configuration:

(@sentry/react-native)

Sentry.init({
  dsn: 'https://...@sentry.io/...'
  // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
  // We recommend adjusting this value in production.
  tracesSampleRate: SENTRY_TRACING_RATE,
  enableNdkScopeSync: true,
  integrations: [
    new Sentry.ReactNativeTracing({
      // Pass instrumentation to be used as `routingInstrumentation`
      routingInstrumentation
      // ...
    })
  ],
  environment: SENTRY_ENVIRONMENT,
  // Any data beyond this depth will be trimmed and marked using its type instead ([Object] or [Array]).
  normalizeDepth: 10,
  beforeBreadcrumb: (breadcrumb, hint) => {
    // We log some more information for XHR requests to our GQL API, since only the method and URL is useless for debugging
    if (breadcrumb.category === 'xhr' && hint) {
      try {
        const { query, variables } = JSON.parse(hint.input);
        if (!breadcrumb.data) breadcrumb.data = {};
        breadcrumb.data.query = query;
        breadcrumb.data.variables = variables;
      } catch {}
    }
    return breadcrumb;
  },
  maxValueLength: 500,
  // Don't auto initialize, instead we do it manually
  // See https://docs.sentry.io/platforms/react-native/manual-setup/native-init/
  autoInitializeNativeSdk: false
});

Note that we've just now disabled auto initialization, the issue at hand was present before we did disabled this.


I have following issue:

Every new release suddenly started having empty Android bundles, giving us the Invalid location in sourcemap errors at the top of Android-reported events.
Using the Sentry CLI to debug the particular events reveals the same and the sourcemap uploads in the project Settings also clearly shows it's empty (see screenshot).
image

Note that this used to work in the past, but it's hard to debug where it started occurring since the older events are long removed due to retention periods.

For iOS, this works perfectly and all is well.

Steps to reproduce:
Just make a release bundle, which automatically uploads the bundle to our Sentry environment.

Actual result:

Minified stack traces in our events and an error banner on top.

Expected result:

Proper reported events with stack traces

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions