You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reopening the app after exit with disabled location yields PlatformException.
To reproduce the problem, I would launch the app, click "No thanks", which will in return exits the app with SystemNavigator.pop(). If I open the app again, exception is thrown.
This only seem to happen on real device, I didn't notice them in emulator.
If I close the app with exit(0) (which is not a recommended method), this exception doesn't occur.
Expected behavior
Expected behaviour is to open the location dialog again.
Tested on:
Android, API Level 30, real device (Xiaomi Poco F1)
Android, API Level 23, emulator (AVD)
Log:
D/LocationPlugin(11170): Service connected: ComponentInfo{com.gms.mobileapp/com.lyokone.location.FlutterLocationService}
E/MethodChannel#lyokone/location(11170): Failed to handle method call
E/MethodChannel#lyokone/location(11170): android.content.ActivityNotFoundException
E/MethodChannel#lyokone/location(11170): at com.lyokone.location.FlutterLocation.requestService(FlutterLocation.java:375)
E/MethodChannel#lyokone/location(11170): at com.lyokone.location.MethodCallHandlerImpl.onMethodCall(MethodCallHandlerImpl.java:55)
E/MethodChannel#lyokone/location(11170): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
E/MethodChannel#lyokone/location(11170): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/MethodChannel#lyokone/location(11170): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:818)
E/MethodChannel#lyokone/location(11170): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#lyokone/location(11170): at android.os.MessageQueue.next(MessageQueue.java:335)
E/MethodChannel#lyokone/location(11170): at android.os.Looper.loop(Looper.java:183)
E/MethodChannel#lyokone/location(11170): at android.app.ActivityThread.main(ActivityThread.java:7663)
E/MethodChannel#lyokone/location(11170): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#lyokone/location(11170): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/MethodChannel#lyokone/location(11170): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
E/DartMessenger(11170): Uncaught exception in binary message listener
E/DartMessenger(11170): java.lang.IllegalStateException: Reply already submitted
E/DartMessenger(11170): at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:155)
E/DartMessenger(11170): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:253)
E/DartMessenger(11170): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/DartMessenger(11170): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:818)
E/DartMessenger(11170): at android.os.MessageQueue.nativePollOnce(Native Method)
E/DartMessenger(11170): at android.os.MessageQueue.next(MessageQueue.java:335)
E/DartMessenger(11170): at android.os.Looper.loop(Looper.java:183)
E/DartMessenger(11170): at android.app.ActivityThread.main(ActivityThread.java:7663)
E/DartMessenger(11170): at java.lang.reflect.Method.invoke(Native Method)
E/DartMessenger(11170): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/DartMessenger(11170): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
[log] PlatformException(MISSING_ACTIVITY, You should not requestService activation outside of an activity., null, null)
[log] #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:597:7) #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:158:18)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Reopening the app after exit with disabled location yields PlatformException.
To reproduce the problem, I would launch the app, click "No thanks", which will in return exits the app with SystemNavigator.pop(). If I open the app again, exception is thrown.
This only seem to happen on real device, I didn't notice them in emulator.
If I close the app with exit(0) (which is not a recommended method), this exception doesn't occur.
Expected behavior
Expected behaviour is to open the location dialog again.
Tested on:
Log:
D/LocationPlugin(11170): Service connected: ComponentInfo{com.gms.mobileapp/com.lyokone.location.FlutterLocationService}
E/MethodChannel#lyokone/location(11170): Failed to handle method call
E/MethodChannel#lyokone/location(11170): android.content.ActivityNotFoundException
E/MethodChannel#lyokone/location(11170): at com.lyokone.location.FlutterLocation.requestService(FlutterLocation.java:375)
E/MethodChannel#lyokone/location(11170): at com.lyokone.location.MethodCallHandlerImpl.onMethodCall(MethodCallHandlerImpl.java:55)
E/MethodChannel#lyokone/location(11170): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
E/MethodChannel#lyokone/location(11170): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/MethodChannel#lyokone/location(11170): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:818)
E/MethodChannel#lyokone/location(11170): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#lyokone/location(11170): at android.os.MessageQueue.next(MessageQueue.java:335)
E/MethodChannel#lyokone/location(11170): at android.os.Looper.loop(Looper.java:183)
E/MethodChannel#lyokone/location(11170): at android.app.ActivityThread.main(ActivityThread.java:7663)
E/MethodChannel#lyokone/location(11170): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#lyokone/location(11170): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/MethodChannel#lyokone/location(11170): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
E/DartMessenger(11170): Uncaught exception in binary message listener
E/DartMessenger(11170): java.lang.IllegalStateException: Reply already submitted
E/DartMessenger(11170): at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:155)
E/DartMessenger(11170): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:253)
E/DartMessenger(11170): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/DartMessenger(11170): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:818)
E/DartMessenger(11170): at android.os.MessageQueue.nativePollOnce(Native Method)
E/DartMessenger(11170): at android.os.MessageQueue.next(MessageQueue.java:335)
E/DartMessenger(11170): at android.os.Looper.loop(Looper.java:183)
E/DartMessenger(11170): at android.app.ActivityThread.main(ActivityThread.java:7663)
E/DartMessenger(11170): at java.lang.reflect.Method.invoke(Native Method)
E/DartMessenger(11170): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/DartMessenger(11170): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
[log] PlatformException(MISSING_ACTIVITY, You should not requestService activation outside of an activity., null, null)
[log] #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:597:7)
#1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:158:18)
#2 MethodChannelLocation.requestService (package:location_platform_interface/src/method_channel_location.dart:137:25)
#3 LocationProvider.getLocation (package:flutter_gms/LocationProvider.dart:19:25)
The text was updated successfully, but these errors were encountered: