You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When passing an array to setExtra, setExtras or setContext(possibly others), I get the above error
com.facebook.react.bridge.ReadableNativeArray cannot be cast to com.facebook.react.bridge.ReadableNativeMap
But i only get this on Android. iOS works correctly and also shows data in sentry. This is also only on release build. On debug build both iOS and Android work correctly and i can see context or extra correctly in sentry.
Steps to reproduce:
pass array to setExtra or setContext
observer crash
Actual result:
App crashes with above error
Expected result:
app not crash :D
The text was updated successfully, but these errors were encountered:
Hi @ziga-hvalec,
thank you for the message both setExtras and setContext accept type of { [key: string]: any } which is very permissive, but the underlying native functions expect Record<string, any>. But as you mentioned, passing invalid data should not crash the application.
Until we improve this, please pass arrays like this:
OS:
Platform:
SDK:
@sentry/react-native
(>= 1.0.0)react-native-sentry
(<= 0.43.2)SDK version: 0.0.0
react-native
version: 0.73.8Are you using Expo?
Are you using sentry.io or on-premise?
Configuration:
(
@sentry/react-native
)I have the following issue:
When passing an array to setExtra, setExtras or setContext(possibly others), I get the above error
com.facebook.react.bridge.ReadableNativeArray cannot be cast to com.facebook.react.bridge.ReadableNativeMap
But i only get this on Android. iOS works correctly and also shows data in sentry. This is also only on release build. On debug build both iOS and Android work correctly and i can see context or extra correctly in sentry.
Steps to reproduce:
Actual result:
App crashes with above error
Expected result:
app not crash :D
The text was updated successfully, but these errors were encountered: