Closed Bug 1113658 Opened 9 years ago Closed 9 years ago

Unable to download while using second Android account

Categories

(Firefox for Android Graveyard :: General, defect)

35 Branch
ARM
Android
defect
Not set
normal

Tracking

(firefox35 wontfix, firefox36 affected, firefox37 ?, firefox38 ?, fennec40+)

RESOLVED WORKSFORME
Firefox 38
Tracking Status
firefox35 --- wontfix
firefox36 --- affected
firefox37 --- ?
firefox38 --- ?
fennec 40+ ---

People

(Reporter: mcg, Assigned: mhaigh)

References

Details

(Keywords: reproducible)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0
Build ID: 20141208203609

Steps to reproduce:

Using a second Android account in Android 5.0.1, try to save or download something.


Actual results:

Instead of being able to download the file a "downloads are disabled in guest session" error message is displayed. I have confirmed I was not in a guest session and even did a complete reinstall of Firefox in that Android account.


Expected results:

File should have downloaded.
OS: Linux → Android
Hardware: x86_64 → ARM
(In reply to mcg from comment #0)
> Using a second Android account in Android 5.0.1

Sounds interesting. I'll try this out. Which version of Firefox are you using?
The latest Beta, 35.
Thanks. I'm able to reproduce. On Nightly, I don't get a toast notification but downloads do not work for me. In Beta, I see the toast notification. Note, I had to install the browser in the second account.
Status: UNCONFIRMED → NEW
tracking-fennec: --- → ?
Ever confirmed: true
Keywords: reproducible
Summary: Firefox thinks I am in a guest session when I am not → Unable to download while using second Android account
tracking-fennec: ? → 35+
Assignee: nobody → wjohnston
Status: NEW → ASSIGNED
Attached patch PatchSplinter Review
We're throwing from the isLoggingEnabled method. Both the old and new Downloads code hits this and basically just fails (silently on nightly). Since we don't support it, I think we're fine to return false on Android.
Attachment #8552583 - Flags: review?(mark.finkle)
Attachment #8552583 - Flags: review?(mark.finkle) → review+
tracking-fennec: 35+ → 36+
Comment on attachment 8552583 [details] [diff] [review]
Patch

Approval Request Comment
[Feature/regressing bug #]: Bug 1042715
[User impact if declined]: Downloads busted if you're using a different profile
[Describe test coverage new/current, TreeHerder]: None. I don't think we can test these profiles on Android
[Risks and why]: Very low risk. Just returning false instead of throwing.
[String/UUID change made/needed]: None
Attachment #8552583 - Flags: approval-mozilla-beta?
Attachment #8552583 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/982fcfb63679
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 38
Attachment #8552583 - Flags: approval-mozilla-beta?
Attachment #8552583 - Flags: approval-mozilla-beta+
Attachment #8552583 - Flags: approval-mozilla-aurora?
Attachment #8552583 - Flags: approval-mozilla-aurora+
When trying to verify the bug on Firefox 36 Beta 6, I encountered a problem:

I wanted to download Firefox 36 Beta 6, logged in as a secondary, non-restricted user. 
But the message appears " For security, your tablet is set to block installation of apps obtained from  unknown sources". But going to settings -> security, the "allow unknown sources" toggle is grayed out and cannot be changed.
So I cannot download Firefox Beta 6 from ftp, chrome, release or anything.
I will have to wait until Beta 6 will be on play store to install it from there to test the fix.
> But going to settings -> security, the "allow unknown sources" toggle is grayed out and cannot be changed.

Probably only accessible from the administrator (primary) account, double check?
Android by default does not allow secondary users (Restricted Profiles) to install apps from Unknown Sources. (only play store). That's why I have to wait until Beta 6 is available on Play Store to test the fix.
Thanks Ryan. Will do
Flags: needinfo?(wjohnston)
(In reply to Teodora Vermesan (:TeoVermesan) from comment #13)
> Android by default does not allow secondary users (Restricted Profiles) to
> install apps from Unknown Sources. (only play store). That's why I have to
> wait until Beta 6 is available on Play Store to test the fix.

How's current Beta?
Flags: needinfo?(teodora.vermesan)
Using a Nexus 5 (Android 5.0.1), I've logged in as a secondary user and installed Beta 8 from play store.
Trying to save a page as PDF or to download something from ftp, the message "Downloads are disabled in guest session" is displayed.
Flags: needinfo?(teodora.vermesan)
Status: RESOLVED → REOPENED
Flags: needinfo?(wjohnston)
Resolution: FIXED → ---
Just tried to verify and Play Store Beta v36, from Feb 10th, still has this issue.
tracking-fennec: 36+ → ?
tracking-fennec: ? → 36+
Sorry for the delay in reporting back. I upgraded to Firefox-36 on a 2012 Nexus-7 with Android 5.0.1 soon after it was released and can confirm that the problem persists with this version.

I am confused about this because comments in bug 1128439 (which has been marked a duplicate of this bug) suggests that it was "Fixed on Firefox Beta on Google Play" - comment number 2 in bug 1128439).  A followup comment (number 5) said "The fix will be only in the next beta, which will be Firefox Beta 6".  However, comment 17 (above) indicates it was still not fixed in Beta 8 and clearly it's not fixed in firefox-36.  Am I testing the wrong beta stream - do the comments refer instead to 37-beta?  Has this bug been fixed and if so which firefox release are we likely to see the fix in?  Or was the "Fixed on Firefox Beta" comment referenced above related to a totally different behavioural defect?

Any clarification you can provide would be greatly appreciated.
It looks like this was never fixed properly. Resetting the assignee since the author is away.
Assignee: wjohnston → nobody
tracking-fennec: 36+ → ?
Flags: needinfo?(wjohnston)
Martyn - This bug is in the restricted profile permission code, so it might be a good starter bug for you.
Assignee: nobody → mhaigh
tracking-fennec: ? → 40+
Is there any progress on addressing this problem?  I am more than happy to carry out further testing if it will help.  This issue is becoming a major problem for us since we have to use secondary users to segregate different people using the tablet.  Not being able to download anything as a secondary user is very limiting: not only does it affect file downloads such as PDFs but it also prevents secondary users downloading extensions.

Is there a realistic chance that there are sufficient resources to fix this bug any time soon, or am I just going to have to bite the bullet and regrettably move everyone to chrome?  It's getting to the point where I need to do something to make browsing more functional for the users: after 3 or so months their patience with a broken browser is starting to wear out.  I realise lollipop gave rise to a significant number of issues for firefox and project resources are limited, so if it's going to take 6-12 months before this download issue is resolved please let me know.
Flags: needinfo?(mhaigh)
See also: bug 1137380. If we fix that bug, this bug would go away.
For completeness, I tested firefox 37 on Android 5.0.1 and Android 5.1 on a 2013 Nexus-7 overnight.  In both cases I can confirm that the bug is still present.

Aaron: you added the "needinfo" flag.  What information do you require and is it something I can provide?
I've just tested and I seem to be able to download items from the web fine, perhaps I'm doing something wrong?  I'm testing on Android 5.1 on a Nexus 7 2013 on Fx 37.0.2 and 38

Steps:
1, from main account, open notification bar, select profile picture and select "Add Guest" option
2, in guest mode, open play store and log in with account, selecting "remind me later" when asked about credit card input.
3, open play store again, type "firefox" in search bar and search
4, install "firefox" and "firefox beta" from store
5, open either installed application and enter "https://isotropic.org/papers/chicken.pdf" in to the url bar
6, observe the download icon in the notification bar 
7, when the item has finished downloading, open downloads and open the item
Flags: needinfo?(mhaigh)
As per the information I provided in bug 1128439, I am not utilising guest accounts.  We are using "secondary" accounts under Android 5.0.1 and 5.1.  It would appear, based on your success under a "guest" account, that these two situations are treated differently by firefox.

Under a secondary account last night using firefox 37.0.2 on both Android 5.0.1 (prior to upgrading) and 5.1, attempting to download a PDF from the web failed with the "downloads disabled for guest accounts" message.  Aside from the failure itself, it has always interested me that this message mentions guest accounts even when it is a secondary account in use (although this is peripheral to the present discussion).
I've just added a secondary, normal, account and it also seems to work fine.  Again on a N7 2013 running 5.1.

Are you using a restricted profile? Can you take me through the process you use to create a secondary account on your device?
Flags: needinfo?(jwoithe)
Flags: needinfo?(jwoithe)
This is really curious.  Anyway, I can certainly outline the process I used but there will be some delay since I don't have the device in front of me right now.  I should be able to do this within 12-24 hours from now.

I should add that the accounts concerned had no trouble downloading in firefox when the 2013-N7 was running Android 4.x.  The trouble started spontaneously when it was upgraded to Android 5.

Could there be an issue caused if the secondary accounts were created under Android 4.x (which, as far as I remember, all of them on my device were).
Flags: needinfo?(jwoithe)
Odd indeed.  Would you be in a position to try creating a new secondary user when you are in front of your device and trying in that account?
Flags: needinfo?(jwoithe) → needinfo?(jwoithe)
Sure, that will be no problem.  As above, I will try to do this within 12-24 hours.
Flags: needinfo?(jwoithe)
Alright, I now have the 2013 Nexus-7.  To start with questions from comment 27: I am not using a restricted profile.

Here is the account creation process I followed.  I repeated this tonight as I typed the steps, as per the suggestion in comment 29.  As the "tablet owner", in Settings - Users - Add user or profile, tap "User".  Tap "Ok" when asked to "Add new user?".  Tap "Set up now" in response to "Set up user now?" dialog.  Tablet then switches to new user, at which point the lock screen appears.  After unlocking, at welcome screen, tap the yellow "next" button.  Skip google account addition for the moment, and confirm with "Skip anyway".  Enter a name for the account.  Turn off "Google location services", "Help improve location services" and "Help improve your Android experience".  The account is then set up.

In Settings - Accounts - Option icon - Auto-sync data: turn off.  Then add google account.  Payment info set to "Remind me later".  Go to play store, choose "Apps", search for firefox, find "Firefox Browser for Android, tap "Install".  Accept permissions.  Firefox is installed for the user.  Start firefox from the home screen.

At this point, in the new user environment, I went to the website I've been using for testing over the last 3 or so months: http://www.sportsvouchers.sa.gov.au.  Scroll to "Resources".  Tap on "Fact sheet for parents / Guardians (PDF).

In all my tests to date, including those tried yesterday, the "Downloads disabled for guest users" message would appear at this point.  Somewhat astonishingly, this did not happen tonight under this new user.  Instead, "Download started" is displayed and PDF is downloaded.

One difference between this and the standard users is that a google account is not routinely associated with the tablet account.  I therefore went to Settings - Accounts and removed the google account from the new test user.  I then returned to firefox, went back to the aforementioned page and repeated the tap on the PDF link.  This also worked.

Finally I switched to one of the existing user accounts, started firefox and repeated the test once again.  Consistent with the findings from the test user created tonight, this also worked.  Exactly the same process failed with the "downloads disabled" message when I tried it the other night.  The firefox version is the same (37.0.2), the website is unchanged and no settings have been changed beyond the account creation steps noted above.  Perhaps unsurprisingly, after deleting the test account set up tonight, firefox continued to operate correctly under the pre-existing account.

In light of all this I really don't know what to think.  This version of firefox (and version 36) was most definitely refusing to permit downloads yesterday under Android 5.1, as I reported (version 36 was also broken when running under Android 5.0.1).  However, for some reason v37 is now working, seemingly just fine - and yet nothing has been done on the tablet in the time since.  There is probably nothing for it than to accept that something behind the scenes has caused it to start working on this tablet.  While it would be nice to know what fixed it, I suspect this will remain a mystery unless it recurs at some point in the future.  I will certainly be monitoring this closely over the next few weeks.

I should note that in the fault condition the problem persisted across multiple device reboots and (as mentioned in comment 24) an Android upgrade, so whatever was going on had something to do with persistent storage (as opposed to the software state).
In light of comment 31, I'm going to mark this as resolved (WORKSFORME).  If this problem raises it's head again then feel free to reopen.
Status: REOPENED → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → WORKSFORME
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: