Closed karthiksbhat closed 3 years ago
Could you post a link to an example I can run that reproduces the error? I've got a feeling the error's you're seeing aren't related to the download-progress plugin.
I observed a similar problem. ~It seems to me that sometimes the promise is ending in error, even when the download was successful.~ update: Sometimes the download fails. A file is created, but it doesn't contain usable data. See replication here. The file where the error occurs is here.
console.log(`Download error: ${JSON.stringify(err)}`);
prints
Download error: {"nativeException":{}}
Confirmed concurrency issue. I workaround by only doing one download at a time, which is bad for the UI. here is the whole file, with the fix. Line 50 is relevant to this issue:
zip(...Array.from(this.files.values())).pipe(
mergeMap(() => this.loadMedia(lesson))
)
where this.files.values() returns all active downloads. When they finish, I do the new download.
Thanks, will take a look.
@yringler Can you please check if your issue is resolved in version 1.2.0
Did anyone fix it? I have the same issue with @karthiksbhat, please help me to check this, I just download file success for the first time, after that, I always fail with an empty error or crash app when I try to download another file to the same directory.
If the demo apps cannot help and there is no issue for your problem, tell us about it
A loop of downloads causes almost all to fail. Only the first download enters the "then" condition on success.
Which platform(s) does your issue occur on?
Android v6.0.1 Device: Samsung Galaxy C7
Please, provide the following version numbers that your issue occurs with:
Please, tell us how to recreate the issue in as much detail as possible.
I have an app that will receive a list of filenames and locations on initial login, and will then attempt to download them, in a loop. So it may need to download anything from 0 files to around 100 files. I have the loop as below, and even introduced a timeout when I thought it was failing due to multiple quick requests. When I ran this code: I got multiple errors like:
Is there any code involved?