react-native-blob-util icon indicating copy to clipboard operation
react-native-blob-util copied to clipboard

status from res.info() or respInfo is undefined in Android

Open KarlosQ opened this issue 3 years ago • 3 comments

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.

KarlosQ avatar Oct 25 '22 14:10 KarlosQ

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

rmyr avatar Apr 26 '23 11:04 rmyr

I've got the same issue. respInfo just returns this: "respInfo": { "rnfbEncode": "utf8" },

If i rebuild the app it works sometimes.

jindrichjehlicka avatar May 15 '23 08:05 jindrichjehlicka

Hi All please refer to this issue for a solution

ManarHussein avatar Jun 04 '23 20:06 ManarHussein