A shutdown request for the browser should cancel or pause all active downloads
Categories
(Remote Protocol :: Agent, enhancement, P2)
Tracking
(firefox150 fixed)
| Tracking | Status | |
|---|---|---|
| firefox150 | --- | fixed |
People
(Reporter: whimboo, Assigned: Sasha)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [webdriver:m19][webdriver:relnote])
Attachments
(2 external files)
I noticed for the shutdown hangs on bug 1630162 that we see a modal dialog on shutdown in case there are any active downloads. As a workaround for now Julian updated the tests to wait for the browsingContext.downloadEnd events (bug 1999473).
For a proper fix we should automatically cancel or pause any active download when a shutdown is requested. Ideally it should happen for both the Marionette and BiDi implementations.
| Reporter | ||
Comment 1•11 months ago
|
||
We may actually also run into this problem when we can simulate the network offline state. In that case the prompt should be shown as well:
https://searchfox.org/firefox-main/source/toolkit/components/downloads/DownloadUIHelper.sys.mjs#133-135
It will also happen for Private Browsing but that shouldn't affect us yet given that it's not possible to open such a window at least at the moment.
| Reporter | ||
Updated•11 months ago
|
| Reporter | ||
Comment 2•10 months ago
|
||
As it looks like the problem still persists with shutdown hangs in wdspec tests even with the workaround put in place.
This is for a recent beta simulation: https://treeherder.mozilla.org/logviewer?job_id=539536109&repo=try&lineNumber=5131-5132
[task 2025-12-11T13:06:57.422+00:00] 13:06:57 INFO - PID 5408 | 1765458417421 Marionette TRACE [3] Prompt opened (type: "confirmEx", text: "If you exit now, 1 download will be canceled. Are you sure you want to exit?")
[task 2025-12-11T13:07:01.042+00:00] 13:07:01 INFO - TEST-UNEXPECTED-TIMEOUT | /webdriver/tests/bidi/browsing_context/download_end/download_end.py | expected OK
| Assignee | ||
Updated•8 months ago
|
| Assignee | ||
Comment 3•8 months ago
|
||
| Assignee | ||
Comment 4•8 months ago
|
||
Updated•8 months ago
|
Updated•8 months ago
|
Comment 5•8 months ago
|
||
(In reply to Henrik Skupin [:whimboo][⌚️UTC+1] from comment #0)
I noticed for the shutdown hangs on bug 1630162 that we see a modal dialog on shutdown in case there are any active downloads. As a workaround for now Julian updated the tests to wait for the
browsingContext.downloadEndevents (bug 1999473).For a proper fix we should automatically cancel or pause any active download when a shutdown is requested. Ideally it should happen for both the Marionette and BiDi implementations.
For multiple downloads, can it just do multiple prompting? In other words, ask you if you would like to stop downloading or continue downloading for each one. This is the best and only way to truly give users the control over each specific download which is happening.
Backed out for causing wd failures at delete_session.py
Backout link
Push with failures
Failure log(s)
| Assignee | ||
Comment 9•7 months ago
|
||
I've missed updating the path to a helper in one of the new test files after bug 2022515 has landed.
It should be fixed now.
Comment 10•7 months ago
|
||
Comment 11•7 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/8096a21eb554
https://hg.mozilla.org/mozilla-central/rev/a8c181a689f6
| Assignee | ||
Comment 12•7 months ago
|
||
Since the patches were reverted, the bug is not done yet.
Comment 13•7 months ago
|
||
Updated•7 months ago
|
Comment 14•7 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/89604572ae6a
https://hg.mozilla.org/mozilla-central/rev/09c078227d01
| Reporter | ||
Comment 15•7 months ago
|
||
(In reply to Worcester12345 from comment #5)
For multiple downloads, can it just do multiple prompting? In other words, ask you if you would like to stop downloading or continue downloading for each one. This is the best and only way to truly give users the control over each specific download which is happening.
This would not solve the problem with shutdown. If for a single download the choice is to not cancel it, the shutdown would be aborted because the opened dialog cannot be handled. As such users wouldn't have the possibility to quit the browser at all.
Updated•6 months ago
|
Updated•6 months ago
|
Description
•