4

I have been having this strange issue for more than a couple weeks now:

Android 12, 12L, 13 Preview devices (emulator & physical) don't resolve local DNS anymore. I started noticing this issue in my android app. Any url or API with a domain name ending with '.local' return with an unknownHostException. Then, I even tried opening the url (i.e: mysite.itsys.local) using the chrome browser on the Android device and it gives errors like: "DNS_PROBE_FINISHED_NXDOMAIN" and "DNS_PROBE_STARTED".

The same url works fine on Android 8, 9, 10, 11, even some Android 12 devices with OS build before December 2021.

I noticed that any Android 12, 12L, 13 Preview devices I have tested with OS build after December 2021 do not resolve local DNS anymore.

What can really be going on in those latest Android 12 and above versions that is preventing them from loading urls that include '.local' in the domain name?

ngaspama
  • 371
  • 4
  • 10
  • Same here, lot of UnknownHostException since 10days without any change in my app – Jscti Mar 14 '22 at 09:14
  • Sadly, is very known situation from about november 2021 https://support.google.com/pixelphone/thread/139593141/local-dns-resolution-suddenly-stopped-working?hl=en https://issuetracker.google.com/issues/140786115 – Deviling Master Mar 23 '22 at 16:15
  • Still seems to be a problem with the final builds (Android 12 Pixel 5). Did anyone find a workaround or is it working for you all now? – behelit May 02 '22 at 03:46
  • I have an Android 12 tablet and Android 13 phone and both have this issue when I try connecting to my Linux systems such as RPi or work laptop by `[hostname].local`. However, one thing I haven't seen mentioned much (maybe my issue is slightly different?) is that it works fine for a random amount of time (seconds to days) after connecting to wifi and then suddenly stops resolving. Restarting wifi works as a temporary workaround about half the time, seems more successful if I leave it off a little longer and terminate (swipe away) apps like browsers that were using the domain before reopening. – Pilot_51 Mar 13 '23 at 14:50

1 Answers1

3

Looks like it is actually the opposite: Starting with Android 12, Android for the first time actually resolves .local domains correctly: They are reserved for mDNS/zeroconf domain resolution according to RFC6762 and must be resolved by the link-local multicast address 224.0.0.251. It is forbidden to use this kind of domain name for none-mDNS addresses.

If you want to have local domain names which are not mDNS based, you have to use a different ending like .intranet to avoid a collision with mDNS addresses.

Martin
  • 96
  • 5
  • or when you try to consume an api it might work to use the url without .local. Try (on mac e.g.) nslookup and when you receive a result the api should be accessible – Lars Jun 14 '22 at 06:22
  • Not sure if Google intents to do what you are saying but I just verified that .local domains work now on Android 13 (final release on Pixel phones so far). – ngaspama Aug 24 '22 at 14:36