Show address link visible even after turning geocoder.onRequest to false

Alonso Basauri2 years ago

Hello, since I've updated traccar I have the show address link allways visible even after turning on request to false, here is my config:

<entry key="geocoder.enable">true</entry>
<entry key="geocoder.type">google</entry>
<entry key="geocoder.processInvalidPositions">true</entry>
<entry key="geocoder.reuseDistance">50</entry>
<entry key='geocoder.onRequest'>false</entry>
<entry key='geocoder.ignorePositions'>false</entry>

And here is my traccar log: (Don't know if it's relevant or not)

2022-06-30 17:29:42  WARN: Geocoding failed - Unexpected character ('\' (code 92)): was expecting double-quote to start field name

The weird thing is, when I click the show address link, the address gets generated and shown but only on request, and I need it to be always like before.

Hope you can give me some guidance.

Thanks and have a great day!

Anton Tananaev2 years ago

What version of Traccar? Are you using Google geocoder with correct API key?

Alonso Basauri2 years ago

Yes, it works ok when I click show address, and also on almost all my devices it works ok, I just removed the api key line from my config to paste here. Thanks in advance Anton!

Anton Tananaev2 years ago

You should check specific example and then we'll need to see what response you're getting from Google.

Alonso Basauri2 years ago

On my google console, I see 0% errors on the geocoding petitions and on the traccar log all I get is:

2022-06-30 17:47:42  WARN: Geocoding failed - Unexpected character ('\' (code 92)): was expecting double-quote to start field name

Do you know how can I further investigate this?

The weird thing is that it works on some location, then no, then yes and so on, all this on the same street or freeway :(

Anton Tananaev2 years ago

Find the coordinates where it fails and then try sending an API request to Google with those coordinates.

Alonso Basauri2 years ago

Google responds Ok, the weird thing is on traccar show the "show address" and when I click it is always ok so I'm really lost on where more to search... As I remember I didn't have this issue on the previous version of 5.0.

Could it be anything that changed on the geocoding code?

Also Is there any way to downgrade without problems with the database? Just to test this...

Thanks for your help and the great work on traccar!

Anton Tananaev2 years ago

I don't think we changed anything related to Google geocoder recently.

Alonso Basauri2 years ago

Ok, Anton, thanks for your kind help, I'll start trying with other geolocation providers, maybe then It will work.

Thanks and have a great day!

jay2 years ago

Can there be a conflict on the location Iq key in default.xml and your personal key on traccar.xml

Anton Tananaev2 years ago

Parameters in traccar.xml override the default.xml ones.