Skip to content
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

Bump underlying Sentry JS dependency? #293

Closed
jackkinsella opened this issue Oct 24, 2022 · 1 comment · Fixed by #301
Closed

Bump underlying Sentry JS dependency? #293

jackkinsella opened this issue Oct 24, 2022 · 1 comment · Fixed by #301

Comments

@jackkinsella
Copy link

jackkinsella commented Oct 24, 2022

Summary

Long-story short, sentry-expo requires version 7.7 of Sentry JS. We want to bump to ~7.28. (see here) Because of this constraint, the @sentry/react-native library (needed for native reporting) is constrained to be at version3.2 or lower. (iOS production builds will fail due to Podfile dep issues). @sentry/react-native is currently at 4.6.1 and version 5.0.0-alpha.6 is already out.

I believe there are some issues with the version of @sentry/react-native. In Android 6, 7 and 8, for example, any app containing it will simply not open. This is due to an error in this version of Sentry. I see multiple crash reports in Android Vitals about this. Android 7 is 5% of global users.

Exception java.lang.RuntimeException: Could not invoke RNSentry.initNativeSdk
  at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:383)
  at com.facebook.react.bridge.JavaModuleWrapper.invoke (JavaModuleWrapper.java:188)
  at com.facebook.react.bridge.queue.NativeRunnable.run
  at android.os.Handler.handleCallback (Handler.java:836)
  at android.os.Handler.dispatchMessage (Handler.java:103)
  at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java:27)
  at android.os.Looper.loop (Looper.java:203)
  at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run (MessageQueueThreadImpl.java:228)
  at java.lang.Thread.run (Thread.java:761)
Caused by java.lang.reflect.InvocationTargetException:
  at java.lang.reflect.Method.invoke
  at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:372)
Caused by java.lang.IncompatibleClassChangeError:
  at io.sentry.react.RNSentryModule.lambda$initNativeSdk$1$io-sentry-react-RNSentryModule (RNSentryModule.java:192)
  at io.sentry.react.RNSentryModule$$ExternalSyntheticLambda6.configure
  at io.sentry.android.core.SentryAndroid.lambda$init$1 (SentryAndroid.java:94)
  at io.sentry.android.core.SentryAndroid$$ExternalSyntheticLambda0.configure
  at io.sentry.Sentry.init (Sentry.java:116)
  at io.sentry.android.core.SentryAndroid.init (SentryAndroid.java:83)
  at io.sentry.android.core.SentryAndroid.init (SentryAndroid.java:64)
  at io.sentry.react.RNSentryModule.initNativeSdk (RNSentryModule.java:88)

I would assume (or blindly hope) that these issues are resolved in later versions of @sentry/react-native, therefore it might be worth bumping the version in this repo to allow for that to be installed.

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

managed

What platform(s) does this occur on?

iOS

SDK Version (managed workflow only)

44

Environment

expo-env-info 1.0.5 environment info:
System:
OS: macOS 12.4
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.15.1 - ~/.nvm/versions/node/v16.15.1/bin/node
Yarn: 1.22.18 - /opt/homebrew/bin/yarn
npm: 8.11.0 - ~/.nvm/versions/node/v16.15.1/bin/npm
Watchman: 2022.10.03.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK:
API Levels: 30, 31
Build Tools: 29.0.2, 30.0.2, 31.0.0, 33.0.0
System Images: android-24 | Google APIs ARM 64 v8a, android-31 | Google APIs ARM 64 v8a
IDEs:
Android Studio: 2021.1 AI-211.7628.21.2111.8193401
Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
npmPackages:
@expo/metro-config: ^0.3.9 => 0.3.21
expo: ^45.0.0 => 45.0.8
react: 17.0.2 => 17.0.2
react-dom: 17.0.2 => 17.0.2
react-native: 0.68.2 => 0.68.2
react-native-web: 0.17.7 => 0.17.7
npmGlobalPackages:
eas-cli: 0.55.1
expo-cli: 6.0.5
Expo Workflow: managed

Reproducible demo or steps to reproduce from a blank project

package.json

{
  "dependencies": {
      "@sentry/react-native": "^3.1.1",
      "sentry-expo": "^4.2.0",
  }
}
@jackkinsella
Copy link
Author

For context, our app has approx 10k users. 100% of crashes in Android 6, 7 and 8 were due to this error. (n=115)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant