Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null value in extra map causes event to get silently dropped #2681

Closed
harlandduman opened this issue Apr 28, 2023 · 1 comment · Fixed by #2708
Closed

Null value in extra map causes event to get silently dropped #2681

harlandduman opened this issue Apr 28, 2023 · 1 comment · Fixed by #2708
Assignees

Comments

@harlandduman
Copy link

Integration

sentry-android

Build System

Gradle

AGP Version

7.4.2

Proguard

Enabled

Version

6.9.2

Steps to Reproduce

I'm using React Native, but manually initializing Sentry on Android (not sure if the manual initialization is relevant or not)

Capture exception in Javascript, passing in an extra map with a null value in it, e.g.

Sentry.withScope((scope) => {
  scope.setExtras({someKey: null});
  Sentry.captureException(error)
}

Expected Result

The event should be processed successfully and sent to Sentry.

Actual Result

There's an error on the Android side when deserializing the event, and it gets silently dropped. I also would expect that an error during processing would get sent to Sentry since it seems like that's what happens in the Javascript library, but maybe I'm wrong about that.

Screen Shot 2023-04-28 at 9 22 17 AM

It looks like this line

baseEvent.extra = CollectionUtils.newConcurrentHashMap(deserializedExtra);
is the issue, since ConcurrentHashMaps don't support null values

@romtsn
Copy link
Member

romtsn commented May 2, 2023

@harlandduman thanks for the report, we'll look into this soon!

@adinauer adinauer self-assigned this May 3, 2023
@markushi markushi moved this from Needs Discussion to Backlog in Mobile & Cross Platform SDK May 3, 2023
@adinauer adinauer assigned lbloder and unassigned adinauer May 12, 2023
@github-project-automation github-project-automation bot moved this from Backlog to Done in Mobile & Cross Platform SDK May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants