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

Progress event not firing on iOS, just returning 0 until download completion on 0.19.1.

Open charlespalmerbf opened this issue 1 year ago • 5 comments

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.

charlespalmerbf avatar Sep 05 '23 14:09 charlespalmerbf

Do you have New Architecture enabled?

heath-clink avatar Sep 27 '23 16:09 heath-clink

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?

eduardo-santos-tribia avatar Nov 22 '23 12:11 eduardo-santos-tribia

is this fixed ? I am only getting progress one time after the file is downloaded completely and that too 0

crackhack8266 avatar Dec 04 '23 07:12 crackhack8266

I'm facing the same issue The received value is 0 and total is -1 on the latest version 0.19.8

AwesomeAndrewMK avatar Mar 20 '24 07:03 AwesomeAndrewMK

@RonRadtke Could you please take a look at this issue? This problem is actual for both platforms

AwesomeAndrewMK avatar Mar 20 '24 11:03 AwesomeAndrewMK