-
-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JS Error is reported as Java Exception #3078
Comments
Hi, Sentry.init({
integrations: [
new RewriteFrames({
iteratee: (frame) => {
if (frame.filename && frame.filename !== '[native code]') {
frame.filename =
Platform.OS === 'android' ? 'app:///index.android.bundle' : 'app:///main.jsbundle';
}
return frame;
},
}),
]
}) This code is added by the Let us know if this helped, if not we can reopen the issue con investigate more. |
@krystofwoldrich Thanks very much for your reply. after I added the integrations option to Sentry.init, iOS seems working fine now but Android is still not. one thing I noticed is when I run the iOS build, the source map appeared on both tabs (Artifact Bundles, release-bundles) but Android only appeared in release-bundles with warning. Besides, Android build speed is much faster than iOS, during the build process I didn't see too much upload traffic but it can be observed during iOS build process. Is there any other settings I am missing? |
I'm happy to hear that it helped a bit. A assume both the iOS and Android errors use the same JS code? The issue from Android is a Java exception with JS stack trace in its message. Sentry doesn't symbolicate the message content. We handle this case here. Are you initializing |
@krystofwoldrich You are right, both the iOS and Android errors use the same JS code and I did not initialize SentryAndroid manually. what I have done is init sentry with release and dist and export same release/dist env var in build script. |
Would you be able to share a minimal reproducible example for the Android JavascriptException? As I mentioned you should get JS Error but you are getting Java Exception. |
OK, I‘ll try to create a minimal example when I got time. currently cause we also need to integrate with codepush, we'll upload the source map manually anyway. |
Closing as duplicate of #3126 |
OS:
Platform:
SDK:
@sentry/react-native
(5.5.0)react-native-sentry
(<= 0.43.2)SDK version: 0.0.0
react-native
version: 0.70.5Are you using Expo?
Are you using sentry.io or on-premise?
If you are using sentry.io, please post a link to your issue so we can take a look:
Link to issue
Configuration:
(
@sentry/react-native
)I have following issue:
[Description]
Steps to reproduce:
Actual result:
[Actual result]
The source map seems not used to display the error source code location.
and when I check the sourceMaps tab in sentry.io it shows no bundle connected to this release
Expected result:
[Expected result]
The source map should be used to parse the error stacktrace.
Please help on this, Thanks !
The text was updated successfully, but these errors were encountered: