Skip to content
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

[Flutter] MissingPluginException #711

Closed
Heragoga opened this issue Apr 7, 2023 · 7 comments
Closed

[Flutter] MissingPluginException #711

Heragoga opened this issue Apr 7, 2023 · 7 comments

Comments

@Heragoga
Copy link

Heragoga commented Apr 7, 2023

Description
I have installed ffmpeg-kit full in my flutter app, but when I try to use any command with FFmpegKit.execute() I get a MissingPluginException.

Expected behavior
I want to use it to convert an mp3 file into a wav file, but the crash does not depend on the command.

Current behavior
Every time I use FFmpegKit.execute, no matter what command I insert it crashes. I know that such issues happen when you hot reload after installing the package, but I am sure I have ruled that out as it even crashes when I build an apk and install it on android. The method is more or less skipped.

To Reproduce
I have:

  • installed ffmpeg_kit_flutter_full: ^5.1.0 in my pubspec.yaml (tried different packages and versions, all the same results)

  • executed: `import 'package:ffmpeg_kit_flutter_full/ffmpeg_kit.dart';
    import 'package:ffmpeg_kit_flutter_full/return_code.dart';
    String message = "Fail";
    if (extension == "mp3") {
    FFmpegKit.execute('ffmpeg -i $path $savePath').then((session) async {
    final returnCode = await session.getReturnCode();

      if (ReturnCode.isSuccess(returnCode)) {
        print("Converted $path to $savePath");
        message = "Succes";
      } else if (ReturnCode.isCancel(returnCode)) {
        print("Canceled $path to $savePath");
        message = "Cancel";
      } else {
        message = "Error";
      }
    });` (although whats inside execute() doesn't matter, the string message always remains "fail")
    
  • both tried to launch it through flutter run and by building an apk with flutter build apk --release

  • and got the log in my console

Logs
`[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method getLogLevel on channel flutter.arthenica.com/ffmpeg_kit)
#0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:313:7)

#1 FFmpegKitInitializer._initialize (package:ffmpeg_kit_flutter_full/src/ffmpeg_kit_flutter_initializer.dart:313:22)

#2 FFmpegKitInitializer.initialize (package:ffmpeg_kit_flutter_full/src/ffmpeg_kit_flutter_initializer.dart:54:7)

#3 FFmpegKitConfig.init (package:ffmpeg_kit_flutter_full/ffmpeg_kit_config.dart:50:5)

#4 AbstractSession.createFFmpegSession (package:ffmpeg_kit_flutter_full/abstract_session.dart:69:7)

#5 FFmpegSession.create (package:ffmpeg_kit_flutter_full/ffmpeg_session.dart:40:21)

#6 FFmpegKit.executeWithArguments (package:ffmpeg_kit_flutter_full/ffmpeg_kit.dart:44:9)

══╡ EXCEPTION CAUGHT BY SERVICES LIBRARY ╞══════════════════════════════════════════════════════════
The following MissingPluginException was thrown while activating platform stream on channel
flutter.arthenica.com/ffmpeg_kit_event:
MissingPluginException(No implementation found for method listen on channel
flutter.arthenica.com/ffmpeg_kit_event)

When the exception was thrown, this was the stack:
#0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:313:7)

#1 EventChannel.receiveBroadcastStream. (package:flutter/src/services/platform_channel.dart:662:9)

════════════════════════════════════════════════════════════════════════════════════════════════════`

Environment

  • Platform: Flutter
  • Version: v5.1
  • Source branch: main

Thank you in advance

@saurabhkumar8112
Copy link

I could replicate this too.
Flutter 3.7.1.
I was trying to convert a video to images and same error popped in

@saurabhkumar8112
Copy link

I could replicate this in versions 5.1.0 and 4.5.1

@saurabhkumar8112
Copy link

update: same issue is there on 4.5.0

@Heragoga
Copy link
Author

I managed to fix it by cloning their testing application and replacing their main.dart with mine

@Dilawarkkhan
Copy link

It seems that the FFmpegKit package you're using is not working properly on your platform. The error message "No implementation found for method getLogLevel on channel flutter.arthenica.com/ffmpeg_kit" indicates that the native implementation of the plugin is not available.

One solution is to try using a different package for FFmpeg integration, such as the flutter_ffmpeg package. You can check the official documentation and the examples in the repository to see how to use it to convert audio files.

If you still want to use the FFmpegKit package, you can try reaching out to the package maintainers for support. They might be able to help you resolve the issue or provide more information about why the package is not working on your platform.

@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions
Copy link

This issue was closed because it has been stalled for 7 days with no activity.

@deckerst deckerst mentioned this issue Aug 5, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants