Closed Bug 1501735 Opened 7 years ago Closed 5 years ago

GeckoSession.ContentDelegate.onExternalReponse and blob URLs

Categories

(GeckoView :: General, enhancement, P2)

All
Android
enhancement

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1432949

People

(Reporter: sebastian, Assigned: snorp)

References

Details

(Keywords: enterprise)

For downloads we are listening to GeckoSession.ContentDelegate.onExternalReponse. On some pages we get a blob URL in the callback. In order to perform the download we would need to get some kind of access to the data the blob URL is pointing to.
[geckoview:fenix] because Fenix will want this fix.
Whiteboard: [geckoview:fenix]
I wonder what we want to do here. Maybe some generic `GeckoResult<ByteBufer> resolveBlob(String uri)` type of thing?
Product: Firefox for Android → GeckoView

James says he is looking at a similar bug which should fix this bug.

Assignee: nobody → snorp
Whiteboard: [geckoview:fenix]

which should fix this bug.

But this is more like a feature request. :)

What is the fix here or the other bug that gets fixed? Are we adding some kind of "streaming" API (or getting access to the WebResponse)?

Maybe it's related to this one: Bug 1432949

Bumping the priority from P3 to P2 because the Fenix team plans to implement a download manager using GV in Q4:

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

Rank: 30

This is also needed to make data: Uri downloads work, which currently prevents uBlock's "back up to file" functionality from working in Fenix:

More details here: https://github.com/mozilla-mobile/android-components/issues/6314

Whiteboard: [geckoview:m77]

(In reply to Christian Sadilek [:csadilek] from comment #7)

This is also needed to make data: Uri downloads work, which currently prevents uBlock's "back up to file" functionality from working in Fenix:

More details here: https://github.com/mozilla-mobile/android-components/issues/6314

A-C can easily handle the data: URI itself, no? Unless you aren't even getting the URI?

Flags: needinfo?(csadilek)

A-C can easily handle the data: URI itself, no?

Ah, see comment here: https://github.com/mozilla-mobile/android-components/issues/6314#issuecomment-606305475 - We could handle ourselves if that is preferred, yes.

Unless you aren't even getting the URI?

I do get the callback (onExternalResponse) for anchor tags on a regular page e.g. <a href="data:text/plain;base64,SGVsbG8sIFdvcmxkIQ==" type="text/plain" download="test.txt">Test</a> but not for uBlock which does: https://github.com/gorhill/uBlock/blob/08d370d32e648c2823e1bc31fcd9f7e1f96d155a/platform/chromium/vapi-common.js#L172

Flags: needinfo?(csadilek)
Priority: P2 → P1
Whiteboard: [geckoview:m77] → [geckoview:m77][wfh]

Christian informs me they're ok without this for now, downgrading to P2.

Priority: P1 → P2
Whiteboard: [geckoview:m77][wfh] → [wfh]

Fenix would like this fixed in Q2

I think we need this issue fixed sooner rather than later, since we're getting tons of webcompat/download issues getting duped to the AC one. It looks like it's breaking on a French gov covid site:
https://github.com/mozilla-mobile/android-components/issues/1159

(In reply to Chenxia Liu [:liuche] from comment #12)

I think we need this issue fixed sooner rather than later, since we're getting tons of webcompat/download issues getting duped to the AC one. It looks like it's breaking on a French gov covid site:
https://github.com/mozilla-mobile/android-components/issues/1159

It's not just visiting a government site, the official form you need to fill in to get out of your home for essential needs during the confinement (grocery shopping, going to work, going to the doctor…) does not work in Fenix because of this bug.

(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) (he/him) from comment #10)

Christian informs me they're ok without this for now, downgrading to P2.

Please look at the number of new web-compat duplicates from comment 12, and maybe reconsider.

Flags: needinfo?(snorp)

We're actually handling this in Bug 1432949, which :owlish is working Right Now. Duping this one.

Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(snorp)
Resolution: --- → DUPLICATE
Keywords: enterprise
Whiteboard: [wfh]
You need to log in before you can comment on or make changes to this bug.