forked from wkh237/react-native-fetch-blob
-
Notifications
You must be signed in to change notification settings - Fork 791
Open
Labels
questionFurther information is requestedFurther information is requested
Description
Versions:
"react-native-fetch-blob": "0.10.8"
"react-native": "0.49.5"
I was reading a file using this code:
RNFetchBlob.fs
.readFile(filePath, "ascii")
.then(data => {
this.showProgressModal = true;
...
}).catch(e){}
On Android device I got this error and app crashes:
java.lang.NumberFormatException: For input string: "raw:/storage/emulated/0/Download/Bittrexv1.csv"
at java.lang.Long.parseLong(Long.java:590)
at java.lang.Long.valueOf(Long.java:804)
at com.RNFetchBlob.Utils.PathResolver.getRealPathFromURI(PathResolver.java:41)
at com.RNFetchBlob.RNFetchBlobFS.normalizePath(RNFetchBlobFS.java:918)
at com.RNFetchBlob.RNFetchBlobFS.readFile(RNFetchBlobFS.java:141)
at com.RNFetchBlob.RNFetchBlob$6.run(RNFetchBlob.java:208)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
PS. Its working fine on Android emulator and ios simulator. Haven't tested on ios device yet. Please let me know if more information is needed to debug the issue, Thanks!
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested