question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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 https://github.com/getsentry/sentry-react-native/issues/2244 and https://github.com/getsentry/sentry-react-native/issues/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

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
marandanetocommented, Jul 25, 2022

Version name comes from appcenter and has the {}@{}+codepush:{} pattern. https://github.com/getsentry/sentry-cli/blob/e08e7c31d93a29797edf7d1e5ec42ee0453ecc49/src/utils/appcenter.rs#L191-L194 It should be the value within the 2nd {}. On iOS, this is defined here e.g. https://github.com/getsentry/sentry-react-native/blob/abc947fd04033997fd431c3ea09196718b60b872/sample/ios/sample/Info.plist#L19-L20 So its the same value as CFBundleShortVersionString

1reaction
bruno-garciacommented, Jul 19, 2022

Thanks for raising. There has been some changes recently in Hermes, that might be the cause. We’ll need to look into this before we can get back to you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found