Skip to content

[Bug]: Unhandled Exception: MissingPluginException #1092

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 of 5 tasks
DogTwoChen opened this issue Jul 10, 2023 · 2 comments
Closed
3 of 5 tasks

[Bug]: Unhandled Exception: MissingPluginException #1092

DogTwoChen opened this issue Jul 10, 2023 · 2 comments
Labels
P2 Important issues not at the top of the work list. platform: ios Issue is related to the iOS platform status: closed (missing info) Indicates the issue was automatically closed due to a lack of information. status: needs more info We need more information before we can continue work on this issue. type: bug Something isn't working

Comments

@DogTwoChen
Copy link

DogTwoChen commented Jul 10, 2023

Please check the following before submitting a new issue.

Please select affected platform(s)

  • Android
  • iOS
  • Windows

Steps to reproduce

  1. just call await Permission.notification.isGranted
  2. console
Unhandled Exception: MissingPluginException(No implementation found for method checkPermissionStatus on channel flutter.baseflow.com/permissions/methods)
#0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:313:7)
<asynchronous suspension>
#1      MethodChannelPermissionHandler.checkPermissionStatus (package:permission_handler_platform_interface/src/method_channel/method_channel_permission_handler.dart:16:20)
<asynchronous suspension>
#2      FuturePermissionStatusGetters.isGranted (package:permission_handler_platform_interface/src/permission_status.dart:106:40)
<asynchronous suspension>
#3      StoreViewModel.switchNotificationSound (package:pos_flutter/pages/store/store_view_model.dart:244:9)
<asynchronous suspension>
[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method checkPermissionStatus on channel flutter.baseflow.com/permissions/methods)
#0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:313:7)
<asynchronous suspension>
#1      MethodChannelPermissionHandler.checkPermissionStatus (package:permission_handler_platform_interface/src/method_channel/method_channel_permission_handler.dart:16:20)
<asynchronous suspension>
#2      FuturePermissionStatusGetters.isGranted (package:permission_handler_platform_interface/src/permission_status.dart:106:40)
<asynchronous suspension>
#3      StoreViewModel.switchNotificationSound (package:pos_flutter/pages/store/store_view_model.dart:244:9)
<asynchronous suspension>

Expected results

get notification system permissions result

Actual results

If I want to get notification system permissions to open, then call the Permission. Notification. IsGranted and operation after get the following error

Code sample

Code sample
Future switchNotificationSound(bool switchStatus) async {
    if (await Permission.notification.isGranted) {

    } else {

    }
  }

Screenshots or video

Screenshots or video demonstration

截屏2023-07-10 11 30 42

Version

1.17.0

Flutter Doctor output

[✓] Flutter (Channel stable, 3.7.0, on macOS 12.6 21G115 darwin-arm64 (Rosetta),
locale zh-Hans-CN)
• Flutter version 3.7.0 on channel stable at
/Users/xx/fvm/versions/3.7.0
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision b06b8b2710 (6 months ago), 2023-01-23 16:55:55 -0800
• Engine revision b24591ed32
• Dart version 2.19.0
• DevTools version 2.20.1

Checking Android licenses is taking an unexpectedly long time...[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
• Android SDK at /Users/xx/Library/Android/sdk
• Platform android-33, build-tools 33.0.1
• ANDROID_HOME = /Users/xx/Library/Android/sdk
• Java binary at: /Library/Internet
Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java
• Java version Java(TM) SE Runtime Environment (build 1.8.0_371-b11)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14C18
• CocoaPods version 1.12.0

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (version 2022.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
✗ Unable to find bundled Java version.
• Try updating or re-installing Android Studio

@JeroenWeener
Copy link
Contributor

JeroenWeener commented Jul 12, 2023

Hi @DogTwoChen, thank you for taking the time to report your issue and providing the necessary information!

I have tried to reproduce your issue on the latest version of the plugin, but I did not encounter the issue you mention. I tweaked the example app that comes with the plugin by adding

...
  Widget build(BuildContext context) {
    Permission.notification.isGranted.then((value) {
      print(value);
    });
    return Center(
...

to _PermissionHandlerWidgetState. In my case, I get false or true, with no sign of exceptions.

Which version of the plugin are you using? Did you update the Info.plist and Podfile files? Could you provide a minimal reproducible code sample? You can quickly create one by running flutter create and tweaking main.dart, Info.plist and Podfile, or by using the example application that comes with the plugin as a template. You can provide the contents of the files here directly as a comment, or indirectly in a comment by putting it in a GitHub gist.

@JeroenWeener JeroenWeener added platform: ios Issue is related to the iOS platform status: needs more info We need more information before we can continue work on this issue. type: bug Something isn't working P2 Important issues not at the top of the work list. labels Jul 12, 2023
@github-actions github-actions bot removed the status: needs more info We need more information before we can continue work on this issue. label Jul 17, 2023
@JeroenWeener JeroenWeener added the status: needs more info We need more information before we can continue work on this issue. label Jul 18, 2023
@github-actions
Copy link

github-actions bot commented Aug 1, 2023

Without additional information, we are unfortunately not able to resolve this issue. Therefore, we reluctantly closed this issue for now. If you run into this issue later, feel free to file a new issue with a reference to this issue. Add a description of detailed steps to reproduce, expected and current behaviour, logs and the output of 'flutter doctor -v'. Thanks for your contribution.

@github-actions github-actions bot added the status: closed (missing info) Indicates the issue was automatically closed due to a lack of information. label Aug 1, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Important issues not at the top of the work list. platform: ios Issue is related to the iOS platform status: closed (missing info) Indicates the issue was automatically closed due to a lack of information. status: needs more info We need more information before we can continue work on this issue. type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants