I'm experimenting with Bugsnag, and loving it so far.
I'm hitting an annoyance, when adding user metadata to my exception - my user ID is being ignored, and the default IP address is always being used instead.
I'm using the standard user metadata like:
user: {
id: '6',
email: '[email protected]',
name: 'testy mctestington'
}
Things I've tried:
id is cast to a stringbugsnag-2.min.js to bugsnag-3.min.jsswitching from
bugsnag-2.min.jstobugsnag-3.min.js
Does this happen for you when using v2? Because I just checked a recent event in my Bugsnag dashboard (in a project using v2) and I'm seeing the correct user ID.

Regardless, it sounds like a server side issue to me. Possibly with the v3 payloadVersion?
Thanks for the extra info @jacobmarshall.
Still digging. I think you're right in that's its a server-side issue for Bugsnag. I'm inspecting the request being sent from my app, and there's no mention of the client IP, which is what's being used instead of ID. Furthermore, I was able to confirm that the ID is being included in the request:
...my request url... &metaData%5Buser%5D%5Bid%5D=6&metaData%5Buser%5D%5Bemail%5D=test%40example.com&metaData%5Buser%5D%5Bname%5D=testy%20mctestington
I've sent a support email to Bugsnag, and will update / close this issue once I get a resolution.
If you send a userId and a user, the server will use the userId, and discard the user I think. Make sure you only send a user.
Thanks @GrahamCampbell however userId was removed in v3 of the bugsnag-js notifier. Also the issue is with the server overriding the user ID field. I don't think there's any issue with the notifier or how this user is using it.
Hmmm. The upcoming PHP notifier also uses the v3 payload, and I'm not seeing any issues there, so I don't think this is a server side issue.
Fair enough. Would you be able to provide a screenshot of (or link to) the error in your Bugsnag dashboard, @timiyay?
Bare in mind also that the endpoint is different for bugsnag-js, so could the IP be getting overridden there?
I got out of bed to give it a try 馃槢
I am able to replicate this using the bugsnag-js 3.0.0.


https://app.bugsnag.com/managenet/bugsnag-number-171/errors/57a8452605b6c8c6cf4df6b3
Oh, this is because the user is not metadata. You need to set the user rather than putting it in metadata. The metadata is a different field on the payload.
Ah, that's right. Good spotting.
orly? that's no entirely clear from the docs, but oh well.
Strangely, even though I'm putting user inside the metadata, the other params are making it into the User tab in my bugsnag dashboard

Confused...
The user object is kind of treated a bit special.
https://docs.bugsnag.com/api/error-reporting/#per-session-settings
Metadata fields are not searchable from within bugsnag, but user data is.

OK thanks for the help, I've opened a ticket in the library I'm using (https://github.com/binhums/ember-cli-bugsnag/issues/48#issuecomment-238170125) to add support for a top-level user object.
I get this with both v2 and v3 of BugsnagJS BTW.
Great, no problem. Thank you @GrahamCampbell for spotting that 馃槢
Please feel free to close this issue 馃槂
I get this with both v2 and v3 of BugsnagJS BTW.
Yes there was no change made to user data in v3.
What is the difference between userId and UDID and how the user id is generated in bugsnag?
Details please
Hi @nihp, information on the automatically captured data for bugsnag-js is available here. For JS, the User ID is set to the user's IP address by default.
Then the UDID? and dsymUDID
@nihp what platform are you using? React Native? If so, then the automatically captured data for Android and for iOS is probably what you are looking for.
In Android, the User ID and Device ID are set to a randomly generated UUID which Bugsnag uses to identify the individual application on a device.
In iOS, the Device ID is a hash of device and app specific data.
The dSYM UUIDs are not generated by Bugsnag. These will be generated by Apple and are used to uniquely identify the dSYMs needed for your application version.
If you have further questions on this, please write in to [email protected].
@abigail-bugsnag
Just asked to confirm my doubts. Thanks for your clarification