Baseflow / Baseflow/flutter-permission-handler
[Regression]: Missing Plugin Exception
- Dominant language
- Dart
- Stars
- 2.2k
- Forks
- 970
- Avg merge
- 14h 22m
- Merged PRs (30d)
- 2
Description
### Is there an existing issue for this?
- [x] I have searched the [existing issues](https://github.com/baseflow/flutter-permission-handler/issues).
### Please select affected platform(s)
- [x] Android
- [ ] iOS
- [ ] Windows
### Old behavior
When we are checking for Permission status it was working previously and we have pushed many applications using the same . we start facing the issue after updating the permission_handler: ^12.0.1 latest
### Current behavior
I/flutter ( 4361): [IMPORTANT:flutter/shell/platform/android/android_context_vk_impeller.cc(62)] Using the Impeller rendering backend (Vulkan).
I/flutter ( 4361): MissingPluginException(No implementation found for method checkPermissionStatus on channel flutter.baseflow.com/permissions/methods) ::-R #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:365)
I/flutter ( 4361):
I/flutter ( 4361): #1 MethodChannelPermissionHandler.checkPermissionStatus (package:permission_handler_platform_interface/src/method_channel/method_channel_permission_handler.dart:17)
I/flutter ( 4361):
I/flutter ( 4361): #2 checkVideoPermission (package:test_project/video_upload/video_upload_demo_page.dart:41)
I/flutter ( 4361):
I/flutter ( 4361): #3 VideoUploadManager.pickVideo (package:test_project/video_upload/video_upload_demo_page.dart:295)
I/flutter ( 4361):
### Steps to reproduce
Permission permission;
permission = Permission.videos;
/// STEP 1 -> CHECK CURRENT STATUS
PermissionStatus status = await permission.status;
then we are able to see the log i have shared below:
I/flutter ( 4361): [IMPORTANT:flutter/shell/platform/android/android_context_vk_impeller.cc(62)] Using the Impeller rendering backend (Vulkan).
I/flutter ( 4361): MissingPluginException(No implementation found for method checkPermissionStatus on channel flutter.baseflow.com/permissions/methods) ::-R #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:365)
I/flutter ( 4361):
I/flutter ( 4361): #1 MethodChannelPermissionHandler.checkPermissionStatus (package:permission_handler_platform_interface/src/method_channel/method_channel_permission_handler.dart:17)
I/flutter ( 4361):
I/flutter ( 4361): #2 checkVideoPermission (package:test_project/video_upload/video_upload_demo_page.dart:41)
I/flutter ( 4361):
I/flutter ( 4361): #3 VideoUploadManager.pickVideo (package:test_project/video_upload/video_upload_demo_page.dart:295)
I/flutter ( 4361):
### Code sample
Code sample
```dart
Future checkVideoPermission(
BuildContext context,
ImageSource source,
) async {
Permission permission;
Future getVideoPermission() async {
if (Platform.isAndroid) {
return Permission.videos;
}
return Permission.photos;
}
if (source == ImageSource.camera) {
permission = Permission.camera;
} else {
permission = await getVideoPermission();
}
/// STEP 1 -> CHECK CURRENT STATUS
PermissionStatus status = await permission.status;
/// Already Granted
if (status.isGranted) {
return true;
}
/// Permanently Denied
if (status.isPermanentlyDenied) {
await showPermissionDialog(
context,
title: 'Permission Required',
message:
'Please allow permission from settings to continue.',
openSettings: true,
);
return false;
}
/// STEP 2 -> FIRST REQUEST
status = await permission.request();
if (status.isGranted) {
return true;
}
/// STEP 3 -> SECOND REQUEST
status = await permission.request();
if (status.isGranted) {
return true;
}
/// Permanently Denied After Request
if (status.isPermanentlyDenied) {
return false;
}
return false;
```
### Screenshots or video
Screenshots or video demonstration
[Upload media here]
### Current version
12.0.1
### Last version without regression
11.3.1
Contributor guide
Assessment
This issue has not been assessed yet.