The error indicates that you haven't registered your device. Please check the documentation.
It is registered. When the update comes from the andriod app it gets updated on the server correctly, also when I send the same message via wget even though the extra log line with the decoded output does not show up it still updates the Last Update value on the dashboard for that device.
Last update
[Embedded image is not working for some reason so I provided a link]
One more thing I noticed is that if I send a message for an unregistered unique ID I get a 'ERROR 400: Bad Request.' response. So the server is definitely processing the message but dropping it for some reason. Is there any debug flag that can be enabled to report parsing issues?
It's already telling you the exact error.
Sorry, you misunderstood the point I was trying to make. I was responding to your comment The error indicates that you haven't registered your device
. I was not getting the 'ERROR 400: Bad Request.' earlier so the device must be registered. Just to try what happens when I try with a new unregistered ID, I tried it and got the ''ERROR 400: Bad Request.'
So my issue still remains, i.e. with 4.8 a wget works and with 4.15 the exact same message only works part way (I don't see the parsed log message). Sorry to have added the information that was not pertinent.
There seems to be a difference in handling the device id
from above logs notice the 1
prepended to the device id in 4.15:
4.8: INFO: [60cf418f] id: 293104 ...
4.15: WARN: Unknown device - 1293104...
Ah, missed that! But, the device ID is registered (you can see that in the screenshot I linked). The device does show as active when I send the message but none of the attribute values get updated.
I even tried creating a new device and still running into the same issue. If I send a message with an unregistered device I get a 404 http response which I don't get (I get a 200 OK} for the case when it is partly working.
I re-tried again for a registered device ID and I get this:
2022-06-13 17:39:59 INFO: [d464d0b2] connected
2022-06-13 17:39:59 INFO: [d464d0b2: osmand < 127.0.0.1] HEX: 47...redacted...0a0d0a
2022-06-13 17:39:59 INFO: [d464d0b2: osmand > 127.0.0.1] HEX: 485454502f312e3120323030204f4b0d0a636f6e74656e742d6c656e6774683a20300d0a0d0a
2022-06-13 17:39:59 INFO: [d464d0b2] disconnected
This time I tried from inside the docker container running the server (target URL is 127.0.0.1:5055) to rule out any port mapping issues. Again, I'm not getting the decoded output in the log like in the 4.8 version of server. For osmand protocol is there some additional check done for example with any HTTP headers that I need to include?
Have you tried disabling geocoding?
I did not enable geocoding.
<entry key='geocoder.enable'>false</entry>
It's enabled by default in 4.15.
if geocoder.enable is the correct key then it is currently set to false and so geocoder should be disabled.
The puzzling thing is that if I connect from the android traccar app for the same device ID it is processing the message correctly (so you can rule out anything to do with geocoding), just not parsing when using wget or connecting from a javascript app. The one thing I noticed is that the android traccar app was sending a POST with 0 bytes of data (parameters are url encoded). I even tried the same POST using curl but the server is refusing to parse the POST message too. I restarted with a fresh H2 database (i.e. deleted the database and let the server re-create one), registered a new account and added a new device for testing and still won't parse.
I think I will go back to 4.8 on the docker container to see if it works just to get another data point.
Just tried with 4.12 and parsing works fine. Maybe there's something about jre-11 that is causing the parse issue.
I'm in the process of moving to 4.15 from 4.8 and running into a problem where the server is ignoring the incoming messages from a custom gps tracker that has been using the OsmAnd protocol. To debug further I used the android traccar client app and caught the message coming from it using
I then used wget to send the same data to both 4.8 and 4.15. the server running 4.8 showed the incoming message as well as the decoded parameters in the log however the 4.15 server only logged the incoming message. This leads me to believe that there's something different about how the data is handled in server 4.15.
Here's how I am testing:
On 4.8 I get this:
On 4.15 server I get this:
This part is missing in the server 4.15 log:
What can be the issue here?