flutter-permission-plugins icon indicating copy to clipboard operation
flutter-permission-plugins copied to clipboard

[iOS] Requesting location always permissions does not return status when requesting more than once or selecting while using

Open elouiestudent opened this issue 4 years ago • 4 comments

🐛 Bug Report

Upon either selecting while using after first requesting for always permissions or requesting for always permissions more than once, method hangs and does not return permission status.

Expected behavior

Method would return PermissionStatus.denied when user selects while using and return current PermissionStatus in additional calls to request always permissions.

Reproduction steps

  • Request while using permissions
  • Grant while using permissions
  • Request always permissions
  • Select while using in popup

Configuration

Version: 3.0.0+1

Platform:

  • [x] :iphone: iOS
  • [ ] :robot: Android

elouiestudent avatar Sep 08 '20 19:09 elouiestudent

When reproducing, following error is thrown:

[VERBOSE-2:ui_dart_state.cc(166)] Unhandled Exception: PlatformException(ERROR_ALREADY_REQUESTING_PERMISSION, A request for permissions is already running, please wait for it to finish before doing another request., null) #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:572:7) #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:161:18) #2 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:334:12) #3 LocationPermissions.requestPermissions (package:location_permissions/src/location_permissions.dart:70:45) #4 _PermissionState.requestPermission (package:location_permissions_example/main.dart:141:10) #5 _PermissionState.build. (package:location_permissions_example/main.dart:121:9) #6 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:992:19) #7 _InkResponseState.build. (package:flutter<…>

danielroek avatar Sep 09 '20 12:09 danielroek

When testing on iOS emulator, after reproducing and closing the example app. The application says PermissionStatus.granted on locationAlways.

danielroek avatar Sep 09 '20 13:09 danielroek

When testing on iOS emulator and real device, the application never returns a value when location permissions are kept to while using upon requestion for location always permissions.

elouiestudent avatar Sep 09 '20 20:09 elouiestudent

When permissions are granted for location always the request returns granted as intended.

elouiestudent avatar Sep 11 '20 02:09 elouiestudent