Closed Bug 944682 Opened 11 years ago Closed 11 years ago

[Download API] Weird download is received when the device is started the first time

Categories

(Firefox OS Graveyard :: General, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME
1.3 C1/1.4 S1(20dec)

People

(Reporter: crdlc, Assigned: aus)

References

Details

(Whiteboard: [systemsfe])

Attachments

(1 file)

Attached image download_html.png
Download object: no startTime. Checking it -> [JavaScript Error: "NS_ERROR_UNEXPECTED] totalBytes 0 currentBytes 0 url about:blank path /mnt/sdcard/downloads/ATpWEich.html The file name is random
Blocks: 938023
Whiteboard: [systemsfe]
This bug is blocking the bug 935094 because the patch breaks a gaia_ui_test [1] that basically is based on adding a new notification and checking if there is only one. At that moment, we have two notifications (one added by the test and this weird notification) [1] https://github.com/mozilla-b2g/gaia/blob/master/tests/python/gaia-ui-tests/gaiatest/tests/functional/system/test_system_notification_bar.py#L34
Blocks: 935094
I tried to avoid to add download notifications when the totalBytes is 0 but all downloads have the totalBytes attribute as 0 when the downloadstart event is received in front-end. I don't see way to avoid this blocker from my side :(
Blocks: 945099
hm, we should really not download about:blank. Let's fix that.
How can I reproduce this? I applied https://github.com/mozilla-b2g/gaia/pull/14218/files and was running test-integration but everything passed. Does this also reproduce on b2g-desktop?
(In reply to Gregor Wagner [:gwagner] from comment #4) > How can I reproduce this? > I applied https://github.com/mozilla-b2g/gaia/pull/14218/files and was > running test-integration but everything passed. > Does this also reproduce on b2g-desktop? FWIW - I hit the startTime issue & totalBytes issue in my mochitest in bug 945099 in the emulator. Don't know about the others.
I pushed an early return in order to know if I passed all tests. I've pushed the correct patch where you can view all issues. You can reproduce in all platforms if (download.totalBytes <= 0) { // See bug 944682 return; } (In reply to Gregor Wagner [:gwagner] from comment #4) > How can I reproduce this? > I applied https://github.com/mozilla-b2g/gaia/pull/14218/files and was > running test-integration but everything passed. > Does this also reproduce on b2g-desktop?
Hi Gregor, this is the pr rebased from master for download notifications https://github.com/mozilla-b2g/gaia/pull/14218 (In reply to Gregor Wagner [:gwagner] from comment #4) > How can I reproduce this? > I applied https://github.com/mozilla-b2g/gaia/pull/14218/files and was > running test-integration but everything passed. > Does this also reproduce on b2g-desktop?
Finally we decided to land the notifications in order to continue working on downloads in Gaia (Green Travis) I added this condition to avoid the blocker https://github.com/mozilla-b2g/gaia/commit/3544840f1756fa0c1f7a51f1634939f3e9a5c2e4#diff-947f8f75c59def2894938d5500a36802R43 We will delete this condition when this bug will be resolved, thanks
hi guys, Gaia is still downloading about:html behind the scenes. Please see bug: https://bugzilla.mozilla.org/show_bug.cgi?id=947852 ( about:blank is downloaded every time frame is loaded with desktopb2g )
Aus, any progress on this? When testing on desktop our 'Download' folder is full of *.html downloads ... :( So the device storage has been affected as well. Maybe we should try to prioritize this bug and trying to get solved asap, Wdyt? Thanks a lot!
Flags: needinfo?(aus)
No progress on this yet. It only came up on my radar last Friday. I'm going to have to prioritize this along with the other issues that have popped up. This will likely be near the top of the pile as it's pretty bad!
Flags: needinfo?(aus)
Assignee: nobody → aus
Status: NEW → ASSIGNED
fwiw, we preload about:blank here : https://mxr.mozilla.org/mozilla-central/source/dom/ipc/preload.js#109 What I don't get is why that would trigger a download if it comes from there.
I'm guessing we have a content handler somewhere that is assuming that about: protocol URLs need to fall through to the browser itself instead of being downloaded. Either we can fix it by protocol or by mime type (I'm guessing right now that about:blank may not be reporting a mime type that lets the browser display the content instead of being routed to the downloads api).
about:blank is text/html iirc from the logs.
If that's the case then we may need a simple check for the about: protocol. Looking into it now...
Note - Broke out the bug about the startTime issue into bug 948287.
No longer blocks: 945099
So far I'm only seeing this in release builds and *not* in debug builds. Same results on birch, pine as on mozilla-central.
And, today with latest b2g-desktop, and my own debug and release builds, I am no longer seeing this issue. I'm marking this WFM. If I can, I will attach the gecko commit that I believe fixed the issue. :crdlc, :borjasalguero, can you confirm that this issue is also gone for you when using the latest moz-central b2g-desktop build (2013-12-11 or more recent)?
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: needinfo?(crdlc)
Flags: needinfo?(borja.bugzilla)
Resolution: --- → WORKSFORME
It seems ok, no notification and no html(s) in sdcard/downloads folder Thanks a lot
Flags: needinfo?(crdlc)
Blocks: 949351
I've just filled this bug 949351 to remove the workaround to avoid this bug 944682
I can verify comment #9 is resolved too :)
This seems to be fixed! Thanks :)
Flags: needinfo?(borja.bugzilla)
Target Milestone: --- → 1.3 C1/1.4 S1(20dec)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: