Comments (11)
Hello, were you able to fix this error ?
Thanks a lot !
from react-native-thumbnail.
+1
from react-native-thumbnail.
+1
from react-native-thumbnail.
same problem
from react-native-thumbnail.
Sorry for late response, has a little bit busy, I will fix this error within next week and will release new version soon
from react-native-thumbnail.
I have the same error when using with ImagePicker (https://github.com/react-community/react-native-image-picker) when trying to get preview for image from camera.
This component returns uri
that starts with "file:///storage/other_path" when i am trying to choose an image from library.
As i see "file://" is removed from path
by this line:
https://github.com/phuochau/react-native-thumbnail/blob/master/android/src/main/java/com/reactlibrary/RNThumbnailModule.java#L42
But when you trying to take video from camera uri
begins with "content://other-path". So it was a cause of problem in my case. I just pass a path
instead of uri
from ImagePicker response.
So according to issue (https://stackoverflow.com/questions/17629995/android-mediametadataretriever-setdatasource-failed/32747923#32747923)
I think maybe problem in incorrect path. Just try to check that path that you pass to RNThumbnail.get looks something like:
"file:///long_long_path/filename.extension" or "/long_long_path/filename.extension".
I am not specialist in android but hope this helps.
from react-native-thumbnail.
Hi, I too facing the same issue when I provide the data source video as external URL (video from server). When I provide the local storage it works and get video thumb like file:///storage/emulated/0/thumb/thumb-a3dd2a81-83b5-4dc8-aaa7-dd77a6a9f704.jpeg
from react-native-thumbnail.
Hello, I'm getting the same error. Is there a solution for this?
from react-native-thumbnail.
Check permissions of the app for storage access. Either ask programmatically or navigate to settings and enable.
from react-native-thumbnail.
Grant storage permission on android and it would go away
from react-native-thumbnail.
This issue comes up when the file is incomplete, corrupted, there is no write permission or something like that. actually the MediaMetadataRetriever.setDataSource(...)
throws the exception, which is not being handled currently. So the app crashes. the simplest work around I've found is to put the setDataSource(...)
call inside try-catch. @phuochau I've raised the PR; please have a look - #53
from react-native-thumbnail.
Related Issues (20)
- Feature Request: Support setting the timestamp for the created thumbnail
- Height and width of 0 thumbnail result HOT 1
- More than one library with package name 'com.reactlibrary' [Android] HOT 2
- How should the filepath be? HOT 4
- Request: Add provision to select thumb from given time
- Error building for android: more than one library with package name 'com.reactlibrary' HOT 1
- Gradle DSL method not found: 'google()' HOT 1
- Thumbnails are blurry HOT 2
- Android requires storage permission
- Cannot resolve symbol 'reactlibrary' HOT 6
- any way to assign the return file path to variable? HOT 1
- So it doesn't support IOS? HOT 5
- Android publishing application failed HOT 5
- Cache Handling HOT 1
- is there any option to decrease image size?
- Unhandled Promise Reject: No such file or directory HOT 5
- How to get the first tick of frame?
- not work in Android
- 是否能获取网络视频的封面,现在会报错 HOT 9
- Does not work with latest react-native 0.60.x HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-thumbnail.