react-native-blob-util: Android 14: Error: Download manager download failed, the file does not downloaded to destination.

Package.json

    "react": "18.2.0",
    "react-native": "0.73.2",
    "react-native-blob-util": "0.19.4",

Build params:

        buildToolsVersion = "34.0.0"
        minSdkVersion = 21
        compileSdkVersion = 34
        targetSdkVersion = 34
        ndkVersion = "25.1.8937393"
        kotlinVersion = "1.8.0"

When I try to download the file I get an error (Error: Download manager download failed, the file does not downloaded to destination.), but the file itself is downloading Z5OssD5

const BASE_DIR = Platform.OS === 'ios' ? RNFetchBlob.fs.dirs.CacheDir : RNFetchBlob.fs.dirs.DownloadDir;
const filePath = `${BASE_DIR}/${fileName}`;

const isExist = await RNFetchBlob.fs.exists(BASE_DIR);

if (isExist) {
  return RNFetchBlob.config({
        addAndroidDownloads: {
          useDownloadManager: true,
          notification: true,
          description: `${t('Downloading file')}...`,
          path: filePath,
          title: fileName,
          mediaScannable: true,
        },
        overwrite: true,
        fileCache: true,
        indicator: true,
        path: filePath,
      }).fetch(method, path, headers, body);
}

Logcat details: muUwhBr

About this issue

Most upvoted comments

@marcelormourao no Its also fail on Android 13 devices as well. initially I’m facing Cannot read property 'rnfbEncode' of undefined to fix this I wrap the path with ReactNativeBlobUtil.wrap(path) but when downloading start its save on download folder but also its showing me Download manager download failed.