Closed antonis closed 1 day ago
Noting that I wasn't able to reproduce the crash with a basic RN 0.75.4
RN app with profiling enabled.
npx @react-native-community/cli init AwesomeProject --version 0.75.4
cd AwesomeProject
npx @sentry/wizard@latest -i reactNative
Set newArchEnabled=true
in android/gradle.properties
Sentry.init({
...
tracesSampleRate: 1.0,
profilesSampleRate: 1.0,
});
Adding the ndk-stack
of the investigated crash:
(offset 0x42b8000) (BuildId: db078b0afc73e2129f8850376d84ff09ee5dcf01)
hermes::vm::HermesValue::getTag() const
/w/react-native/react-native/packages/react-native/sdks/hermes/include/hermes/VM/HermesValue.h:224:27
hermes::vm::HermesValue::isObject() const
/w/react-native/react-native/packages/react-native/sdks/hermes/include/hermes/VM/HermesValue.h:408:12
hermes::vm::StackFramePtrT
The above would indicate that the error occurs in profiler sampling of the latest Hermes. Changing the Sentry profiler sampling we notice that:
profilesSampleRate: 0.1
) seems to hide the issue
What React Native libraries do you use?
RN New Architecture, Hermes
Are you using sentry.io or on-premise?
sentry.io (SaS)
@sentry/react-native SDK Version
6.0.0
How does your development environment look like?
info Fetching system and libraries information...
System: OS: macOS 14.6.1 CPU: (10) arm64 Apple M1 Pro Memory: 257.28 MB / 32.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 18.20.4 path: ~/.nvm/versions/node/v18.20.4/bin/node Yarn: version: 3.6.4 path: ~/.nvm/versions/node/v18.20.4/bin/yarn npm: version: 10.7.0 path: ~/.nvm/versions/node/v18.20.4/bin/npm Watchman: version: 2024.09.09.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.15.2 path: /Users/antonis/.rbenv/shims/pod SDKs: iOS SDK: Platforms: - DriverKit 24.0 - iOS 18.0 - macOS 15.0 - tvOS 18.0 - visionOS 2.0 - watchOS 11.0 Android SDK: Not Found IDEs: Android Studio: 2024.1 AI-241.18034.62.2411.12169540 Xcode: version: 16.0/16A242d path: /usr/bin/xcodebuild Languages: Java: version: 17.0.8 path: /opt/homebrew/opt/openjdk@17/bin/javac Ruby: version: 3.3.0 path: /Users/antonis/.rbenv/shims/ruby npmPackages: "@react-native-community/cli": Not Found react: installed: 18.3.1 wanted: 18.3.1 react-native: installed: 0.75.4 wanted: 0.75.4 react-native-macos: Not Found npmGlobalPackages: "*react-native*": Not Found Android: hermesEnabled: true newArchEnabled: true iOS: hermesEnabled: Not found newArchEnabled: falseSentry.init()
See https://github.com/getsentry/sentry-react-native/blob/6.0.0/samples/react-native/src/App.tsx#L47
Steps to Reproduce
profilesSampleRate
Expected Result
No crash with profiling enabled
Actual Result
The app crashes when profiling is enabled.
Notes
0.75.4
https://github.com/getsentry/sentry-react-native/pull/4155