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
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:
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 17
@marcelormourao no Its also fail on Android 13 devices as well. initially I’m facing
Cannot read property 'rnfbEncode' of undefinedto fix this I wrap the path withReactNativeBlobUtil.wrap(path)but when downloading start its save on download folder but also its showing meDownload manager download failed.