Cannot save downloaded files from within the desktop web runtime

VERIFIED FIXED

Status

Firefox Graveyard
Webapp Runtime
--
major
VERIFIED FIXED
5 years ago
a year ago

People

(Reporter: jsmith, Assigned: Mardak)

Tracking

(Depends on: 1 bug)

Details

(Whiteboard: [topapps], [marketplace-beta=])

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
If a user tries to download and save a file in a web application, the prompt will appear to allow a user to open or save the respective file. If they select save, the file should be saved to the downloads folder for each respective OS (e.g. Win 7 in user/downloads). The current behavior however is different - nothing happens. You are unable to save a downloaded file to your machine.

Test case I used (application referencing this will be hosted soon):

1. Go to http://mozqa.com/data/firefox/downloading/ within a web application
2. Try downloading one of the unknown types
3. Select save

Expected:

The file should be saved to the user's downloads folder in respect to each OS's downloads folder location.

Actual:

No file is saved to the user's downloads folder.
(Reporter)

Comment 1

5 years ago
The impact of this bug affects app functionality such as export to X format style functionality. Example: Anything to do with exporting in google docs. Likely to happen with any web apps that are project management based.

Strangely enough, if prompted to save the file, if you open the file, you can successfully open the file.
(Reporter)

Updated

5 years ago
Whiteboard: [marketplace-beta-]
(Reporter)

Comment 2

5 years ago
Note - This affects functionality in box, a top app. Re-marking it for triage, since it affects a top app now.
Whiteboard: [marketplace-beta-] → [marketplace-beta-], [topapps]
(Reporter)

Updated

5 years ago
Whiteboard: [marketplace-beta-], [topapps] → [topapps]
My vote is to not block on this and to make it a marketplace-beta=. It's 1 top app if this issue were a high percentage of top apps I'd want more discussion.
(Reporter)

Comment 4

5 years ago
(In reply to Jennifer Arguello :ticachica from comment #3)
> My vote is to not block on this and to make it a marketplace-beta=. It's 1
> top app if this issue were a high percentage of top apps I'd want more
> discussion.

Sounds good. I'll keep a look out if this happens more frequently.
Whiteboard: [topapps] → [topapps], [marketplace-beta=]
(Assignee)

Comment 5

5 years ago
With this particular testcase, it works now because the file being downloaded is hosted on a different domain, so the url gets handed by the default browser to download.

http://mozqa.com/data/firefox/downloading/
(Assignee)

Comment 6

5 years ago
Trying to save a file from the same domain results in this exception:

WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x8000FFFF: file mozilla-central/toolkit/components/downloads/nsDownloadManager.cpp, line 1278
************************************************************
* Call to xpconnect wrapped JSObject produced this error:  *
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIHelperAppLauncher.saveToDisk]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: components/nsHelperAppDlg.js :: <TOP_LEVEL> :: line 459"  data: no]
(Assignee)

Comment 7

5 years ago
However, if you open the file instead of trying to save the file, downloading works.
(Reporter)

Comment 8

5 years ago
(In reply to Edward Lee :Mardak from comment #7)
> However, if you open the file instead of trying to save the file,
> downloading works.

Right, I can confirm that behavior as well. Open works on my machine, but not save.
(Assignee)

Updated

5 years ago
Depends on: 750386
(Assignee)

Comment 9

5 years ago
Created attachment 619649 [details] [diff] [review]
v1

Default downloads to the Downloads directory set by the platform just like Firefox.
Assignee: nobody → edilee
Status: NEW → ASSIGNED
Attachment #619649 - Flags: review?(myk)
(Assignee)

Comment 10

5 years ago
The patch lets files to be saved to disk (into the default downloads directory), however there's no UI or download management interface.
(Reporter)

Comment 11

5 years ago
(In reply to Edward Lee :Mardak from comment #10)
> The patch lets files to be saved to disk (into the default downloads
> directory), however there's no UI or download management interface.

That's acceptable to fix this bug. As for UI improvements, we can track that in a separate bug if need be.
(Reporter)

Updated

5 years ago
Blocks: 737571
Comment on attachment 619649 [details] [diff] [review]
v1

Looks good, works as expected, r=myk!
Attachment #619649 - Flags: review?(myk) → review+
(Assignee)

Comment 13

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/568f9b7df862

Updated

5 years ago
blocking-kilimanjaro: --- → +
https://hg.mozilla.org/mozilla-central/rev/568f9b7df862
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Reporter)

Updated

5 years ago
Status: RESOLVED → VERIFIED
(Reporter)

Updated

5 years ago
No longer blocks: 737571
Component: Desktop Runtime → Webapp Runtime
Product: Web Apps → Firefox
(Reporter)

Updated

5 years ago
Flags: in-moztrap?(jsmith)
(Reporter)

Updated

5 years ago
QA Contact: desktop-runtime → jsmith
(Reporter)

Updated

5 years ago
Flags: in-moztrap?(jsmith)
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.