Lyokone / flutterlocation

A Flutter plugin to easily handle realtime location in iOS and Android. Provides settings for optimizing performance or battery.
MIT License
1.11k stars 824 forks source link

PlatformException(UNEXPECTED_ERROR, 17: API: LocationServices.API is not available on this device. Connection failed with: b{statusCode=SERVICE_INVALID, resolution=null, message=null}, null, null) #944

Open kalyanchandra48 opened 7 months ago

kalyanchandra48 commented 7 months ago

Describe the bug PlatformException(UNEXPECTED_ERROR, 17: API: LocationServices.API is not available on this device. Connection failed with: b{statusCode=SERVICE_INVALID, resolution=null, message=null}, null, null)

Can you please share your comments for this Bug?

Expected behaviour "Please don't expect any exceptions from the platform."Tested on:

Affected Devices: Pixel 6 Pro

Other plugins:

Additional logs

some logs
nadavfima commented 2 months ago

I'm seeing a similar issue on Crashlytics. So far only on Pixel 6 Pro, but i assume more devices will show up soon.

          Fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: PlatformException(UNEXPECTED_ERROR, 17: API: LocationServices.API is not available on this device. Connection failed with: b{statusCode=SERVICE_INVALID, resolution=null, message=null}, null, null)
       at StandardMethodCodec.decodeEnvelope(message_codecs.dart:648)
       at MethodChannel._invokeMethod(platform_channel.dart:334)
       at MethodChannel.invokeMapMethod(platform_channel.dart:534)
       at MethodChannelLocation.getLocation(method_channel_location.dart:83)
       at LocationRepository.getLocation(location_repository.dart:52)
       at Future.timeout.<fn>(dart:async)
       at MainPageCubit.onNoSavedPlaces(main_page_bloc.dart:159)
       at MainPageCubit._loadWeatherData(main_page_bloc.dart:106)
       at CancelableCompleter.complete.<fn>(cancelable_operation.dart:425)
Zvirtuey commented 1 month ago

same problem

zxk-design commented 1 month ago

What is the reason and how to solve it