mozilla-mobile / fenix

⚠️ Fenix (Firefox for Android) moved to a new repository. It is now developed and maintained as part of: https://github.com/mozilla-mobile/firefox-android
https://github.com/mozilla-mobile/firefox-android
Mozilla Public License 2.0
6.47k stars 1.27k forks source link

Network Service Discovery not supported #16835

Closed peey closed 1 year ago

peey commented 3 years ago

Steps to reproduce

On a LAN, fire up a linux machine with avahi-daemon (or equivalent mdns program).

On firefox, try to visit machine-name.local:port

Expected behavior

We're able to connect to machine-name.local:port

Actual behavior

"Unable to connect" error message

Device information


Please note that while searching for mDNS support on android in general, I found a few articles from several years ago saying it's not supported by the OS, but I found a claim about support being available in Android API 16 and up via "Network Service Discovery" library.

┆Issue is synchronized with this Jira Task

novirium commented 3 years ago

The lack of mDNS support (specifically, being able to resolve .local domains) on Android browsers has been a giant pain for anyone developing or using IoT devices for years now. That said, I think there's some confusion over what's actually needed here, and what the Android native NSD provides (which people keep mentioning whenever this comes up).

Android NSD provides network discovery, and only network discovery (using DNS Service Discovery). It's clearly using mDNS internally, but it doesn't actually provide any interface to resolve a specific .local domain (like a user would enter into an address bar) on demand - instead the only way to use it is to activate the listener and sit there, hoping that the desired .local address shows up. It really isn't intended for this use-case - it's intended to be able to present a user with a list of discovered devices that support a given service, and for the user to then select one.

Instead, what would be really useful would be just plain mDNS support, able to acquire an Android multicast lock and resolve a .local domain query when it is entered into the address bar. I expect this would have to be implemented from scratch though - the only implementations I've seen working on Android (like DotLocalFinder) have been based on low level implementations like the MDNSJava library.

This would not only open up a whole range of IoT user interactions (many local network devices with a web interface register a .local address for it with mDNS), but Firefox would become the only Android browser supporting it - the standard response to users asking why their .local address isn't working would become: "Well, yeah - you need to be using Firefox!"

stale[bot] commented 3 years ago

See: https://github.com/mozilla-mobile/fenix/issues/17373 This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

peey commented 3 years ago

bump to prevent closing unless maintainers really think this is a wontfix

stale[bot] commented 2 years ago

See: https://github.com/mozilla-mobile/fenix/issues/17373 This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

peey commented 2 years ago

bump

certuna commented 2 years ago

Any changes now that Android 12 has added mDNS support?

stale[bot] commented 1 year ago

See: https://github.com/mozilla-mobile/fenix/issues/17373 This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

peey commented 1 year ago

bump

Toby-Haynes commented 1 year ago

Note: Chrome browser does support.local addresses

Toby-Haynes commented 1 year ago

On Linux I can use the mDns extension which includes a listener as suggested above.

csadilek commented 1 year ago

Moved to bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1810175

Change performed by the Move to Bugzilla add-on.