Baseflow / flutter-permission-plugins

This repo contains a collection of permission related Flutter plugins which can be used to request permissions to access device resources in a cross-platform way.
https://baseflow.com
MIT License
52 stars 33 forks source link

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

Open elouiestudent opened 4 years ago

elouiestudent commented 4 years ago

🐛 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

Configuration

Version: 3.0.0+1

Platform:

danielroek commented 4 years ago

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 commented 4 years ago

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

elouiestudent commented 4 years ago

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 commented 4 years ago

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