justsoft / video_thumbnail

This plugin generates thumbnail from video file or URL. It returns image in memory or writes into a file. It offers rich options to control the image format, resolution and quality. Supports iOS and Android.
MIT License
183 stars 238 forks source link

[MissingPluginException] error occurs with some specific video files #96

Closed XeroDays closed 2 years ago

XeroDays commented 2 years ago

I've been using this plugin for a while and I noticed that it gives error with some specific files, for instances I have uploaded a file to the server so that you can download it and check it. How ever it works fine with other normal files. I haven't tested it will [urlPath] but you can download the demo files from this link : demoFile

Issues with other developers: There is also an Stack overflow question asked by other community member : [Govaadiyo]

Error with demoFile on Flutter 2.10: image

XeroDays commented 2 years ago

Error Update:

I have tested it will UrlPath. It is working fine with that. But the same file gives current error when downloaded to phone and selected via the file picker.

How to re-create the issue:

Steps:

  1. Download the file into your phone : DemoFile
  2. Select file via FilePicker
  3. Get Path of the file and try to compress it.
Tom3652 commented 2 years ago

Having the same issue, doesn't happen with every video fortunately.
A MissingPluginException is a weird error though, usually it's when hot reloading and adding a new plugin...

shrijanRegmi commented 2 years ago

Getting same error MissingPluginException(No implementation found for method file on channel plugins.justsoft.xyz/video_thumbnail)

TaoLeopard commented 2 years ago

We run into the same issue, but it only happen on new Android phones. My old Android 10 phone is OK.

jongkb commented 2 years ago

Running into the same issue for some videos on my Android 10 phone.

justsoft commented 2 years ago

Please try the new 0.5.0 version, Thanks.

wuchuixu commented 2 years ago

Please try the new 0.5.0 version, Thanks.

nice!!!

Tom3652 commented 2 years ago

I have updated to 0.5.0 but got today again this error :

W/System.err(23115): java.io.FileNotFoundException: /storage/emulated/0/Movies/myapptest-video_89b59ef0-8f36-11ec-a771-6705f080d536.png: open failed: EPERM (Operation not permitted)
W/System.err(23115):    at libcore.io.IoBridge.open(IoBridge.java:492)
W/System.err(23115):    at java.io.FileOutputStream.<init>(FileOutputStream.java:236)
W/System.err(23115):    at java.io.FileOutputStream.<init>(FileOutputStream.java:125)
W/System.err(23115):    at xyz.justsoft.video_thumbnail.VideoThumbnailPlugin.buildThumbnailFile(VideoThumbnailPlugin.java:166)
W/System.err(23115):    at xyz.justsoft.video_thumbnail.VideoThumbnailPlugin.access$000(VideoThumbnailPlugin.java:32)
W/System.err(23115):    at xyz.justsoft.video_thumbnail.VideoThumbnailPlugin$1.run(VideoThumbnailPlugin.java:79)
W/System.err(23115):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
W/System.err(23115):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
W/System.err(23115):    at java.lang.Thread.run(Thread.java:923)
W/System.err(23115): Caused by: android.system.ErrnoException: open failed: EPERM (Operation not permitted)
W/System.err(23115):    at libcore.io.Linux.open(Native Method)
W/System.err(23115):    at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
W/System.err(23115):    at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254)
W/System.err(23115):    at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
W/System.err(23115):    at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7637)
W/System.err(23115):    at libcore.io.IoBridge.open(IoBridge.java:478)
W/System.err(23115):    ... 8 more
I/flutter (23115): MissingPluginException(No implementation found for method file on channel plugins.justsoft.xyz/video_thumbnail)
I/flutter (23115): #0      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:175:7)
I/flutter (23115): <asynchronous suspension>
I/flutter (23115): #1      VideoThumbnail.thumbnailFile (package:video_thumbnail/video_thumbnail.dart:48:12)
I/flutter (23115): <asynchronous suspension>
abellee commented 2 years ago

@Tom3652 me too!

justsoft commented 2 years ago

Looks like there is a permission error, please try: 1) Make sure the thumbnailData works 2) Try to write the thumbnail file into the tmp folder 3) Make sure the App has permission to write on the destination folder

abellee commented 2 years ago

@justsoft I have not got this error so far, and after I relaunched the app, this error was disappeared, but I don't know why.

XeroDays commented 2 years ago

@justsoft can you re-open this issue? as most of the people are having the same issue.

ArlysthonFeitosa commented 2 years ago

PROBLEM SOLVED:

my path wasnt with the .png extension and were throwing the MissingPluginException

you have to add the thumbnail extension (png, jpg...) to the path

Shonu386 commented 1 year ago

ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method data on channel plugins.justsoft.xyz/video_thumbnai

getting same error

Shonu386 commented 1 year ago

anybody knows the perfect reason or any solutions

tomekit commented 1 year ago

Still present in 0.5.3. It does the job for us, but we're also getting frequent: No implementation found for method data on channel plugins.justsoft.xyz/video_thumbnail, for certain types of data... and we mute this error, but I believe that library should rather throw some sort of InvalidFormatException instead of failing with: "No implementation found" error which unnecessarily draws the attention.

creativekdev commented 1 year ago

I have got the same error. image

hungvalen commented 9 months ago

I have got the same error. image

same issue

heitor598 commented 6 months ago

Same problem, has anyone managed to solve this problem for thumbnailData? only happens on android 7.1.2

XeroDays commented 6 months ago

@heitor598 Yeah i have resolved it, somehow by putting the file extension at the end.. please check if your file names are missing extensions.. somehow they are also causing this issue.

heitor598 commented 6 months ago

@XeroDays All files have an extension at the end