Exception thrown in SentryBreadcrumb.m serialize method
See original GitHub issueOS:
- Windows
- [ x] MacOS
- Linux
Platform:
- [ x] iOS
- Android
SDK:
- [x ]
@sentry/react-native
(>= 1.0.0) -
react-native-sentry
(<= 0.43.2)
SDK version: 7.27.1
react-native
version: 0.68.2
Are you using Expo?
- Yes
- [x ] No
Are you using sentry.io or on-premise?
- [ x] sentry.io (SaaS)
- on-premise
If you are using sentry.io, please post a link to your issue so we can take a look:
[Link to issue]
Configuration:
(@sentry/react-native
)
const routingInstrumentation = new Sentry.RoutingInstrumentation()
Sentry.init({
dsn: 'https://...',
integrations: [
new Sentry.ReactNativeTracing({
tracingOrigins: ['localhost', FB_ENVIRONMENTS.production],
routingInstrumentation,
beforeNavigate: (context) => {
return {
...context,
tags: {
...context.tags,
routeName: context.name,
},
}
},
}),
],
tracesSampleRate: 0.25, // percentage of transactions sent
beforeSend(event) {
...
},
})
export default withIAPContext(Sentry.wrap(App))
I have following issue:
Updated from @sentry/react-native 3.4.2 -> 4.6.1 On app load a redux action is triggered which results in an iOS Exception in SentryBreadcrumb.m serialize method. Line 33. Unrecognized selector sent to instance 0x2827208c0. If I reduce Sentry.init to just the dsn number, the issue still persists. If I use Sentry.wrap or not, the issue still persists. If I have the sentry redux enhancer enabled or not, the issue still persists. The data prop to be serialized is being passed as type String but it appears to expect, and only handle, a dictionary. Is this expected behaviour or do I perhaps have a configuration issue somewhere?
Steps to reproduce:
- Step 1
- Step 2
Actual result:
Exception NSException * “-[__NSCFString sentry_sanitize]: unrecognized selector sent to instance 0x2827208c0” 0x0000000282f3ab80 name __NSCFConstantString * “NSInvalidArgumentException” 0x0000000219505348 reason __NSCFString * “-[__NSCFString sentry_sanitize]: unrecognized selector sent to instance 0x2827208c0” 0x000000028c9ea060 userInfo void * NULL 0x0000000000000000 reserved void * NULL 0x0000000000000000
self SentryBreadcrumb * 0x283a84d80 0x0000000283a84d80 NSObject NSObject _level SentryLevel kSentryLevelInfo _category __NSCFString * @“redux-action” 0x00000002827208a0 _timestamp __NSTaggedDate * 2022-10-11 15:08:41 UTC 0x9fc5d682a54ff7a0 _type NSString * nil 0x0000000000000000 _message __NSCFString * @“meal/changeDate” 0x0000000282f13e10 _data __NSCFString * @“2022-10-11” 0x00000002827208c0
serializedData __NSDictionaryM * 4 key/value pairs 0x0000000282418740 [0] (null) @“message” : @“meal/changeDate” [1] (null) @“timestamp” : @“2022-10-11T15:08:41.620Z” [2] (null) @“level” : @“info” [3] (null) @“category” : @“redux-action”
Expected result:
No serialization errors
Issue Analytics
- State:
- Created a year ago
- Comments:9 (6 by maintainers)
Top GitHub Comments
@marandaneto I don’t know, I don’t think it’s necessary, the TS typings don’t allow anything else than Object to be passed.
@krystofwoldrich would you like to raise a new issue for that? closing this one since its going to be fixed on the client.