Open guyluz11 opened 6 months ago
@guyluz11 You mention above that this is a regression. Which version onwards you are seeing this failure. That would help us track down the potential change which could have triggered the regression.
I can't really tell sorry, I'm pretty sure it worked a year ago.
@guyluz11 Have you also upgraded the version of Android you are using or is it the same version you had when it was working? I am trying to determine if there could be a potential regression in Android OS.
Android version got upgraded as well
InternetAddress.reverse() uses getnameinfo
on Android.
Android 14 has already been released on Samsung phones. I am testing on Samsung Galaxy s21 Ultra, Android 14, One UI 6.0. Can someone test on Android 13?
I have the same problem, tested on Android emulator starting from version 9
Not sure if there is anything to do on the Dart side if this is a regression in Android's getnameinfo function.
Reverse DNS lookup on LAN IP Android does not work in the last Flutter version. I understand that this is dart-lang and my issue is with Flutter Android but I got redirected https://github.com/flutter/flutter/issues/140506
Can reproduce for Android, tested also on Flutter Linux and couldn't reproduce. I think this is a regression. Only for local IP (LAN).
<uses-permission android:name="android.permission.INTERNET"/>
ip_with_host_name
with the IP you found.Getting an error in the console that the devices can't be found.
Logs
Logs
```console E/flutter ( 6212): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: SocketException: Failed reverse host lookup (OS Error: hostname nor servname provided, or not known, errno = 8), address = 192.168.31.81 E/flutter ( 6212): #0 _NativeSocket.reverseLookup.Code sample
Code sample
```dart import 'dart:io'; import 'package:flutter/material.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, ), home: const MyHomePage(), ); } } class MyHomePage extends StatefulWidget { const MyHomePage({super.key}); @override StateFlutter Doctor output
Doctor output
```console Flutter 3.16.5 • channel stable • https://github.com/flutter/flutter.git Framework • revision 78666c8dc5 (2 days ago) • 2023-12-19 16:14:14 -0800 Engine • revision 3f3e560236 Tools • Dart 3.2.3 • DevTools 2.28.4 ```