expo / sentry-expo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sentry does not display stacktraces for CodedExceptions correctly

mathiashampen opened this issue · comments

Summary

When a expo library throws a CodedException the stacktrace is not displayed correctly in sentry. Sentry is having problems processing the event because the location in the sourcemap is invalid.

As you can see in the picture below it is really hard to trace down the error when a expo library throws a CodedException

Screenshot 2023-10-26 at 07 15 18

However in this case where the expo-web-browser library throws a normal Exception we can see exactly what the problem is and trace it back to useAccountService.ts in the promptLogin function at line 105:37.

Screenshot 2023-10-26 at 07 04 38

We use the sentry.gradle script for generating and uploading the bundle and sourcemaps.

Could you please validate if it is possible to get the correct stacktraces for CodedExceptions?
And if it is possible what could the issue be?

Library versions:
sentry-expo: 7.0.0
sentry/react-native: 5.5.0

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

bare

What platform(s) does this occur on?

Android

SDK Version (managed workflow only)

No response

Environment

expo-env-info 1.0.5 environment info:
System:
OS: macOS 13.6
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.5.1 - /opt/homebrew/bin/node
Yarn: 3.3.0 - /opt/homebrew/bin/yarn
npm: 9.8.0 - /opt/homebrew/bin/npm
Watchman: 2023.08.28.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.12.1
SDKs:
iOS SDK:
Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
Android SDK:
API Levels: 31, 33, 34
Build Tools: 30.0.3, 33.0.0, 34.0.0
System Images: android-31 | Google APIs ARM 64 v8a, android-34 | Google APIs ARM 64 v8a
IDEs:
Android Studio: 2022.2 AI-222.4459.24.2221.10121639
Xcode: 14.3.1/14E300c - /usr/bin/xcodebuild
npmPackages:
expo: ^49.0.0 => 49.0.13
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
react-native: 0.72.5 => 0.72.5
react-native-web: ~0.19.9 => 0.19.9
Expo Workflow: bare

Reproducible demo or steps to reproduce from a blank project

Not available at the moment. I can create a reproducible demo if needed.

This issue is stale because it has been open for 60 days with no activity. If there is no activity in the next 7 days, the issue will be closed.

This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.