question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exception thrown in SentryBreadcrumb.m serialize method

See original GitHub issue

OS:

  • 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:closed
  • Created a year ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
krystofwoldrichcommented, Oct 13, 2022

@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.

0reactions
marandanetocommented, Oct 13, 2022

@krystofwoldrich would you like to raise a new issue for that? closing this one since its going to be fixed on the client.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Out of memory on exception serialization that contains a ...
It returns an id and then after a while crashed the tab due to out of memory exception. I'm not sure why, probably...
Read more >
Using Breadcrumbs - Sentry Documentation
Sentry uses breadcrumbs to create a trail of events that happened prior to an issue. These events are very similar to traditional logs,...
Read more >
Index (Sentry-Java client 1.7.28 API) - Javadoc.io
Utility class used by the Sentry Java Agent to store per-frame local variable information for the last thrown exception. from(Lookup) - Static method...
Read more >
raven-js-source-map-3023023-2.patch - Drupal
n */\nexport function captureException(exception: any): string {\n let syntheticException: Error;\n try {\n throw new Error('Sentry ...
Read more >
raven-js | Yarn - Package Manager
Please upgrade to @sentry/browser. See the migration guide https://bit.ly/3ybOlo7. JavaScript client for Sentry. debugging, errors, exceptions, logging ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found