Closed Bug 1556540 Opened 5 years ago Closed 5 years ago

Loading data URIs for internal usage in onLoadRequest fails (silently)

Categories

(GeckoView :: General, defect, P2)

68 Branch
Unspecified
All
defect

Tracking

(firefox68 wontfix, firefox69 wontfix, firefox70 fixed)

RESOLVED FIXED
mozilla70
Tracking Status
firefox68 --- wontfix
firefox69 --- wontfix
firefox70 --- fixed

People

(Reporter: jonalmeida, Assigned: rbarker)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [geckoview:fenix:m8] [geckoview:fxr])

Attachments

(1 file)

When an app wants to load data on a page, using loadData(data, mimeType, encoding) is the recommended way to do. This behaviour seems to have broken recently when loading data URIs with a warning showing up instead:

[JavaScript Warning: "Navigation to toplevel data: URI not allowed (Blocked loading of: "data:text/html;base64,PCFkb2N0eXBlIGh0bWw+PCEtLSBU...")" {file: "about:blank" line: 0}]

An example usage in Reference Browser: https://github.com/mozilla-mobile/reference-browser/blob/master/app/src/main/java/org/mozilla/reference/browser/AppRequestInterceptor.kt#L23-L26

If this is an intentional change in GV then I wonder if we could just use a different "fake protocol" instead of "about:" in Reference Browser.

(In reply to Sebastian Kaspari (:sebastian; :pocmo) from comment #1)

If this is an intentional change in GV then I wonder if we could just use a different "fake protocol" instead of "about:" in Reference Browser.

Agi had mentioned on Slack that this was a regression from bug 1553371.

Keywords: regression
Priority: -- → P1
Whiteboard: [geckoview:fenix:m6]

Does this bug affect any of Fenix's pages?

I filed the R-B issue mozilla-mobile/reference-browser#781 about about:version being blank, but Fenix doesn't have an about:version page to test.

(In reply to Chris Peterson [:cpeterson] from comment #3)

Does this bug affect any of Fenix's pages?

Sebastian says no, so this bug doesn't need to block Fenix MVP.

Priority: P1 → P2
Whiteboard: [geckoview:fenix:m6] → [geckoview:fenix:p2]

This appears to have broken the initial information screen when beginning a private browsing session in Firefox Reality. See https://github.com/MozillaReality/FirefoxReality/issues/1335

Chris, can we escalate this to get a fix for Firefox Reality's use of this API please?

Flags: needinfo?(cpeterson)

(In reply to Philip Lamb from comment #6)

Chris, can we escalate this to get a fix for Firefox Reality's use of this API please?

Sure. I'll send this bug back to GeckoView triage for reprioritization.

Flags: needinfo?(cpeterson)
Whiteboard: [geckoview:fenix:p2] → [geckoview:fenix:m8] [geckoview:fxr]
Assignee: nobody → rbarker
Pushed by rbarker@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/18a01058f63d
Fix GeckoSession.loadData() so that it can load data URLs r=geckoview-reviewers,agi,esawin,snorp
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70

Please note that not only Reference Browser and Firefox Reality are affected but also the latest Firefox Focus release (https://github.com/mozilla-mobile/focus-android/issues/4299). Since the development of Focus is on hold but you still released this regression to the stable release channel, are there plans to address this for Focus, too?

(In reply to Sören Hentzschel from comment #11)

Since the development of Focus is on hold but you still released this regression to the stable release channel, are there plans to address this for Focus, too?

Yes. We plan to update Focus to a newer version of GeckoView with this fix soon.

69=wontfix. We don't need to uplift this fix to GV 69 Beta because this bug does not affect Fenix, AFAIK. FxR and R-B use GV Nightly (70) and will get the right away.

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: