Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutocompletePrediction.fromJson throws NoSuchMethodError: The method 'map' was called on null. #47

Open
stx opened this issue Apr 11, 2022 · 1 comment

Comments

@stx
Copy link

stx commented Apr 11, 2022

Rare error seen on iOS production app when calling place.autocomplete.get(...):

NoSuchMethodError: NoSuchMethodError: The method 'map' was called on null.
Receiver: null
Tried calling: map<MainTextMatchedSubstring>(Closure: (dynamic) => MainTextMatchedSubstring)
  File "object_patch.dart", line 38, in Object.noSuchMethod
  File "object_patch.dart", line 85, in _objectNoSuchMethod
  File "structured_formatting.dart", line 22, in new StructuredFormatting.fromJson
  File "autocomplete_prediction.dart", line 65, in new AutocompletePrediction.fromJson
  File "autocomplete_response.dart", line 18, in new AutocompleteResponse.fromJson.<fn>
  File "iterable.dart", line 413, in MappedListIterable.elementAt
  File "iterable.dart", line 342, in ListIterator.moveNext
  File "growable_array.dart", line 206, in new _GrowableList._ofEfficientLengthIterable
  File "growable_array.dart", line 153, in new _GrowableList.of
  File "array_patch.dart", line 51, in new List.of
  File "set.dart", line 118, in SetMixin.toList
  File "autocomplete_response.dart", line 19, in new AutocompleteResponse.fromJson
  File "autocomplete_response.dart", line 26, in AutocompleteResponse.parseAutocompleteResult
  File "autocomplete.dart", line 110, in Autocomplete.get
@mbevin
Copy link

mbevin commented Jun 11, 2022

I see the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants