geocoder-php / Geocoder

The most featured Geocoder library written in PHP.
https://geocoder-php.org
MIT License
3.94k stars 517 forks source link

Google invalid response #1198

Closed paveldvorak5 closed 10 months ago

paveldvorak5 commented 11 months ago

Sometimes I get an error when using Google. It happens only few times a day, so I have no idea what's wrong. But I noticed some strange characters in the URI after language. How can I debug this? Thanks

>>> (Geocoder)InvalidServerResponse <<<
`The geocoder server returned an invalid response (500) for query "https://maps.googleapis.com/maps/api/geocode/json?latlng=37.269400,28.208292&language=cs_CZ®ion=cs&key=...". We could not parse it.`
Error 0 (undefined) at ./vendor/willdurand/geocoder/Exception/InvalidServerResponse.php:30
jbelien commented 11 months ago

Hello @paveldvorak5,

The query seems "strange" ; https://maps.googleapis.com/maps/api/geocode/json?latlng=37.269400,28.208292&language=cs_CZ®ion=cs&key=... contains ® after &language=cs_CZ.

Is that a copy paste issue or is it really the error message returned ?

paveldvorak5 commented 10 months ago

No issue, that's the error message I saw

jbelien commented 10 months ago

Okay, I'll investigate. Can you provide as much information as possible on the request you've tried to make ?

paveldvorak5 commented 10 months ago

Hmm, I couldn't simulate is today