sentry-react-native icon indicating copy to clipboard operation
sentry-react-native copied to clipboard

MaxBreadcrumbSize to 0 crashes Android on Start

Open lucas-zimerman opened this issue 1 year ago • 1 comments

OS:

  • [X] Windows
  • [ ] MacOS
  • [X] Linux

Platform:

  • [ ] iOS
  • [X] Android

SDK:

  • [X] @sentry/react-native (>= 1.0.0)
  • [ ] react-native-sentry (<= 0.43.2)

SDK version: 0.0.0

react-native version: 0.0.0

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)

Sentry.init({
  // Replace the example DSN below with your own DSN:
  dsn: SENTRY_INTERNAL_DSN,
  debug: true,
  environment: 'dev',
  maxBreadcrumbs: 0,
 ...
});

I have the following issue:

If you set maxBreadcrumbs: 0, the app will crash when opened. it's not mentioned that the size 0 will not work on the docs but if I recall it worked on other SDK that I worked in the past.

Steps to reproduce:

  • Step 1
  • maxBreadcrumbs: 0 on SentryOptions
  • Step 2
  • Open the app

Actual result:

image

Expected result:

The app to not crash and have events without breadcrumbs.

lucas-zimerman avatar Feb 27 '24 15:02 lucas-zimerman

Two items to fix, pass a valid value to sentry-android and ensure that no breadcrumbs are added in JS.

We might need to fix/check sentry-java to allow 0.

krystofwoldrich avatar Mar 08 '24 13:03 krystofwoldrich