Skip to content

CodePush iOS/Android with Hermes showing wrong line numbers RN0.68/Sentry SDK7/Self-Hosted 22.5.0 #2372

@kopax-polyconseil

Description

@kopax-polyconseil

OS:

  • Windows (not tested as we don't use Windows)
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

  • @sentry/react-native (>= 1.0.0)
{
  "dependencies": {
    "react-native": "^0.68.2",
    "@sentry/react": "^7.6.0",
    "@sentry/react-native": "^4.1.2",
    "@sentry/tracing": "^7.6.0"
  },
  "devDependencies": {
    "@sentry/types": "^7.6.0",
    "@sentry/webpack-plugin": "^1.18.9"
  }
}

react-native version: 0.68.2

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise v22.5.0

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

NA

Configuration:

import { Platform } from 'react-native'
import CodePush from 'react-native-code-push'

import { env } from 'libs/environment'

import { version, build } from '../../../package.json'

export async function getSentryConfig() {
  let update
  try {
    update = await CodePush.getUpdateMetadata()
  } catch (error) {
    // silent fail
  }

  let release = `${version}-${Platform.OS}`
  if (update) {
    release += `+codepush:${update.label}`
  }
  const dist = `${build}-${Platform.OS}`
  return {
    dsn: env.SENTRY_DSN,
    environment: env.ENV,
    release,
    dist,
  }
}

I have following issue:

Following #2244 and #2087 closed too early, this is how we generate the sourcemaps, we used all of your recommendations, but still can't use source map with Android/iOS app after code push, which we often use.

iOS hard and android Hard work fine since your last investigation regarding iOS and Android matter, but this is what code push does.

Steps to reproduce: :

  • Step 1: create a build hard iOS or Android published on appcenter or stores
  • Step 2 : update the code base and provide change through app center code push
  • Step 3 : manually generate sourcemaps and upload them to sentry with a custom dist and release pair
  • Step 4 : send an error to sentry

Actual result:

iOS

image
image

Android

image
image

Expected result:

We expect to see proper sourcemaps line as for our iOS and Android hard build

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions