1

For the Flutter app I’m working on, the company had a third party develop native Android and iOS code for an alarm to integrate into our app. I ran their sample app that they made and it ran just fine.

I copied the code over to my project and kept getting this error.

enter image description here

E/flutter (17290): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: MissingPluginException(No implementation found for method alarmStatus on channel samples.flutter.dev/alarmStatus)
E/flutter (17290): #0      MethodChannel._invokeMethod
E/flutter (17290): #1      _MyHomePageState._getAlarmStatus
E/flutter (17290): <asynchronous suspension>
E/flutter (17290):
E/flutter (17290): [ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: MissingPluginException(No implementation found for method alarmStatus on channel samples.flutter.dev/alarmStatus)
E/flutter (17290): #0      MethodChannel._invokeMethod
E/flutter (17290): <asynchronous suspension>
E/flutter (17290): #1      _MyHomePageState._getAlarmStatus
E/flutter (17290): <asynchronous suspension>
E/flutter (17290):

So, I created a new project and copied the code over and it worked great. While doing some troubleshooting, we found out that this issue sometimes appears with dependencies having issues with each other, so I copied all my dependencies from my app to the new project and got the same error. After commenting out dependencies to find which one may be causing the issue, I landed at the audio_service package. We did some more searching through forums and all, but weren’t able to figure out a solution.

Has anyone run into this issue before and been able to figure out what’s going on? Or have any ideas of what I can try?

I got the recommendation of having the other developers redo the native stuff with a different dependency, but I'm hoping to avoid that if possible.

  • I can't read your image. Would you mind just using plain ASCII text, copied and pasted, formatted as a code block using the appropriate markdown code? (Not that I can help with your issue, but still it would still be good to make your question more accessible.) – Ryan Heise Aug 09 '22 at 06:41
  • @RyanHeise I just edited it with the error added in a code block. I'll be honest, I don't know what you mean by the markdown code, but I'm happy to do what you need if you help guide me a bit. I super appreciate your response. – Harrison Pope Aug 09 '22 at 17:30
  • 2
    The error most likely means that the plugin providing the `getAlarmStatus` method has a bug. It is possible for a plugin to make incorrect assumptions about the environment such that it works in a simple foreground app with an ordinary FlutterEngine linked to the activity's lifecycle, but incorrect assumptions could lead it to fail in more complex scenarios, e.g. when there is more than one FlutterEngine, or the FlutterEngine does not follow the lifecycle that this plugin has assumed. I think this is an issue for the developer of the plugin to sort out. – Ryan Heise Aug 10 '22 at 13:55

0 Answers0