Attribute Computation Error

Joystick4 years ago

Hi Anton,

I have built the server from the latest source code and have the below error on a Teltonika device. Please assist.

2020-05-25 15:15:17  WARN: Attribute computation error - / - ArithmeticException (... < ComputedAttributesHandler:105 < *:123 < BaseDataHandler:27 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < ExtendedObjectDecoder:60 < ...)
Anton Tananaev4 years ago

Probably means invalid expression or missing inputs.

Joystick4 years ago

Thanks Anton, would any of the numbers in the warning indicate which attribute/s are affected?

Lenin Meza4 years ago

In my case the whole log is:

2020-08-18 11:45:25  INFO: [4bb3d36b] connected
2020-08-18 11:45:25  INFO: [4bb3d36b: osmand < 200.68.129.124] HEX: 504f5354202f3f69643d3831393332362674696d657374616d703d31353937373639313835266c61743d31392e33303436393537266c6f6e3d2d39392e313836323034332673706565643d302e302662656172696e673d302e3026616c7469747564653d323330332e3930303134363438343337352661636375726163793d37382e383433303032333139333335393426626174743d36352e3020485454502f312e310d0a436f6e74656e742d547970653a206170706c69636174696f6e2f782d7777772d666f726d2d75726c656e636f6465640d0a557365722d4167656e743a2044616c76696b2f322e312e3020284c696e75783b20553b20416e64726f696420382e302e303b20534d2d4135323046204275696c642f5231364e57290d0a486f73743a203136342e39302e3135302e3134373a353035350d0a436f6e6e656374696f6e3a204b6565702d416c6976650d0a4163636570742d456e636f64696e673a20677a69700d0a436f6e74656e742d4c656e6774683a20300d0a0d0a
2020-08-18 11:45:25  WARN: Attribute computation error - u@1:3 parsing error near '... Ambiguous sta ...' - Parsing (... < ComputedAttributesHandler:102 < *:113 < BaseDataHandler:27 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < ExtendedObjectDecoder:64 < ...)
2020-08-18 11:45:25  INFO: [4bb3d36b: osmand > 200.68.129.124] HEX: 485454502f312e3120323030204f4b0d0a636f6e74656e742d6c656e6774683a20300d0a0d0a
2020-08-18 11:45:25  WARN: Attribute computation error - org.traccar.handler.ComputedAttributesHandler.computeAttribute@102![0,3]: 'H6j;' undefined variable H6j - Variable (... < ComputedAttributesHandler:102 < *:113 < BaseDataHandler:27 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < *:29 < ... < ExtendedObjectDecoder:64 < ...)
2020-08-18 11:45:25  INFO: [4bb3d36b] id: 819326, time: 2020-08-18 11:46:25, lat: 19.30470, lon: -99.18620, course: 0.0, accuracy: 78.8

The request (HEX) are:

POST /?id=819326×tamp=1597769185&lat=19.3046957&lon=-99.1862043&speed=0.0&bearing=0.0&altitude=2303.900146484375&accuracy=78.84300231933594&batt=65.0 HTTP/1.1
Content-Type: application/x-www-form-urlencoded
User-Agent: Dalvik/2.1.0 (Linux; U; Android 8.0.0; SM-A520F Build/R16NW)
Host: 164.90.150.147:5055
Connection: Keep-Alive
Accept-Encoding: gzip
Content-Length: 0

and the response (HEX) are:

HTTP/1.1 200 OK
content-length: 0

There is a special character(×) in the request parameters instead of the ampersand:

id=819326×tamp=1597769185
&lat=19.3046957
&lon=-99.1862043
&speed=0.0
&bearing=0.0
&altitude=2303.900146484375
&accuracy=78.84300231933594
&batt=65.0

How can i solve this @Anton Tananaev ?

Anton Tananaev4 years ago

Seems like you are talking about 2 completely different issues.

Lenin Meza4 years ago

Thanks for the response Anton.

I will open a new thread for this issue.