rollbar / rollbar-react-native

Crash and error reporting for React Native using Rollbar
https://docs.rollbar.com/docs/react-native
62 stars 39 forks source link

clearPerson function not working #144

Open dav-armour opened 3 years ago

dav-armour commented 3 years ago

The clearPerson function does not seem to be working correctly. See below for a simple example.

import { Client } from 'rollbar-react-native';
const rollbar = new Client('API_KEY');
rollbar.error('No user test') // This works correctly - no person exists
rollbar.setPerson('9ee1638b-6100-4b47-bcd3-ee88dccf2dab')
rollbar.error('User exists') // This works correctly - person exists
rollbar.clearPerson();
rollbar.error('User still exists???') // This does not work - error still has previously set person attached

Error Screen Shot

waltjones commented 3 years ago

I'm able to reproduce this. A workaround that might be acceptable depending on you needs is to rollbar.setPerson(null).