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

Geocoding Service Error #357

Open
Lzyct opened this issue Mar 1, 2024 · 0 comments
Open

Geocoding Service Error #357

Lzyct opened this issue Mar 1, 2024 · 0 comments

Comments

@Lzyct
Copy link

Lzyct commented Mar 1, 2024

Description
I have an issue when I try to get the location name.

Expected behavior
Return List<HWLocation>

Current behavior
Throw execption

Screenshots
n/a

Logs

I/flutter (11094): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (11094): │ PlatformException(error, null, null, java.lang.NullPointerException
I/flutter (11094): │ 	at java.util.Objects.requireNonNull(Objects.java:203)
I/flutter (11094): │ 	at com.huawei.hms.flutter.location.utils.ValueGetter$-CC.getString(ValueGetter.java:111)
I/flutter (11094): │ 	at com.huawei.hms.flutter.location.utils.GeocoderUtils$-CC.fromMapToLocale(GeocoderUtils.java:34)
I/flutter (11094): │ 	at com.huawei.hms.flutter.location.handlers.GeocoderMethodHandler.initGeocoderService(GeocoderMethodHandler.java:56)
I/flutter (11094): │ 	at com.huawei.hms.flutter.location.handlers.GeocoderMethodHandler.onMethodCall(GeocoderMethodHandler.java:98)
I/flutter (11094): │ 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
I/flutter (11094): │ 	at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
I/flutter (11094): │ 	at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
I/flutter (11094): │ 	at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
I/flutter (11094): │ 	at android.os.Handler.handleCallback(Handler.java:900)
I/flutter (11094): │ 	at android.os.Handler.dispatchMessage(Handler.java:103)
I/flutter (11094): │ 	at android.os.Looper.loop(Looper.java:219)
I/flutter (11094): │ 	at android.app.ActivityThread.main(ActivityThread.java:8676)
I/flutter (11094): │ 	at java.lang.reflect.Method.invoke(Native Method)
I/flutter (11094): │ 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
I/flutter (11094): │ 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)
I/flutter (11094): │ )
I/flutter (11094): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (11094): │ #0   StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651:7)
I/flutter (11094): │ #1   MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334:18)
I/flutter (11094): │ #2   <asynchronous suspension>
I/flutter (11094): │ #3   GeocoderService.initGeocoderService (package:huawei_location/src/geocoder/geocoder_service.dart:41:5)
I/flutter (11094): │ #4   <asynchronous suspension>
I/flutter (11094): │ #5   PrayerTimeLocalDataSourceImpl.getCurrentLocation (package:muslim/features/prayer_time/data/datasources/prayer_time_local_datasource.dart:75:9)
I/flutter (11094): │ #6   <asynchronous suspension>
I/flutter (11094): │ #7   PrayerTimeLocalDataSourceImpl.putLastLocation (package:muslim/features/prayer_time/data/datasources/prayer_time_local_datasource.dart:178:27)
I/flutter (11094): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (11094): │ 17:36:30.666 (+0:00:10.133591)
I/flutter (11094): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (11094): │ ⛔ getCurrentLocation

Environment

  • Platform: Flutter
  • Kit: Location
  • Kit Version: huawei_location: ^6.12.0+301
  • OS Version: emui 12.0.0
  • Your Location/Region: Malaysia

Other

I've followed the instructions from Huawei documentation here:
https://developer.huawei.com/consumer/en/doc/HMS-Plugin-Guides-V1/geocoding-0000001366206334-V1

Currently I've receive the user latitude and longitude, but when I try to get location name I got that error

Thanks

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

1 participant