Sentry-react-native: Native fails when set any Extra Data for User

Created on 27 Mar 2018  路  2Comments  路  Source: getsentry/sentry-react-native

OS:

  • [ ] Windows
  • [x] MacOS
  • [ ] Linux

_Platform:_

  • [x] iOS
  • [ ] Android

Output of node -v && npm -v && npm ls --prod --depth=0

v8.10.0
5.7.1

Config:

Sentry.config('馃攽').install()

I have following issue:
Tha app fails when tries to set extra data for a user inside user's context object (setUserContext) or directly extra context (setUserContext)
The App doesn't send JavaScript Exception to JS Engine

Error:

2018-03-27 16:19:54.483105+0300 AppName[45067:4432257] [User Defaults] Attempt to set a non-property-list object {
        status = Approved;
...

2018-03-27 16:19:54.485246+0300 AppName[45067:4432257] Exception 'Attempt to insert non-property list object {
        status = Approved;
...

for key sentry.io.extra' was thrown while invoking setExtra on target RNSentry with params (
        {
        status = ...

2018-03-27 16:19:54.497 [info][tid:com.facebook.react.JavaScript] 

Steps to reproduce:

  • Write in the code Sentry.setUserContext({id: ..., extra: {...}}) or Sentry.setExtraContext({...})
  • run the app
  • app fails

Actual result:

  • App fails with exception in Native code execution but no message/error/warning on JS thread

Expected result:

  • The App should send to JavaScript engine the Exception at least
    OR
  • Set extra data to send in each error/message/capture log

Most helpful comment

Hi there, I just edited this for you. Try not to post your DSN on GitHub.

All 2 comments

Hi there, I just edited this for you. Try not to post your DSN on GitHub.

Hey, sorry for the late reply.
Please make sure the data you pass in is JSON compatible containing only primitive types.
I am not able to reproduce this issue for me this is working fine:

Sentry.setUserContext({
  email: '[email protected]',
  userID: '12341',
  username: 'username',
  extra: {
    is_admin: false
  }
});

Please feel free to reopen this issue if you are still having troubles.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lwmouneyrac picture lwmouneyrac  路  3Comments

brainbicycle picture brainbicycle  路  3Comments

juhaelee picture juhaelee  路  3Comments

kriptonhaz picture kriptonhaz  路  3Comments

ThomasLarge picture ThomasLarge  路  3Comments