Skip to content

[Regression]: Missing Plugin Exception #1527

@ranjitmakwana

Description

@ranjitmakwana

Is there an existing issue for this?

Please select affected platform(s)

  • 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
Future<bool> checkVideoPermission(
    BuildContext context,
    ImageSource source,
    ) async {
  Permission permission;

  Future<Permission> 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions