Open Bug 1445924 Opened 6 years ago Updated 2 months ago

Support protocol_handlers on Android

Categories

(WebExtensions :: Android, enhancement, P3)

59 Branch
enhancement

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: lidel, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Whiteboard: [addons-jira])

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Build ID: 20180310025718

Steps to reproduce:

Support for sugar-coating around nav.registerProtocolHandler was added to WebExtension in https://bugzilla.mozilla.org/show_bug.cgi?id=1310427 (Firefox 54).
It enabled browser extension to provide a simplified redirect-based handler via manifest.json

Support for use of `dweb`,`ipfs`,`ipns` and other protocols without `web-` prefix was added in Firefox 59 (https://bugzilla.mozilla.org/show_bug.cgi?id=1428446).

Both features work fine on desktop (tested with Firefox 59).

Unfortunately Firefox for Android Beta (59) is does not seem to support `protocol_handlers` correctly.

Steps to reproduce:

1. Open Firefox for Android Beta (59) 
2. Load WebExtension with support for custom protocol in `protocol_handlers` listed in its `manifest.json`, lets call it `foo://`
3. Type  `foo://bar`  in address bar and press ENTER


Actual results:

Nothing happened. No error, no UI change. 


Expected results:

Firefox for Android should display a dialog in which user selects handler for the protocol.
Example from desktop version: https://goo.gl/R8bgt7
Component: Add-on Manager → WebExtensions: Android
Product: Firefox for Android → Toolkit
Version: Firefox 59 → 59 Branch
Hi James,
I have briefly looked if the protocol handlers specified in the manifest.json of a WebExtension are actually registered successfully on Firefox for Android and it seems that they are (the protocol handlers are registered from here: https://searchfox.org/mozilla-central/rev/49cc27555d5b7ed2eb06baf156693dd578daa06f/toolkit/components/extensions/ext-protocolHandlers.js#26-44).

Nevertheless they doesn't seem to be used anywhere on Firefox for Android (and I haven't found anything about them in the Fennec internals, on the contrary I found the ones coming from the OS, here: https://searchfox.org/mozilla-central/rev/49cc27555d5b7ed2eb06baf156693dd578daa06f/mobile/android/components/ContentDispatchChooser.js#50, which seems to be basically the intents on Android, at least if I'm reading it correctly).

And so at a first glance, it seems that the WebExtensions protocol_handlers manifest property is not working on Firefox on Android because the registered handlers are not currently used anywhere yet.

Can you confirm if I'm right and this is actually the case?

If it is, it would be great to block this issue on a "Firefox for Android" issue related to implementing the missing bits, at least if it is something that is going to be supported in the future.
Flags: needinfo?(snorp)
(In reply to Luca Greco [:rpl] from comment #1)
> 
> Can you confirm if I'm right and this is actually the case?
> 
> If it is, it would be great to block this issue on a "Firefox for Android"
> issue related to implementing the missing bits, at least if it is something
> that is going to be supported in the future.

Your analysis looks correct to me.
Flags: needinfo?(snorp)
Blocks: libdweb
Product: Toolkit → WebExtensions
Priority: -- → P3
Summary: Missing support for protocol_handlers in WebExtension manifest → Support protocol_handlers on Android
Flags: needinfo?(eiyw299)
Flags: needinfo?(eiyw299)
Flags: needinfo?(eiyw299)

ขอบคุณคับ

Flags: needinfo?(eiyw299)
Flags: needinfo?(eiyw299)
Severity: normal → S3
Whiteboard: [addons-jira]
See Also: → 1342577

Clear a needinfo that is pending on an inactive user.

Inactive users most likely will not respond; if the missing information is essential and cannot be collected another way, the bug maybe should be closed as INCOMPLETE.

For more information, please visit auto_nag documentation.

Flags: needinfo?(eiyw299)

Clear a needinfo that is pending on an inactive user.

Inactive users most likely will not respond; if the missing information is essential and cannot be collected another way, the bug maybe should be closed as INCOMPLETE.

For more information, please visit BugBot documentation.

Flags: needinfo?(Kaushal.trr)
You need to log in before you can comment on or make changes to this bug.