react-native-file-picker
react-native-file-picker copied to clipboard
com.filepicker.FilePickerModule.getPath FilePickerModule.java, line 223 java.lang.NumberFormatException: For input string: "msf:124969"
I am gettting this error when the filename is long. For example national-cancer-institute-dMZC6hdobnk-unsplash.jpg but if I change the name to img1.jpg, then it is not happening.
Getting the same error on all files. File name length doesn't matter.
any updates
Will it ever be fixed? The only files that work for me are pdf
files. Images, videos, all fail with java.lang.NumberFormatException: For input string: "msf:X"
Hi,is there anyone know how to fix this java.lang.NumberFormatException: For input string: "msf:X" issue.
Hey, I am stuck at this issue, can anyone help, getting error {"error": "java.lang.NumberFormatException: For input string: "msf:6655""}
The problem is on choose a file from "Recent Files". Check replace this on FilePickerModule.java
final Uri contentUri = ContentUris.withAppendedId( Uri.parse(prefix + "downloads/public_downloads"), Long.valueOf(id));
for this
final Uri contentUri = ContentUris.withAppendedId( Uri.parse(prefix + "downloads/public_downloads"), Long.valueOf(split[1]));
The problem is on choose a file from "Recent Files". Check replace this on FilePickerModule.java
final Uri contentUri = ContentUris.withAppendedId( Uri.parse(prefix + "downloads/public_downloads"), Long.valueOf(id));
for this
final Uri contentUri = ContentUris.withAppendedId( Uri.parse(prefix + "downloads/public_downloads"), Long.valueOf(split[1]));
thanks @dominguezcm I have the same error and this fixed the error. but have I change the library code manually after each yarn? or there is some other solution?
You can use patch-package.
This week i will try to upload this fix on new version. (PRs are welcome)
After updating to latest version of 0.0.21, the issues with " java.lang.NumberFormatException:...." is fixed but it seems to throw new error for images and pdf files which were working before
{"error": "java.lang.ArrayIndexOutOfBoundsException: length=1; index=1"}
@sasilta did you find a solution to it?
@ZComwiz not yet.