SimonSimCity / Xamarin-CrossDownloadManager

A cross platform download manager for Xamarin
MIT License
149 stars 68 forks source link

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

Open kanderson-wellbeats opened 4 years ago

kanderson-wellbeats commented 4 years ago

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:

Device:

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.

SimonSimCity commented 4 years ago

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.

kanderson-wellbeats commented 4 years ago

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.