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
First deny returns exception as expected PlatformException(PERMISSION_DENIED, Access to location data denied, null)
Second time denying, the app crashes
D/AndroidRuntime( 3792): Shutting down VM
E/AndroidRuntime( 3792): FATAL EXCEPTION: main
E/AndroidRuntime( 3792): Process: app.infmarketplace, PID: 3792
E/AndroidRuntime( 3792): java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=34, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {app.infmarketplace/app.infmarketplace.MainActivity}: java.lang.IllegalStateException: Reply already submitted
E/AndroidRuntime( 3792): at android.app.ActivityThread.deliverResults(ActivityThread.java:4324)
E/AndroidRuntime( 3792): at android.app.ActivityThread.handleSendResult(ActivityThread.java:4367)
E/AndroidRuntime( 3792): at android.app.ActivityThread.-wrap19(Unknown Source:0)
E/AndroidRuntime( 3792): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1649)
E/AndroidRuntime( 3792): at android.os.Handler.dispatchMessage(Handler.java:105)
E/AndroidRuntime( 3792): at android.os.Looper.loop(Looper.java:164)
E/AndroidRuntime( 3792): at android.app.ActivityThread.main(ActivityThread.java:6541)
E/AndroidRuntime( 3792): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 3792): at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
E/AndroidRuntime( 3792): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
E/AndroidRuntime( 3792): Caused by: java.lang.IllegalStateException: Reply already submitted
E/AndroidRuntime( 3792): at io.flutter.view.FlutterNativeView$1.reply(FlutterNativeView.java:162)
E/AndroidRuntime( 3792): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.error(MethodChannel.java:199)
E/AndroidRuntime( 3792): at com.baseflow.flutter.plugin.geolocator.data.Result.error(Result.java:30)
E/AndroidRuntime( 3792): at com.baseflow.flutter.plugin.geolocator.tasks.LastKnownLocationTask.handleError(LastKnownLocationTask.java:40)
E/AndroidRuntime( 3792): at com.baseflow.flutter.plugin.geolocator.tasks.LocationTask$1.onRequestPermissionsResult(LocationTask.java:118)
E/AndroidRuntime( 3792): at io.flutter.app.FlutterPluginRegistry.onRequestPermissionsResult(FlutterPluginRegistry.java:175)
E/AndroidRuntime( 3792): at io.flutter.app.FlutterActivityDelegate.onRequestPermissionsResult(FlutterActivityDelegate.java:132)
E/AndroidRuntime( 3792): at io.flutter.app.FlutterActivity.onRequestPermissionsResult(FlutterActivity.java:134)
E/AndroidRuntime( 3792): at android.app.Activity.dispatchRequestPermissionsResult(Activity.java:7388)
E/AndroidRuntime( 3792): at android.app.Activity.dispatchActivityResult(Activity.java:7239)
E/AndroidRuntime( 3792): at android.app.ActivityThread.deliverResults(ActivityThread.java:4320)
E/AndroidRuntime( 3792): ... 9 more
Expected behavior
Return the exception again
Reproduction steps
Request last known location as follows
try {
Position position = await Geolocator().getLastKnownPosition(LocationAccuracy.medium);
print(position); // May be null
} catch (ex) {
print(ex); // Or fail to give permissions
// PlatformException(PERMISSION_DENIED, Access to location data denied, null)
}
Configuration
Version: 1.4.0
Platform:
📱 iOS
🤖 Android
The text was updated successfully, but these errors were encountered:
@kaetemi thanks for reporting this issue. This is indeed a bug which we will look into and solve with our next update (version 1.4.1), which should be released later this week.
🐛 Bug Report
First deny returns exception as expected
PlatformException(PERMISSION_DENIED, Access to location data denied, null)
Second time denying, the app crashes
Expected behavior
Return the exception again
Reproduction steps
Request last known location as follows
Configuration
Version: 1.4.0
Platform:
The text was updated successfully, but these errors were encountered: