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

WITH SOLUTION: MissingPluginException (MissingPluginException(No implementation found for method data on channel video_thumbnail)) #27

Closed
egulhan opened this issue May 10, 2020 · 12 comments

Comments

@egulhan
Copy link

egulhan commented May 10, 2020

MissingPluginException (MissingPluginException(No implementation found for method data on channel video_thumbnail))

Same issue here but not resolved: #26

I'm getting same error. I found the bug and how to fix it. If there is space characters in file names, it gives this error. I tested for the same file. One for the file name with space characters and without space characters and I don't get any error about it for the file name without spaces.

Solution: your file names should not have spaces (or maybe other non-ASCII chars) not to get this error.

I handle this situation using following code:

// the file name pattern we want
RegExp regExp = new RegExp(
	r"/^[a-zA-Z0-9_-]+$/",
	caseSensitive: false,
	multiLine: false,
);

if (!regExp.hasMatch(mediaFile.path)) {
	String tempDir = (await getTemporaryDirectory()).path;
	String fileExtension = mediaFile.path.split('.').last;
	String newPath =
	    tempDir + '/' + DateTime.now().millisecondsSinceEpoch.toString() + '.' + fileExtension;

	File tempFile =
	    await mediaFile.copy(newPath);

    // you can use this new file path for making the thumbnail without error
	mediaPath = tempFile.path;
}
@justsoft
Copy link
Owner

Thanks for your suggestion.
Please take a look my recent updated README regarding the input URL.

To generate the thumbnail from a network resource, the video must be properly URL encoded.

Please try the URL encoded 'video' and leave the output thumbnail path as default to see still an issue.

@YazeedAlKhalaf
Copy link

I have the same problem, Is there any solutions?

@egulhan
Copy link
Author

egulhan commented May 15, 2020

Thanks for your suggestion.
Please take a look my recent updated README regarding the input URL.

To generate the thumbnail from a network resource, the video must be properly URL encoded.

Please try the URL encoded 'video' and leave the output thumbnail path as default to see still an issue.

It's not about remote resource, about local file.

@egulhan
Copy link
Author

egulhan commented May 15, 2020

I have the same problem, Is there any solutions?

I shared code snippet about handling the error. Please check out it at the bottom of question post.

@YazeedAlKhalaf
Copy link

I get but the code does not work, it just keeps the app from crashing, but I get no thumbnails. It says NoSuchMethod....

@redvg
Copy link

redvg commented Jun 4, 2020

same here, posted in #8

@z234009184
Copy link

the same

@msarkrish
Copy link

msarkrish commented Aug 30, 2020

It's not working anyone solved this problem. My app depend on local videos. I need to show thumbnails

@RuchiMakadia
Copy link

I have same issue want to show thumbnail from local video file but getting same error

@justsoft
Copy link
Owner

I have same issue want to show thumbnail from local video file but getting same error

Have you tried:

  • ) The local file can be readable by this App?
  • ) Can generate the thumbnail in memory by calling thumbnailData?
  • ) the destination folder has the permissions for writing a file?

@ghost
Copy link

ghost commented Jan 22, 2021

Hi @justsoft I have similer issue, my file path doesn't have any space and non-ASCII chars, also my path file exists and i have permission to write the file but i still take this error, can you tell me what should i do

@justsoft
Copy link
Owner

justsoft commented Feb 1, 2021

Hi @justsoft I have similer issue, my file path doesn't have any space and non-ASCII chars, also my path file exists and i have permission to write the file but i still take this error, can you tell me what should i do

Did you try the my suggestions?
Can you play the video by any video play installed on the device?

@justsoft justsoft closed this as completed Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants