Sentry-react-native: All our events have an error - unknown: Discarded unknown attribute

Created on 6 Nov 2020  路  6Comments  路  Source: getsentry/sentry-react-native

OS:

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

Platform:

  • [ ] iOS
  • [X] Android

SDK:

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

SDK version: 2.0.0

react-native version: 0.63.3

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:

https://sentry.io/organizations/cargomate/issues/2012438250/?environment=Development&project=1386395

Configuration:

(@sentry/react-native)

Sentry.init({
  dsn: 'https://<number>:<number>@sentry.io/<number>',
  environment: 'Development'
});

I have following issue:

When upgrading from 1.7.2 to 2.0.0, all our new issues have the following error:
image

I've tried removing all calls to setting context and everything more than Sentry.init but the problem remains.

In the onPress method of a button, I added a call to a method that doesn't exist (this.iDontExist()) to make sure Sentry works as expected, hence the odd method name.

The issue can clearly be seen in the raw JSON of the Sentry issue where the key unknown has the value null:

{
  "event_id": "6fb289a6bcbb4e0e89da5194ad7d3ec5",
  "project": 1386395,
  ...
  "timestamp": 1604689841.007,
  "title": "TypeError: Cannot read property 'iDontExist' of undefined",
  "type": "error",
  "unknown": null,
  ...
}

Steps to reproduce:
I am unable to share our source code and cannot provide steps to reproduce for anyone outside our company.

Actual result:

This is a part of the Sentry (raw JSON) issue:

  "unknown": null,

Expected result:

The same Sentry (raw JSON) with the unknown property.

Type Bug Android Awaiting Fix

Most helpful comment

So this only happens on Android and seems to be added by our Android SDK underneath and not the React Native SDK. We're aware of this issue and are currently investigating it. We'll let you know if we have any updates!

All 6 comments

So this only happens on Android and seems to be added by our Android SDK underneath and not the React Native SDK. We're aware of this issue and are currently investigating it. We'll let you know if we have any updates!

Thank you very much for letting me know, @jennmueng.

same issue here

any updates on this? none of our android errors make sense :(

@marandaneto Have you had a chance to look into this yet?

@jennmueng not really, it's probably because there's a field coming from RN that is not mapped on the Android bits (protocol data classes), we'd need to find out which one and add to the protocol.
It could be even that it exists but it's named differently.

I've tried once but could not reproduce it, could you capture an event (raw envelope/JSON) before being sent so I can check it up? guess you sent me already once but slack lost the history, sorry about that.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

poocart picture poocart  路  3Comments

deathemperor picture deathemperor  路  3Comments

KevinColemanInc picture KevinColemanInc  路  3Comments

ThomasLarge picture ThomasLarge  路  3Comments

kriptonhaz picture kriptonhaz  路  3Comments