Skip to content

SetUserContext doesn't work on IOS 10.4.3 #211

@OlivierNguyen

Description

@OlivierNguyen

I wrapped setUserContext into function and call it in the ComponentDidMount of my app.

export const sentrySetUserContext = (user) => {
  Sentry.setUserContext(getUserInfo(user));
};

const getUserInfo = (user) => ({
  userID: user.id.toString(),
});

To test, I add a button which calls Sentry.nativeCrash().
I received the error in the Sentry console but without information about UserID.
It only shows my IP.

IOS version: 10.4.3
Sentry version: 0.21.1

I did not test on Android.

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