-
Notifications
You must be signed in to change notification settings - Fork 590
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
Library not usable inside a Flutter dart isolate #263
Comments
As far as I remember, this is a limitation coming from |
As recommended by one of the comments in the Flutter's issue @tanersener mentioned, I will try to use isolate_handler and come back to you, if it's working. |
After having tuned many things in my code and migrated to I/flutter (20344): Loading ffmpeg-kit-flutter.
I/flutter (20344): [Isolate] ERROR: MissingPluginException(No implementation found for method getLogLevel on channel flutter.arthenica.com/ffmpeg_kit)
I/flutter (20344): #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:156:7)
I/flutter (20344): #1 FFmpegKitInitializer._initialize (package:ffmpeg_kit_flutter_audio/src/ffmpeg_kit_flutter_initializer.dart:258:22)
I/flutter (20344): #2 FFmpegKitInitializer.initialize (package:ffmpeg_kit_flutter_audio/src/ffmpeg_kit_flutter_initializer.dart:50:7)
I/flutter (20344): #3 FFmpegKitConfig.init (package:ffmpeg_kit_flutter_audio/ffmpeg_kit_config.dart:48:5)
I/flutter (20344): #4 AbstractSession.createFFmpegSession (package:ffmpeg_kit_flutter_audio/abstract_session.dart:70:7)
I/flutter (20344): #5 FFmpegSession.create (package:ffmpeg_kit_flutter_audio/ffmpeg_session.dart:40:21)
I/flutter (20344): #6 FFmpegKit.executeWithArgumentsAsync (package:ffmpeg_kit_flutter_audio/ffmpeg_kit.dart:51:21)
I/flutter (20344): <asynchronous suspension>
======== 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:156:7)
#1 EventChannel.receiveBroadcastStream.<anonymous closure> (package:flutter/src/services/platform_channel.dart:545:9)
==================================================================================================== I'm not sure @tanersener can fix it.
Even with that, the |
@tanersener do you have any workaround? |
No, I don't know how to overcome this. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi @tanersener , i get same error when use with flutter_background_service. this plugin work with other plugins if no requires UI, i don't understand why ffmpeg needs UI. Error:
I also tested with old flutter_ffmpeg plugin and it worked. |
@mpcreza I don't know what is the issue with |
@tanersener you're right. |
@mpcreza If your stack trace is identical to the one given in the first post then you have the same problem. You can add the details here. But we don't have a solution or workaround for isolates yet. |
Description
I can't use the flutter library inside an isolate.
Any operation using
FFmpegKit
,FFprobeKit
orFFmpegKitConfig
fails.Expected behavior
ffmpeg_kit_flutter should be usable outside the main thread: inside any isolate.
Current behavior
While trying to
FFmpegKit.executeWithArgumentsAsync([...])
an unhandled exception is thrown:E/flutter (25355): Null check operator used on a null value
To Reproduce
Implement this great tutorial about Isolates in dart
Then try any FFmpeg execution with
FFmpegKit.executeWithArgumentsAsync
inside themyIsolate
function of the tutorial.Screenshots
NA
Logs
Environment
Other
A StackOverflow question has been asked for this same error on another domain. It might help for the resolution.
The text was updated successfully, but these errors were encountered: