CodePush iOS/Android with Hermes showing wrong line numbers RN0.68/Sentry SDK7/Self-Hosted 22.5.0
See original GitHub issueOS:
- 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
andrelease
pair - Step 4 : send an error to sentry
Actual result:
iOS
Android
Expected result:
We expect to see proper sourcemaps line as for our iOS and Android hard build
Issue Analytics
- State:
- Created a year ago
- Comments:14 (5 by maintainers)
Top GitHub Comments
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 asCFBundleShortVersionString
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.