Closed Bug 245829 Opened 20 years ago Closed 20 years ago

Download manager progress and title do not update correctly, wrong number of files and percentage after finishing or cancelling a download

Categories

(Toolkit :: Downloads API, defect, P4)

1.7 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla1.8final

People

(Reporter: legege, Assigned: zbraniecki)

References

Details

Attachments

(10 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040531 Firefox/0.8.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040531 Firefox/0.8.0+

Canceling a download doesn't refresh the download manager title.

Reproducible: Always
Steps to Reproduce:
1. Start downloading a couple of big file.
2. Cancel one of the download.

Actual Results:  
The Download Manager title isn't changed.

Expected Results:  
Decrease the counter that counts the downloads.
Confirmed - it only happens for 3 or more files
if you try with two the text will change however with 3 it will not, will remain
as of 3 downloads eventhough two are only running, cancel another one and then
everything behaves like it should
I see this with only two files even on Firefox 0.9. We should fix this for 1.0.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking1.0?
Summary: Bad download manager title → Title does not always update number of files after cancelling a download
*** Bug 248096 has been marked as a duplicate of this bug. ***
Flags: blocking1.0? → blocking1.0+
Priority: -- → P4
*** Bug 248626 has been marked as a duplicate of this bug. ***
Summary: Title does not always update number of files after cancelling a download → Title does not always update number of files after finishing or cancelling a download
Adding screenshot from bug 248626 to this bug.
*** Bug 249557 has been marked as a duplicate of this bug. ***
This problem also occurs when cancelling a download and removing them from the
download manager.
I don't recall seeing this problem in .8
More informations: For me (Win XP (no SP), Firefox 0.9.2), the same problem
occurs when I cancel downlaods (when many downloads too, but i havn't yet confirm).

The problem is about the Download Manager title: the number of downloads active
and the percent of total download done.

I expect that, for the percent of total download done, the Download Manager
takes into account of cancelled downloads as downloads still active but with 0%
done.
In fact, for 1 download really active, with 80% completed, and 4 cancelled, the
Download Manager will title "16% of 5 files - Downloads".


Ps: If there are errors in this post, please excuse me but my native language is
rather the french...
*** Bug 254939 has been marked as a duplicate of this bug. ***
I used Firefox 1.o rc and see that result too. I downloaded 3 files but 2 of
them has been downloaded partly and automatically stopped (due to the server or
connection, i guessed) but Download manager notified "Done" (it was not true,
you see). But the title did not update: "30% of 3 files...". I dont know why it
was 30% because 2 of them (mentioned above) is only 2kb and the rest is 28MB. I
attached the images (download.png) here for your reference. Thanks.
Only 1 file is being downloaded but the title did not display it correctly
p4 priority - not a blocker. if a patch materializes, please nominate for aviary
approval. 
Flags: blocking-aviary1.0+ → blocking-aviary1.0-
*** Bug 260600 has been marked as a duplicate of this bug. ***
*** Bug 261442 has been marked as a duplicate of this bug. ***
*** Bug 257393 has been marked as a duplicate of this bug. ***
*** Bug 265185 has been marked as a duplicate of this bug. ***
Re-tweaking summary in hopes of avoiding some dupes.
Summary: Title does not always update number of files after finishing or cancelling a download → Download manager progress and title do not update correctly, wrong number of files and percentage after finishing or cancelling a download
*** Bug 265956 has been marked as a duplicate of this bug. ***
Occurs in 1.0RC1 release "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
rv:1.7.3) Gecko/20041026".
*** Bug 268207 has been marked as a duplicate of this bug. ***
*** Bug 250238 has been marked as a duplicate of this bug. ***
*** Bug 251678 has been marked as a duplicate of this bug. ***
This problem also occurs when downloads complete in addition to being cancelled.  

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
*** Bug 269349 has been marked as a duplicate of this bug. ***
*** Bug 269520 has been marked as a duplicate of this bug. ***
*** Bug 257863 has been marked as a duplicate of this bug. ***
*** Bug 269706 has been marked as a duplicate of this bug. ***
Confirmed on Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5)
Gecko/20041107 Firefox/1.0. I'm running OS 10.2.8 and have attached a
screenshot. Someone please update the platform field up above. :)

Attached image Mac: Tooltip in Dock
This shows that the tooltip in the Dock in OS 10.2.8 also displays the wrong
number of downloads.
OS: Windows XP → All
Hardware: PC → All
Version: unspecified → 1.0 Branch
*** Bug 271168 has been marked as a duplicate of this bug. ***
taking
Assignee: bugs → gandalf
*** Bug 272057 has been marked as a duplicate of this bug. ***
For what it's worth, I find that when you use "Open With" instead of "Save As",
the Download Manager is not updating the total number of files correctly either.

I am using Firefox v1.0 on Windows XP, and opening .torrents while downloading 2
large mp3 files.
*** Bug 273188 has been marked as a duplicate of this bug. ***
*** Bug 274002 has been marked as a duplicate of this bug. ***
(In reply to comment #38)
> *** Bug 274002 has been marked as a duplicate of this bug. ***

That bug wasn't the same. a) The files weren't particularly big, and b) I didn't
cancel any downloads. The downloads downloaded properly!
(In reply to comment #39)
> That bug wasn't the same. a) The files weren't particularly big, and b) I didn't
> cancel any downloads. The downloads downloaded properly!

Re-read this bug's summary. It happens when you finish downloading files too. In
any case, if there is a problem with reporting the progress of a download, and
the symptoms are the same under very similar conditions, then odds are that it
has the same root cause, hence it's the same bug.
*** Bug 274416 has been marked as a duplicate of this bug. ***
Hi! I am using WinXP and Firefox 1.0 Final. I have the same problem: cancelled a
large 700 MB Download while another one was in process. Additionally, i deleted
2 completed files.

The result was a wrong status information in the window title bar. It seems that
not only the download counter is not reduced, the file sizes of the deleted
files remain too. Just have a look at my screenshot (Firefox 1.0 Final -
Download Bug)... Approximately 25% of the file have been finished, not 7%.
Please, do not post new screenshots of this bug. We know how it works, and I
know why. I'll try to fix this bug asap (this week). I have a patch for bug
239006 and I'm waiting for it to be checked in (the tree is closed).
Much more interesing are steps to reproduce. It's very easy to reproduce it
since usually canceling, pausing and resuming and overdownloading (downloading
same file while it is in progress already) causes it but some comments mentioned
some strange behaviours beside that one. If you think your not doubling any
previous comment - write it down.

Comment 42 - You mixed bug 239006 with this one. Both are quite visible in some
situations.
Status: NEW → ASSIGNED
Target Milestone: --- → Firefox1.1
Flags: blocking-aviary1.1?
*** Bug 278056 has been marked as a duplicate of this bug. ***
*** Bug 279121 has been marked as a duplicate of this bug. ***
*** Bug 256413 has been marked as a duplicate of this bug. ***
I'am using WinXP PRO SP2,
my firewall is Kerio 4
and I found the following:
    when I cancel a download, everything is fine in firefox
    but Kerio shows that the connection is still active,
    until I close firefox
I think it is not a critical bug, but that it can let
somebody "not so well intentionned" do some bad stuff

(ps: excuse me if I made some mistakes but I'm french)
It's a part of this bug. Thanks for info
Ok. I finally figured out this bug. It's because getting Mime type on
complete/failure returns exception.
Fixing this, fixes this bug, but there are two remaining issues:
1) If you cancel and then start downloading again, the file is being downloaded
with unknown size.
2) canceling/failing the download does not remove's its object. It still acts
like an paused(?) one - it's the issue from comment 48.

Also, we could think a bit about a policy for download manager window title.
When I'm downloading 3 files with a known size, it displays me percent of
download properly. When I'm adding fourth file with unknown size, it stops
displayin anything because we can't count overall percent. Is this what we want?
Attached patch first patch (obsolete) — Splinter Review
This patch fixes the behaviour, but there's more to do in this bug.
1) Why getTypeFromFile returns exception?
2) Why it returns this exception (exception: Component returned failure code:
0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsMimeService.getTypeFromFile]" nsresult:
"0x80040111 (NS_ERROR_NOT_AVAILABLE))
Attachment #175242 - Flags: review?(cbiesinger)
Comment on attachment 175242 [details] [diff] [review]
first patch

this needs a review from a toolkit peer, which I am not. but, a comment anyway:
it seems that this contentType is used to show an icon. if we can't get a
content type, we should probably not try to set an icon either. so, you should
probably put lines until listitem.setAttribute("image", ... ) into the try.
Attachment #175242 - Flags: review?(cbiesinger) → review-
Attached patch second patchSplinter Review
you're right.
New patch attached.
Attachment #175242 - Attachment is obsolete: true
Attachment #175313 - Flags: review?(bugs)
This bug has a patch and is waiting for ben to review it.
Attachment #175313 - Flags: review?(bugs) → review?(mconnor)
Attachment #175313 - Flags: review?(mconnor) → review+
checked in.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Anyone to verify that it's fixed?
I test firefox build 20050307 for Windows, with the following steps,
and found that the download manager keeps "0% of 1 file" during the
whole process.  So I guess the bug is not fixed:

1) start download redhat fedora core cd1 (an 650mb iso image)
2) start download redhad fedora core cd2 (also about 650mb)
3) start download firefox 1.0.1 zip file
4) wait until firefox 1.0.1 downloaded
5) cancel and remove fedora core cd1 download
6) cancel and remove fedora core cd2 download

As I observed, the download manager shows "0% of 1 file" in its
title bar at the end of each step above.
Sorry, I just spotted that the fix was checked in on March 12.  So I
just downloaded and tried out the latest (build 20050313 firefox for
Windows) and perform the same test.  Everything is the same, except
that after the last steps the "0% of 1 file" in the download manager
title bar is gone.  So it seems the fix solved a little problem, but
not everything.
I'm not able to reproduce this bug with your steps to reproduce...

But thanks to them I found another minor bug. Title bar is updated only when
percentage changes, while it should be updated also when number of downloaded
files changes.
I'll attach patch soon.

Anyone else can confirm that bug from Comment 57?
I tried firefox trunk 20050317 and here's the result:

1) start download redhat fedora core cd1 (an 650mb iso image)
   - title bar shows 0% of 1 file
2) start download redhad fedora core cd2 (also about 650mb)
   - title bar shows 0% of 1 file, but changed to 1% of 2 files
     (seems file count only changed when percentage count refreshed)
3) start download firefox 1.0.1 zip file
   - x% of 2 files  (file count not right)
4) wait until firefox 1.0.1 downloaded
   - x% of 2 files (not right)
5) cancel and remove fedora core cd1 download
   - x% of 1 file (right)
6) cancel and remove fedora core cd2 download
   - title bar shows "downloads" (right)
(In reply to comment #60)
>    - title bar shows 0% of 1 file, but changed to 1% of 2 files
>      (seems file count only changed when percentage count refreshed)

That's exactly what I wrote in comment 59.

> 3) start download firefox 1.0.1 zip file
>    - x% of 2 files  (file count not right)
> 4) wait until firefox 1.0.1 downloaded
>    - x% of 2 files (not right)

It's the same as previous one.
Attached patch additional patchSplinter Review
Patch to update title bar when number of active downloads changes.
Attachment #177903 - Flags: review?(mconnor)
Attachment #177903 - Flags: review?(mconnor) → review+
Comment on attachment 177903 [details] [diff] [review]
additional patch

checked in
*** Bug 287816 has been marked as a duplicate of this bug. ***
Flags: blocking-aviary1.1?
*** Bug 288881 has been marked as a duplicate of this bug. ***
*** Bug 293294 has been marked as a duplicate of this bug. ***
*** Bug 293294 has been marked as a duplicate of this bug. ***
*** Bug 295100 has been marked as a duplicate of this bug. ***
*** Bug 289291 has been marked as a duplicate of this bug. ***
*** Bug 298374 has been marked as a duplicate of this bug. ***
*** Bug 299358 has been marked as a duplicate of this bug. ***
This bug still exists in Firefox *v1.0.6* and should be reopened. I have the
download manager set to automatically remove finished files, while downloading
one file at a time (the website limits downloading to one at a time per user).
The file will download, be cleared, and the title/status is reset to
"Downloads", but when I start another download the old file count still remains
and the percentage takes into account the size of _all_ the files combined. The
file count/percentage is only reset if I close the download manager and open it
again.
It's fixed in 1.1. 
1.0.6 just contains security updates
For future reference, the Target Milestone field of the bug report is usually a
good indication of the build you need to see the fix. As mentioned (and
indicated), the next release that contains this fix will be Firefox 1.1.
*** Bug 304776 has been marked as a duplicate of this bug. ***
*** Bug 259752 has been marked as a duplicate of this bug. ***
*** Bug 241916 has been marked as a duplicate of this bug. ***
Download Percentage still not fixed in 1.0.7.  Unlike the others...mine sometimes resets to -1%.
(In reply to comment #78)
> Download Percentage still not fixed in 1.0.7.  Unlike the others...mine
> sometimes resets to -1%.

It's fixed in more recent builds, try 1.5rc1.
Progress percentage update dto. for version 2.0.0.1 but was correct in 1.5..?

The clean button always clears a single downloaded file, in former versions it cleared all files
Product: Firefox → Toolkit
Flags: wanted1.8.1.x?
Flags: wanted-fennec1.0?
Flags: in-testsuite-
Flags: in-litmus-
Flags: blocking1.9.0.19?
Flags: blocking1.9.0.18?
Flags: blocking1.8.1.next?
Flags: blocking-thunderbird3.1?
Flags: wanted1.8.1.x?
Flags: wanted-fennec1.0?
Flags: in-testsuite-
Flags: in-litmus-
Flags: blocking1.9.0.19?
Flags: blocking1.9.0.18?
Flags: blocking1.8.1.next?
Flags: blocking-thunderbird3.1?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: