react-native-blob-util
react-native-blob-util copied to clipboard
Progress event not firing on iOS, just returning 0 until download completion on 0.19.1.
When using the package on 0.19.1, the progress event works as expected on Android, however when using it on iOS, the 'received' value remains at 0 until the download completes, after reading other issues on here, I downgraded the package to 0.17.1 and the progress event now works as expected.
Due to it being a private codebase for the company I work for, I've had to strip certain details out of the code snippet, hopefully its still helpful!
await RNFetchBlob.config(downloadConfig) .fetch('GET', url, {'Content-Type': 'octet-stream'}) .progress((received, total) => { console.log(received); console.log(total); setPercentage(Math.floor((received / location.state?.size) * 100)); });
- Above works fine on Android running version 0.19.1 of the package.
- Same code does not work on iOS running version 0.19.1 of the package, always returns 0 as received value.
- Same code works fine on iOS running version 0.17.1.
Do you have New Architecture enabled?
I'm still facing this issue in version 0.19.1 and in the latest version 0.19.4. I'm not in the new architecture, my current react-native version is 0.72.6.
The received value is 0 and total is -1. Was it solved for you @charlespalmerbf?
is this fixed ? I am only getting progress one time after the file is downloaded completely and that too 0
I'm facing the same issue The received value is 0 and total is -1 on the latest version 0.19.8
@RonRadtke Could you please take a look at this issue? This problem is actual for both platforms