-
-
Notifications
You must be signed in to change notification settings - Fork 102
Incorrect Device ID in _ Field When Using android client #123
Description
Yes I wrote the following with ChatGPT but I swear that I have triple-checked that it is fully accurate.
Notably, traccar client on android doesn't seem to be using OsmAnd?
When using the official Traccar Android Client, the client’s JSON payload includes a field named "_" that contains a generated querystring-like fragment. This fragment includes an id= value.
In at least one case, the id= inside the "_" field does not match the device ID configured in the app, and instead contains a different numeric value.
Example (anonymized):
{
"location": {
"timestamp": "…",
"coords": { … },
"is_moving": true,
"odometer": 0,
"battery": { … },
"activity": { … },
"extras": {},
"_": "&id=71881261&lat=…&lon=…×tamp=…&"
},
"device_id": "configured-device-id"
}The server interprets the id= from the "_" field and logs:
Unknown device - 71881261
The configured device ID (configured-device-id) is present in the JSON, but the value in "_" is different and appears to be used instead.
Issue:
The "_" field sometimes contains an unexpected or incorrect id value, which leads to the server rejecting the packet due to a mismatched device identifier.