-
Notifications
You must be signed in to change notification settings - Fork 792
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
RNFetchBlob.fs.exists crashes if the file not exist in the gallery (content://) on android #177
Comments
It would be nice if someone can reproduce the bug, to confirm it. Also, if my issue is not clear please tell me. This bug is really annoying as there is no workaround yet, I didn't found any. |
Hi is this resolved ? |
I came across this just now too @jonathangreco -- essentially .exists() crashes the android application, but I'm actually able to still base64 it, I just don't check it's existence first, which feels sad. |
@zibs Thanks I still have this issue now and I just use an ugly workaround like this : // if it's not exist, catch method will know about it :)
await RNFS.stat(item.uri).then((stat) => {
// Yolooooooooooooo
})
.catch(() => {
this.doSomthingfalse);
}); Well like you see here even RNFS can't make a proper exist method (it's not handle the content:// return always false) |
_method = () => {
} |
I'm getting crashes with RNFetchBlob.fs.exists as well, and I'm not sure why. Is using stat() the best workaround? |
@DevAelius What is your comment about? |
Since I used stats I was able to make the trick and never crashed. My App is in production and all light are green ;) What version of react-native do you use ? |
@jonathangreco I'm using RN 0.60.5, though I've finally found my problem (slightly different issue): |
Using |
Hi
I've an issue about the
RNFetchBlob.fs.exists()
method.Context :
I've tested two things :
The code :
Version:
The issue
If the file exist, everything works and console log print :
If the file has been removed the app crashes and shutdown.
This behaviour have been tested on android 7.0, API 24 the device is : SM-T580
The text was updated successfully, but these errors were encountered: