react-native-pdf
react-native-pdf copied to clipboard
Negative progress on downloading PDF
What react-native
version are you using?
0.64.2
What react-native-pdf
version are you using?
6.4.0
What platform does your issue occur on? (android/ios/both) mostly iOS, Android has some other weirdness
Describe your issue as precisely as possible :
on iOS: I download PDF from a URL, for some reason the progress starts at 0
and then jumps to a large negative number (I got -29491
or -6590
) and then finishes.
on Android: Progress only puts -0
value twice and then stops.
the component looks like:
<Pdf
source={{uri: url, cache: false, headers: headers || {}}}
fitPolicy={0}
maxScale={100}
onError={(error) => {
// handle Error
}}
onLoadProgress={(progress) => console.log(progress)}
renderActivityIndicator={() => <ActivityIndicator />}
/>
I'd prefer activity indicator to be a progress bar or percentage number, so I'd like to figure out where is the problem.
for percentage, it has been fixed, just not deployed yet. edit it on the library's index.js here some reference #612 & #613
for percentage, it has been fixed, just not deployed yet. edit it on the library's index.js here some reference #612 & #613
Maybe not exactly related but even with that commit added, progress is always 0
for me.
I am getting the same issue. Is it fixed yet?
just open my project again, and it happens again, And I checked there's problem with the Blob usage with the progress return its total always -1. I tried using the same Blob method as this library, but the result not -1, but the exact value that we need as total.
using react-native-blob-util : 0.13.18
maybe there's config that make it return -1? @wonday
Same issue on latest 6.5.0 version, I have a loading progress like -3674900,00%
how to fix it?