Closed Bug 1527074 Opened 6 years ago Closed 6 years ago

Persistent Storage permission request is not triggering any calls to onAndroidPermissionsRequest neither onContentPermissionRequest

Categories

(GeckoView :: General, defect, P1)

Unspecified
Android
defect

Tracking

(firefox-esr60 wontfix, firefox65 wontfix, firefox66 wontfix, firefox67 wontfix, firefox68 fixed)

RESOLVED FIXED
mozilla68
Tracking Status
firefox-esr60 --- wontfix
firefox65 --- wontfix
firefox66 --- wontfix
firefox67 --- wontfix
firefox68 --- fixed

People

(Reporter: amejia, Assigned: fluffyemily)

References

()

Details

(Whiteboard: [geckoview:fenix:m5])

Attachments

(1 file)

When a site is requesting Persistent Storage permission, geckoView is not calling
onAndroidPermissionsRequest neither onContentPermissionRequest.

You can reproduce it on GeckoView Sample App.

Blocks: 1524489
Priority: -- → P1
Whiteboard: [geckoview:fenix:p1]

A-C plans to complete their site permissions API in M3, so GV should fix permissions bugs in M3. This bug might be a dupe of bug 1527716.

https://github.com/mozilla-mobile/android-components/issues/1818

Blocks: 1527716
Whiteboard: [geckoview:fenix:p1] → [geckoview:fenix:m3]
Assignee: nobody → etoop

Persistent Storage on http://permission.site seems to be broken. On all Firefox browsers, including desktop I am getting the error: JavaScript Error: "TypeError: navigator.storage is undefined" {file: "http://permission.site/index.js" line: 289, whereas on Chrome I am getting the error Uncaught TypeError: Cannot read property 'persist' of undefined at HTMLButtonElement.persistent-storage (index.js:289).

I am looking for another site with which to test whether Persistent storage requests are behaving as expected.

Yup, http://permission.site is calling navigator.storage.persist() whereas the correct way to request storage permissions is navigator.permissions.query({name: "persistent-storage"}).

Yup, it looks like we'e not getting native prompt requests for "persistent-storage" permissions. These permission requests are bypassing the Java code and GeckoViewPermissions.js entirely. I am starting to look into what will need to be done to support persistent-storage permission prompting in GV.

I think I just hit this in FxR. What we are seeing is we get the gecko permission prompt before we get the system prompt. If I approve the gecko permission request I then seen the system permission request. See https://github.com/MozillaReality/FirefoxReality/pull/984#issuecomment-469831050

FxR is currently using 67.0.20190203095148 build of GeckoView Nightly.

:rbarker are the permissions requests for FxR coming from websites, or via some other means? I'm currently only looking at site permissions at the moment and the more I look into this the more I feel that GV shouldn't be implementing PersistentStorage site permissions.

Flags: needinfo?(rbarker)

(In reply to Emily Toop (:fluffyemily) from comment #7)

:rbarker are the permissions requests for FxR coming from websites, or via some other means? I'm currently only looking at site permissions at the moment and the more I look into this the more I feel that GV shouldn't be implementing PersistentStorage site permissions.

As discussed in GV triage, I don't believe FxR will need per site Persistent Storage permissions at this time.

Flags: needinfo?(rbarker)
Blocks: 1539429

Deferring this Persistent Storage permission bug to Fenix M5 because it is not urgent for Fenix at this time.

Whiteboard: [geckoview:fenix:m3] → [geckoview:fenix:m5]

67=wontfix. Fenix MVP will use GeckoView 68, so we don't need to uplift this fix to 67 Beta unless it also affects Fennec 67.

Pushed by etoop@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8fce6b3574a7 Expose storage manager API to GeckoView r=geckoview-reviewers,snorp
Regressions: 1547100
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: