Xamarin-CrossDownloadManager icon indicating copy to clipboard operation
Xamarin-CrossDownloadManager copied to clipboard

UWP IDownloadFile.Url is null when restarting download after restarting app

Open kanderson-wellbeats opened this issue 5 years ago • 2 comments

To help us fix your issue, please provide the information in the below template.

Note: If you want to save time, please create a fork, reproduce the bug in the sample projects and add a link to the repository here.

I'm sorry, I tried to reproduce the bug in the sample project but without doing any changes first I tried running it and it just blew up with a bunch of exceptions that I couldn't resolve.

Steps to reproduce

  1. On UWP, start a download.
  2. Quit the app
  3. Relaunch the app
  4. Note that the download continues automatically
  5. Inspect the IDownloadFile's Url property

Expected behavior

The property should have a value

Actual behavior

The property is null

Configuration

Running on Windows 10.1903

Platform:

  • [ ] iOS
  • [ ] Android
  • [X] UWP
  • [ ] Other

Device:

  • [ ] Simulator
  • [X] Real device (please specify)

One more note, IDownloadFile.Url property is null, but internally it looks like UWP's DownloadFileImplementation.DownloadOperation.RequestedUri property does have a value, so I'm guessing something just broke in the logic connecting those two.

kanderson-wellbeats avatar Jun 16 '20 16:06 kanderson-wellbeats

I didn't have a lot of time to test the UWP solution. If you see bugs, you're free to help finding and fixing them. Since you run on Windows - what's your intention for using this package?

The UWP solution was just developed with Windows Phones in mind and has been mostly abandoned as Windows Phones left the market.

SimonSimCity avatar Aug 16 '20 12:08 SimonSimCity

I'm using it for a cross-platform app that includes desktop Windows. I tried to find the fix myself but as I mentioned in my first comment I had a hard time getting it to build right out of the gate. I might be able to find the time to try it again soon. I like the package.

I was able to find a workaround though - I wanted to use the URL in order to tell one download from another, but in the end I decided to use expected length as a reliable-enough alternative.

kanderson-wellbeats avatar Aug 18 '20 20:08 kanderson-wellbeats