Closed Bug 1586228 Opened 5 years ago Closed 5 years ago

Attempting to download files through Firefox immediately fails.

Categories

(Toolkit :: Downloads API, defect, P1)

71 Branch
Unspecified
Windows 10
defect

Tracking

()

VERIFIED FIXED
mozilla71
Tracking Status
relnote-firefox --- 69+
firefox-esr60 --- unaffected
firefox-esr68 --- unaffected
firefox69 blocking verified
firefox70 + verified
firefox71 + verified

People

(Reporter: jacobsroom, Assigned: molly)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [rca - semantic error])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0

Steps to reproduce:

  1. Right click and save a webpage, or attempt to download any other file.
  2. Click the save option

Actual results:

The download immediately fails, leaving an empty file in the downloads folder. Retrying does not work.

Mozregression suggests regression is a result of Bug 1584613.

Expected results:

The file is downloaded.

Component: Untriaged → General
Keywords: regression
OS: Unspecified → Windows 10
Product: Firefox → Core
Regressed by: 1584613

Matt, can you take a look?

Flags: needinfo?(mhowell)

Confirming due to multiple reports on reddit:

After updating to version 69.0.2, any files I try to download fail with no error. In the download panel it just says Failed and the retry button does nothing. Things such as doc files show up in my download folder with 0kb size, but it seems like small image files will download even though it says "Failed" in the download panel. Other things such as archive files will show up in the downloads folder as PART files as if the download initiates but just never starts.

I've already completely uninstalled and reinstalled Firefox, and tried downloading files on a completely clean installation with a new profile. I've moved around the download location, and also tried chrome and edge which both downloaded things completely fine.

https://www.reddit.com/r/firefox/comments/dd1h48/firefox_6902_wont_let_me_download_any_files/
https://www.reddit.com/r/firefox/comments/dd2bzl/firefox_nightly_710a1_windows_10_home_1903/
https://www.reddit.com/r/firefox/comments/dd3jlf/trying_to_download_files_but_download_fails/

Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Attempting to download files through Firefox Nightly immediately fails. → Attempting to download files through Firefox immediately fails.

[Tracking Requested - why for this release]:
regression apparently from a change uplifted to 69.0.2

I've throttled background updates for 69.0.2 until we get to the bottom of this. We could really use some STR for this so we can consistently reproduce. Any errors in the console? Is this only Win10 Home or Pro too?

Severity: normal → blocker
Priority: -- → P1

I wasn't aware that there was any interaction between parental controls and downloads at all. I'll start trying to reproduce. I'll also echo that any of the details comment 4 is asking about would be very helpful.

Flags: needinfo?(mhowell)

I installed Firefox 69.0.2 on a fresh Win10 Home 1903 VM and haven't been able to reproduce any issues so far. All file downloads are working OK.

I wasn't aware that there was any interaction between parental controls and downloads at all.

I'm going to guess

nsParentalControlsService::GetBlockFileDownloadsEnabled

has something to do with this ;-)

The old code would fail to detect the API doesn't exist and fall through to NS_OK:
https://hg.mozilla.org/releases/mozilla-release/rev/74a972765968#l1.121
Edit: Or actually, fail to initialize the service at all?

Now we fail with NS_ERROR_NOT_AVAILABLE.

I'm going to guess the download code is not correctly handling that error?

an affected user at https://support.mozilla.org/en-US/questions/1270020#answer-1256720 confirmed that some parental controls were in effect in his account and the problem stopped when he left the "family group".

WrongEnd, can you check something in the Windows registry, please?

  1. Hit Windows key + R
  2. Type regedt32 and hit Enter.
  3. Go to HKEY_LOCALE_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Parental Control
  4. Is there a folder Users?
  5. If there is, enter it.
  6. If the folders in that have no meaningful name, try this for all (should be 1 per user, max):
  7. Enter the folder.
  8. Check if there is a folder "Web".
  9. Is there a key "Filter On" in it?
  10. If yes, what's its value?

Thank you very much in advance.

Flags: needinfo?(jacobsroom)

As you can see here, the code checks whether the service exists, which used to fail, so the blocking would bail out here:
https://searchfox.org/mozilla-central/source/toolkit/components/downloads/DownloadIntegration.jsm#422

Now we do the call here, and fail, which will throw:
https://searchfox.org/mozilla-central/source/toolkit/components/downloads/DownloadIntegration.jsm#425

I'm going to guess the throw there is the cause of this bug.

Yeah, I think :gcp has it right. I got into a hurry to fix the immediate problem and didn't consider that that change was probably going to get called from JS and start throwing.

Component: General → Downloads API
Product: Core → Toolkit

A patch to the parental controls service that makes it return that downloads are allowed instead of throwing seems to fix the problem. That would require a new release; I'm not sure what our current hotfix capabilities are, but I would guess that anything we could do to fix this would fall outside of them.

Assignee: nobody → mhowell
Status: NEW → ASSIGNED

Once we get a patch landed here, we're going to want as much testing as possible looking for other edge cases with Parental Controls that got missed. Also just ensuring in general that downloading works as expected in the normal cases.

Flags: qe-verify+
Depends on: 1586362

Added to the 69.0.2 release notes as a known issue:

File downloads may not work for Windows 10 users with Parental Controls enabled (bug 1586228). As a workaround, Parental Controls can be disabled until a fix is available.

I've also filed bug 1586362 about getting a SUMO article created for this and will update the note to point to that article once available.

See Also: → 1586398
Pushed by mhowell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/32110639be01 Don't always disable file downloads when parental controls are on in Windows 10. r=aklotz

(In reply to Sebastian Hengst [:aryx] (needinfo on intermittent or backout) from comment #11)

WrongEnd, can you check something in the Windows registry, please?

  1. Hit Windows key + R
  2. Type regedt32 and hit Enter.
  3. Go to HKEY_LOCALE_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Parental Control
  4. Is there a folder Users?
  5. If there is, enter it.
  6. If the folders in that have no meaningful name, try this for all (should be 1 per user, max):
  7. Enter the folder.
  8. Check if there is a folder "Web".
  9. Is there a key "Filter On" in it?
  10. If yes, what's its value?

Thank you very much in advance.

The value on Filter On is 1. Would it be safe for me to set it to 0?

Flags: needinfo?(jacobsroom)

An update: I found out I was part of an old family group I didn't even know existed. Once I left it and rebooted my computer, downloading began working again.

(In reply to WrongEnd from comment #20)

An update: I found out I was part of an old family group I didn't even know existed. Once I left it and rebooted my computer, downloading began working again.

Thanks for checking those things and reporting back; those results help verify that the fix we have is on the right track.

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71

Please request Beta and Release approval on this when you get a chance.

Flags: needinfo?(mhowell)

Comment on attachment 9098886 [details]
Bug 1586228 - Don't always disable file downloads when parental controls are on in Windows 10. r=aklotz

Beta/Release Uplift Approval Request

  • User impact if declined: Windows 10 users with parental controls enabled cannot download files.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: From an account with parental controls enabled on a Windows 10 machine, attempt to download a file or save a web page in Firefox. In builds with the bug 1584613 patch but without this patch, the download will fail. In builds with this patch, the download should succeed.
    Testing other scenarios with involve parental controls would also be helpful.
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This is a small fix which restores part of the API behavior for the parental controls service that was inadvertently changed by bug 1584613, so that consumers of the service (including the download manager) no longer get thrown exceptions they are not expecting. Since this patch is restoring the known good behavior, it would be very surprising for it to create new bugs.
  • String changes made/needed:
Flags: needinfo?(mhowell)
Attachment #9098886 - Flags: approval-mozilla-release?
Attachment #9098886 - Flags: approval-mozilla-beta?

Comment on attachment 9098886 [details]
Bug 1586228 - Don't always disable file downloads when parental controls are on in Windows 10. r=aklotz

Approved for 70.0b13 so we can get more testing on this before building 69.0.3.

Attachment #9098886 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

I'm having the same issue, I already tried to reinstall firefox but it didn't work.

QA Whiteboard: [qa-triaged]

Hi, I was able to test this issue after creating an online family account logging in allowing Firefox to run on the child protected account, In older versions the File download would fail instantly but in Beta 70.0b13 and our Latest Nightly build the file starts to download correctly. I will mark this issue accordingly. This issue is verified as fixed in the previously mentioned builds.

I submitted PI-317 for wider testing of Parental Controls as well to look for any other possible fallout from these recent changes.

Hi, I recently investigated the "Family Options and Settings" available on Windows 10 for a childs account and here is what I found:
You can add a restriction for the child to stop using Firefox, you can either allow it or block it entirely and he will not be able to start Firefox at all. After Firefox is allowed to start absolutely no restrictions apply to it, every Blocked Website or safe search only applies to Microsoft EDGE. The only restriction you can set is a time limit for Firefox, where the child only spends one or more hours on it, I guess we can work with that but even so it does not do much. I guess the only testing we can do is Allow Firefox to run and do a Smoke validation run to see what works and what doesn't whilst on a childs account. We could also do a bit of exploratory testing while playing with the Time limit imposed by the parent and see what happens when the timer runs out while browsing the internet.

Are there any other ideas on what we should focus on ? Any restrictions that come to mind ? The Parental Options can only be set online from the Microsoft account and it seems it only covers EDGE. Please let us know what other scenarios we can do in order to cover more ground.

Flags: needinfo?(ryanvm)
Flags: needinfo?(mhowell)
Flags: needinfo?(aryx.bugmail)

Sounds like only Edge and Internet Explorer can utilize most of that functionality. I guess verify what you can and we'll leave it at that. We'll certainly want to be on the lookout for any other impacted functionality with and without P.C. enabled.

Flags: needinfo?(ryanvm)

(In reply to Rares Doghi from comment #32)

After Firefox is allowed to start absolutely no restrictions apply to it

There should be some restrictions according to this:

after setting parental controls in Windows, Firefox will send "Prefer:Safe" in the request headers when accessing any website. (See here for how to see request headers)

https://github.com/mozilla/doh-rollout/issues/107#issuecomment-535248174

(In reply to Ryan VanderMeulen [:RyanVM] from comment #33)

Sounds like only Edge and Internet Explorer can utilize most of that functionality.

This is the core of the problem. Prior to Windows 10, parental controls was an OS feature that any browser or other application could interface with and make full use of. In Windows 10, parental controls is an Edge/IE feature and there is no longer any documented way to interact with it at all. We don't support e.g. website blocking, activity monitoring, or notifications on Windows 10 because there are no supported ways to do so. Unless I've missed something, the only things we can use it for are sending the Prefer:Safe header as mentioned above (which I know triggers safe search on Bing and possibly other search engines) and forcing DoH off (the reason for that being DoH breaks DNS-based website filtering). No other Firefox behaviors will change. The time limits work because Windows implements those for all applications, we don't have to do anything; blocking Firefox from running at all should also work for the same reason.

Flags: needinfo?(mhowell)

Comment on attachment 9098886 [details]
Bug 1586228 - Don't always disable file downloads when parental controls are on in Windows 10. r=aklotz

Approved for 69.0.3 so we can get the builds going today. Sounds like we have a general understanding of what QA can practically test at this point before we ship.

Attachment #9098886 - Flags: approval-mozilla-release? → approval-mozilla-release+

I am also affected, no parental controls at all (never had it active at any point, relatively new windows install as well) as I'm on an admin account.

https://pastebin.com/PF1fdrVg

http://prntscr.com/ph2dgw

(In reply to Michael Peacock from comment #38)

I am also affected, no parental controls at all (never had it active at any point, relatively new windows install as well) as I'm on an admin account.

https://pastebin.com/PF1fdrVg

http://prntscr.com/ph2dgw

Hmm. The patch here should still fix that, but now I'm worried about if/why we thought your account had controls enabled. Do you have anything in the registry at the path HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Parental Controls?

Flags: needinfo?(jfdragon10)

(In reply to Matt Howell (he/him) [:mhowell] from comment #39)

(In reply to Michael Peacock from comment #38)

I am also affected, no parental controls at all (never had it active at any point, relatively new windows install as well) as I'm on an admin account.

https://pastebin.com/PF1fdrVg

http://prntscr.com/ph2dgw

Hmm. The patch here should still fix that, but now I'm worried about if/why we thought your account had controls enabled. Do you have anything in the registry at the path HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Parental Controls?

yes, turns out I do. So i went and checked my 2 connected Microsoft accounts found 1 had me in a group as a child, the other as an adult, (Big thanks to Microsoft for hiding anything of importance behind a website rather than have it in the OS itself) I've removed myself from that windows family group and all others but I still get the issue.

http://prntscr.com/ph32md --> http://prntscr.com/ph33xn

going to reboot firefox and see maybe it just needs a restart to let me download. I really wonder who at Microsoft though an admin account would ever need parental controls active....

Flags: needinfo?(jfdragon10)

Good news, firefox just needed a restart, can now download. maybe have firefox ignore parental controls if the account is admin? I don't see any reason for someone to have an admin account but require parental controls active.

Thanks for reporting back, glad you got to the bottom of it.

maybe have firefox ignore parental controls if the account is admin? I don't see any reason for someone to have an admin account but require parental controls active.

I'm not sure if that's a good idea. It's such an odd scenario to be in that probably every sequence of events that led there would end up being unique and different, so I don't know if we should try and be smart about it.

Hello again, Thanks to the submitted PI request "PI-317" we were able to Test this issue further and do a Smoke Test run in the areas we thought might be affected by parental controls.
We covered Web Compatibility, Plug-ins, Audio/Video Playback, Search, Address Bar and of course Downloads in order to confirm this fix in our latest Release Candidate 69.0.3.
We did not find any issues in these areas but we did find that Safe Search only applies to Bing, Google, Yahoo, DuckDuckGo and the others do not apply the same safe search.
I was able to Download any files and save pages without issues which also confirms this Bug as FIxed but we also did the exploratory tests in order to make sure that everything works great on the most popular websites.
These tests were peformed with a screen time limit set specific to Firefox and the notifications received that the time was running out did not affect Audio/Video playback or other Flash games in any way.
We also tested Firefox session restore after Firefox was forced to close by the windows time limiter and no issues occured restoring the session. We did encounter some issues with the permission to start Firefox again where even after Granting permissions to the child's account sometimes a full windows sign out sign in was needed in order to start Firefox again but this was more related to the Microsoft accounts rather than Firefox itself.

I will update the flags for this issue accordingly.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+

Added to the 69.0.3 relnotes:

Fixed download errors for Windows 10 users with Parental Controls enabled

This bug has been identified as part of a pilot on determining root causes of blocking and dot release drivers.

It needs a root-cause set for it. Please see the list at https://docs.google.com/document/d/1FFEGsmoU8T0N8R9kk-MXWptOPtXXXRRIe4vQo3_HgMw/.

Add the root cause as a whiteboard tag in the form [rca - <cause> ] and remove the rca-needed keyword.

If you have questions, please contact :tmaity.

Keywords: rca-needed

I picked the category from the root cause list that I thought fit most closely, but several others that are in there apply as well, so I'm not 100% sure.

Keywords: rca-needed
Whiteboard: [rca - semantic error]

I am having this exact problem on 72.0.2 when attempting to download PDF files. If I try to download the file, I get a zero-byte file and a "failed" message in the download panel.

But here's a potential hint: if I choose "open with..." instead of "Save file", the PDF downloads correctly and displays in my PDF reader.

I forgot to mention that I'm on Windows 7

Hmm. This bug shouldn't have affected anything on Windows 7, only Windows 10. And I can't get anything like this to happen on my Windows 7 system. Would you mind filing a new bug and following the instructions on this page to copy your troubleshooting information to the clipboard and paste it there? It might also help if you could take a look at the browser console (under the Web Developer menu) and see if any messages appear there when you try to download a PDF. Thank you.

Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: