joltup / rn-fetch-blob

A project committed to making file access and data transfer easier, efficient for React Native developers.
MIT License
2.8k stars 767 forks source link

Error when using rn 0.72.4 #852

Open amsteromer opened 9 months ago

amsteromer commented 9 months ago

Getting an error when building:

"node_modules\rn-fetch-blob\android\src\main\java\com\RNFetchBlob\RNFetchBlobReq.java:741: Error: Value must be ? 0 but getColumnIndex can be -1 [Range] int statusCode = c.getInt(c.getColumnIndex(DownloadManager.COLUMN_STATUS));"

my versions: "rn-fetch-blob": "^0.12.0" "react": "18.2.0", "react-native": "0.72.4",

suneelll commented 1 month ago

@amsteromer where you able to fix it?

amsteromer commented 1 month ago

@amsteromer where you able to fix it?

no :(

suneelll commented 1 month ago

@amsteromer where you able to fix it?

no :(

bruv I fixed it by replacing both getColumnIndex with getColumnIndexOrThrow at rn-fetch-blob/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java

then go to root directory, run npx patch-package rn-fetch-blob