Skip to content

(ios) Sentry.setUserContext: userId needs to be string #43

@casio

Description

@casio

Hey guys,

calling
Sentry.setUserContext({userId: 123}),
will raise below exception while this doesnt:
Sentry.setUserContext({userId: "123"}),

Moreover, setting (other) object props to a null value will raise similarly, eg:
Sentry.setUserContext({userId: "123", email: null}),

Maybe this is intended behavior & I just didnt see the related docs for it?

Using
react-native: 0.42.3
react-native-sentry: 0.7.0

2017-05-09 12:16:47.813[51915:999569] *** Terminating app due to uncaught exception 'RCTFatalException: Exception '-[__NSCFNumber length]: unrecognized selector sent to instance 0xb000000000000385' was thrown while invoking setUser on target RNSentry with params (
        {
        userID = 56;
    }
)', reason: 'Exception '-[__NSCFNumber length]: unrecognized selector sent to instance 0...'

Edit: typo

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions