Closed acheronian closed 4 months ago
@acheronian I tried running it multiple times in a row - I don't seem to get that or any error, never.
The web implementation uses the JS web service provided by google JS api, and just provides LatLng to it - I can't think of any reason it would be different suddenly Ref: https://developers.google.com/maps/documentation/javascript/reference/places-autocomplete-service#AutocompletionRequest.origin
Any chance you're passing null to it from time to time, depending on how you use it?
If not, can you create a reproducible example or steps to be used with the example project?
@matanshukry I've managed to resolve the issue by following the instructions provided in https://github.com/matanshukry/flutter_google_places_sdk/issues/16. It appears there was a specific edge case coupled with google_maps_flutter package that wasn't handled properly in our implementation, which has now been addressed.
Thank you for pointing me in the right direction!
Heyo :)
When attempting to use the
findAutocompletePredictions
method from theflutter_google_places_sdk_web
package, anInvalidValueError
is thrown. The error message indicates that theorigin
property is not a validLatLng
orLatLngLiteral
object because thelat
property is not a number.Curiously, the issue only occurs sporadically. Sometimes, everything works, sometimes not. Maybe it has something to do with multiple packages using the same google maps javascript skd?
Steps to Reproduce
findAutocompletePredictions
with anorigin
parameter that is expected to be a validLatLng
object.lat
property within theorigin
is not a number.Expected Behavior
The
findAutocompletePredictions
method should accept a validLatLng
object without throwing an error.Actual Behavior
An
InvalidValueError
is thrown, indicating that thelat
property of theorigin
parameter is not a number.Environment
Log
API keys were removed postpone.