OS:
_Platform:_
Output of node -v && npm -v && npm ls --prod --depth=0
v10.7.0
6.4.1
├── @expo/[email protected]
├── @ptomasroos/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── UNMET PEER DEPENDENCY [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] invalid
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
I have following issue:
com.facebook.react.bridge.NoSuchKeyException: stacktrace
10-02 18:25:49.745 5663 6598 E unknown:ReactNative: at com.facebook.react.bridge.ReadableNativeMap.getNullableValue(ReadableNativeMap.java:135)
10-02 18:25:49.745 5663 6598 E unknown:ReactNative: at com.facebook.react.bridge.ReadableNativeMap.getNullableValue(ReadableNativeMap.java:139)
10-02 18:25:49.745 5663 6598 E unknown:ReactNative: at com.facebook.react.bridge.ReadableNativeMap.getMap(ReadableNativeMap.java:210)
10-02 18:25:49.745 5663 6598 E unknown:ReactNative: at io.sentry.RNSentryModule.captureEvent(RNSentryModule.java:260)
10-02 18:25:49.745 5663 6598 E unknown:ReactNative: at java.lang.reflect.Method.invoke(Native Method)
10-02 18:25:49.745 5663 6598 E unknown:ReactNative: at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
10-02 18:25:49.745 5663 6598 E unknown:ReactNative: at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
10-02 18:25:49.745 5663 6598 E unknown:ReactNative: at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
this happening when we got an error
Same Issue for me
Same here. I'm developing on Linux and targeting Android. In my case, this was caused by a segment of code throwing an exception inside of a "setInterval" callback. It would be really nice if Sentry could deal with this case gracefully.
Same issue for me
Same issue for me.
Possible dupe of (or at least related to) #438
In my case the issue is that, in a very specific case, captureEvent inRNSentryModule.java, event.exception doesn't contain stacktrace. I think the existence of stacktrace should be checked as most other keys.
I'm on react-native-sentry version 0.43.1.
I made a PR based on @darioceccoli's comment that checks if stacktrace exists before accessing it. That did seem to fix the issue for me and seems like it would be good to get merged in.
We're experiencing the same issue on 0.43.1. It seems to happen in case of unhandled promises, or for example for custom exceptions we're registering:
Sentry.captureException(new Error("message"));
Sentry.captureMessage("message"));
Stack trace:
E/unknown:ReactNative: Exception in native call
com.facebook.react.bridge.NoSuchKeyException: stacktrace
at com.facebook.react.bridge.ReadableNativeMap.getNullableValue(ReadableNativeMap.java:137)
at com.facebook.react.bridge.ReadableNativeMap.getNullableValue(ReadableNativeMap.java:141)
at com.facebook.react.bridge.ReadableNativeMap.getMap(ReadableNativeMap.java:212)
at io.sentry.RNSentryModule.captureEvent(RNSentryModule.java:268)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:158)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
at android.os.Looper.loop(Looper.java:193)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:232)
at java.lang.Thread.run(Thread.java:764)
Can we please have somebody look at that PR?
We currently fixed it by disabling native integration for android as suggested in https://github.com/getsentry/react-native-sentry/issues/438 but it's hardly a satisfying solution :(
The branch master needs to be published to NPM urgent! This issue is affecting in Android production code.
Version 0.43.2 was released with the fix.
Still getting it with version 0.43.2.
The error shows in Google's Android Vitals as
com.facebook.react.bridge.NoSuchKeyException:
at com.facebook.react.bridge.ReadableNativeMap.getNullableValue (ReadableNativeMap.java:137)
at com.facebook.react.bridge.ReadableNativeMap.getNullableValue (ReadableNativeMap.java:141)
at com.facebook.react.bridge.ReadableNativeMap.getMap (ReadableNativeMap.java:212)
at io.sentry.RNSentryModule.captureEvent (RNSentryModule.java:268)
at java.lang.reflect.Method.invoke (Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke (JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke (JavaModuleWrapper.java:158)
at com.facebook.react.bridge.queue.NativeRunnable.run (Native Method)
at android.os.Handler.handleCallback (Handler.java:873)
at android.os.Handler.dispatchMessage (Handler.java:99)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java:29)
at android.os.Looper.loop (Looper.java:214)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run (MessageQueueThreadImpl.java:232)
at java.lang.Thread.run (Thread.java:764)
still with 1.2.1 only on release build with hermes enabled
I temporarily disabled sentry in android build because of random crash.
frames
com.facebook.react.bridge.ReadableNativeMap in getNullableValue at line 17
com.facebook.react.bridge.ReadableNativeMap in getNullableValue
com.facebook.react.bridge.ReadableNativeMap in getArray at line 2
io.sentry.RNSentryModule in sendEvent at line 649
java.lang.reflect.Method in invoke
com.facebook.react.bridge.JavaMethodWrapper in invoke at line 150
com.facebook.react.bridge.JavaModuleWrapper in invoke at line 21
com.facebook.react.bridge.queue.NativeRunnable in run
android.os.Handler in handleCallback at line 873
android.os.Handler in dispatchMessage at line 99
com.facebook.react.bridge.queue.MessageQueueThreadHandler in dispatchMessage
android.os.Looper in loop at line 214
com.facebook.react.bridge.queue.MessageQueueThreadImpl$4 in run at line 37
java.lang.Thread in run at line 764
I am getting the exact same error that @rarira is getting. Please reopen.
Same error occurs on android when the app is in background for like an hour and goes to foreground :
01-20 22:33:59.245 4239 4356 E AndroidRuntime: com.facebook.react.bridge.NoSuchKeyException: frames
01-20 22:33:59.245 4239 4356 E AndroidRuntime: at com.facebook.react.bridge.ReadableNativeMap.getNullableValue(ReadableNativeMap.java:124)
01-20 22:33:59.245 4239 4356 E AndroidRuntime: at com.facebook.react.bridge.ReadableNativeMap.getNullableValue(ReadableNativeMap.java:128)
01-20 22:33:59.245 4239 4356 E AndroidRuntime: at com.facebook.react.bridge.ReadableNativeMap.getArray(ReadableNativeMap.java:168)
01-20 22:33:59.245 4239 4356 E AndroidRuntime: at io.sentry.RNSentryModule.sendEvent(RNSentryModule.java:320)
01-20 22:33:59.245 4239 4356 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-20 22:33:59.245 4239 4356 E AndroidRuntime: at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
01-20 22:33:59.245 4239 4356 E AndroidRuntime: at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:158)
01-20 22:33:59.245 4239 4356 E AndroidRuntime: at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
01-20 22:33:59.245 4239 4356 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:907)
01-20 22:33:59.245 4239 4356 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:105)
01-20 22:33:59.245 4239 4356 E AndroidRuntime: at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
01-20 22:33:59.245 4239 4356 E AndroidRuntime: at android.os.Looper.loop(Looper.java:216)
01-20 22:33:59.245 4239 4356 E AndroidRuntime: at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:232)
01-20 22:33:59.245 4239 4356 E AndroidRuntime: at java.lang.Thread.run(Thread.java:784)
I opened a new issue regarding NoSuchKeyException: frames
https://github.com/getsentry/sentry-react-native/issues/742
Most helpful comment
still with 1.2.1 only on release build with hermes enabled
I temporarily disabled sentry in android build because of random crash.