react-native-blob-util
react-native-blob-util copied to clipboard
status from res.info() or respInfo is undefined in Android
Hi, I have a problem with response status:
- RN: 0.67.4
- blob-util: 0.16.3
- Android SDK 31 (simulator and real device)
const response = await ReactNativeBlobUtil.config({
addAndroidDownloads: {
path: `${ReactNativeBlobUtil.fs.dirs.DownloadDir}/${fileName}.${ext}`,
useDownloadManager: true,
mime: 'application/pdf',
notification: true,
mediaScannable: true,
},
}).fetch('GET', url, headers);
const { status } = response.info();
status is undefined in Android but not in iOS.
Same issue, but for me its undefined in iOS (and there only in release builds, debug seems to work). Occasionally it seems to work, then on rebuild it fails again. Tried on emulator and real devices. No idea what is going on.. There is also no exception thrown when calling fetch. Android works fine.
Makes the library completely unusable for me unfortunately (as the file also doesn't appear to be downloaded).
Side node: I've used rn-fetch-blob before (code is still exactly the same, just swapped out the libraries), where everything worked fine. Only trying to replace it cause of https://github.com/joltup/rn-fetch-blob/issues/490
I've got the same issue. respInfo just returns this: "respInfo": { "rnfbEncode": "utf8" },
If i rebuild the app it works sometimes.
Hi All please refer to this issue for a solution