Giter Site home page Giter Site logo

Comments (3)

781flyingdutchman avatar 781flyingdutchman commented on August 11, 2024

Hi, thanks for reaching out! Quick reaction before I head off to work: I do think the core issue is that you are reusing the ID when starting the download after closing the app, which is not "the contract" for the downloader plugin. The easiest way to address the issue therefore would be to use a new unique ID when restarting a task that was killed when the app closed. That said, i want to look into what exactly causes the issue you describe. Do you know if it behaves the same on another desktop platform (MacOS or Linux)?

from background_downloader.

781flyingdutchman avatar 781flyingdutchman commented on August 11, 2024

Hi, I haven't been able to replicate what you're describing. I use the example app and modify the task to use the same ID (and modify the downloader a bit so it takes long for the download to complete), start the download, kill the app, start it again (with the same id) and it just completes normally.

I also don't quite understand how there can be any remnant of a task still running after you kill the app (though perhaps the isolate where the download happens keeps running after the app closes? That seems weird but possible, and would then continue to generate status updates with the same taskID). Even so, the new download should not interfere with whatever remains ongoing (and per your logs it suggests it does indeed complete normally), even if it reuses the id, as it will use a new temp file to download to (unless the Dart Random implementation is not random and regenerates the same filename). It's possible that if there is a 'ghost isolate' from the previous app run it gets killed by the OS eventually, but that should lead to 'failed' and not 'canceled'. Is there anywhere you are issuing a cancel command, or reset?

The message about not being able to delete the temp file means that by the time it wanted to cancel the task (and delete the partial download stored in the temp file) the temp file was no longer there, or was in use - possibly the OS cleans it up when you kill the app?

Sorry I don't have any better answers. Please try using a different (random) id and see if it works then, or if not please post the full logs for both app runs.

from background_downloader.

781flyingdutchman avatar 781flyingdutchman commented on August 11, 2024

Hi @eivihnd wanted to see if you've been able to solve the problem by using a unique ID? As mentioned, I wasn't able to replicate the issue so unless you can provide more details I will close this issue in a few days.

from background_downloader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.