-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Device ID Appending Issue - Device ID sometimes appended with an 'R #148
Comments
Hi @initishbhatt thanks for using Amplitude. I reviewed the code and I am not sure the exact reason behind this logic and the original developer is currently out of town. I would like to check with him before making a change. In the meantime, can you please provide more details on the issues caused by the extra "R"? Is it causing an error? Thanks again |
Hi @justin-fiedler thanks for looking into it. There is no error on the app but we have data discrepancies as other tools and sdks that we use have the correct device ID while amplitude has randomly generated one. |
Hi @initishbhatt , thanks for reporting this! I have synced with @qingzhuozhen offline on the behavior, the Thanks! |
Hi @liuyang1520 Nitish colleague here.
|
Hi @ronnieotieno , thanks for sharing this! Could you provide more information in the
For "affects approximately 30% of the devices", could you share more about the affected event types, like is it the If the above info is not helpful for us to identify the issue, maybe can try to implement a |
Hi @liuyang1520 thank you.
When the session starts we get the generated device id which is different from what we set in the function but after one or two tracking events our id is set. From our understanding we need to set the device id after initialisation, thats when we get the amplitude instance. And the code shared above should run before we use Amplitude. Is there a chance that the session could start before the initialisation and setting the device id? |
Hi @ronnieotieno, it seems a race condition between the device id initialization in SDK versus set from outside directly. We will investigate further on the solutions to help solve it. |
The SDK configuration now takes in a device id as input and when that parameter is passed, it would default to using that. Closing this issue since this is now resolved. |
The Amplitude Kotlin SDK occasionally generates a random device ID with
R
, which affects approximately 30% of the devices. The expected behaviour is for the device ID to be registered as 'xxxx-xxxx-xxxx-xxxx,' but it is sometimes recorded as 'xxxx-xxxx-xxxx-xxxxR.'Expected Behavior
The device ID should consistently follow the format 'xxxx-xxxx-xxxx-xxxx' without any additional characters like 'R' appended at the end.
Current Behavior
In some cases, the device ID recorded by the Amplitude Kotlin SDK contains an extra 'R' character, causing discrepancies in the data.
Possible Solution
Steps to Reproduce
Steps to reproduce the behavior:
Environment
The text was updated successfully, but these errors were encountered: