Repository navigation
Description
Steps to reproduce
-
Connect an Android device through wireless ADB.
-
Confirm that
adb devices -lreports a long mDNS serial with a conflict suffix and one space before the state:adb-0123456789abcdef (2)._adb-tls-connect._tcp device product:socrates model:Example_Device device:socrates transport_id:1 -
Run:
flutter devices -v
-
Observe that Flutter Tools reads the ADB output but rejects the Android device row.
Expected results
Flutter Tools preserves the complete serial, including (2)._adb-tls-connect._tcp, lists the Android device, and uses that complete serial for subsequent adb -s commands.
Actual results
On upstream/master at 0ed149e63db1f68d2042063baf0a99d969ccd84b, Flutter Tools omits the Android device and reports an unexpected ADB parsing failure.
PR #189369 introduced a strict two-space-or-tab boundary so serials containing whitespace are not split at their first space. That remains an important regression case. Issue #189430 was closed as fixed by #189369, and PR #189431 was closed after #189369 landed. The subsequent reports on #189430 showed that the one-space case still reproduced on current master.
The row above combines both properties: an mDNS conflict suffix adds whitespace within the serial, while ADB emits one space before the state. Neither earlier rule can accept this valid long-list row.
Code sample
Code sample
No Dart application code is required because this is a Flutter Tools parser failure. The minimal command-line reproduction is:
adb devices -l
flutter devices -vADB emits long-list rows in append_transport using %-22s %s. The serial column is a minimum width, not a fixed delimiter: serials that are at least 22 characters long have one space before the connection state. mDNS conflict suffixes can also add whitespace within the serial.
The proposed Flutter Tools test supplies the row above through the existing fake ADB process and verifies that the complete serial is preserved.
Screenshots or Video
Screenshots / Video demonstration
Not applicable. This is a command-line device-discovery parsing failure; the text logs below show the complete failing row and Flutter Tools result.
Logs
Logs
$ adb devices -l
List of devices attached
adb-0123456789abcdef (2)._adb-tls-connect._tcp device product:socrates model:Example_Device device:socrates transport_id:1
$ flutter devices -v
List of devices attached
adb-0123456789abcdef (2)._adb-tls-connect._tcp device product:socrates model:Example_Device device:socrates transport_id:1
Found 3 connected devices:
Windows (desktop)
Chrome (web)
Edge (web)
Unexpected failure parsing device information from adb output:
adb-0123456789abcdef (2)._adb-tls-connect._tcp device product:socrates model:Example_Device device:socrates transport_id:1The failure persists after deleting bin/cache/flutter_tools.snapshot and allowing Flutter Tools to rebuild.
Flutter Doctor output
Doctor output
The following was collected from the unmodified master baseline at framework revision 0ed149e63db1f68d2042063baf0a99d969ccd84b. The wireless device was not connected at the moment this Doctor command ran; the device and failing ADB row are shown in the reproduction logs above.
[!] Flutter (Channel master, 3.47.0-1.0.pre-201, on Microsoft Windows [Version 10.0.26200.8875], locale zh-CN) [3.5s]
• Flutter version 3.47.0-1.0.pre-201 on channel master
! The flutter binary is not on your path.
! The dart binary is not on your path.
! Upstream repository https://github.com/Ram-Dawson/flutter.git is not a standard remote.
• Framework revision 0ed149e63d (2026-07-23 20:34:05 -0400)
• Engine revision 0ed149e63d
• Dart version 3.14.0 (build 3.14.0-60.0.dev)
• DevTools version 2.60.0
• Pub download mirror https://pub.dev
• Flutter download mirror https://storage.flutter-io.cn
[√] Windows Version (Windows 11 or higher, 25H2, 2009)
[√] Android toolchain - develop for Android devices (Android SDK version 37.0.0)
• Android SDK at D:\Local\Android\Sdk
• Emulator version 36.6.11.0 (build_id 15507667)
• Platform android-37.0, build-tools 37.0.0
• ANDROID_HOME = D:\Local\Android\Sdk
• Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 21.0.10+-14961533-b1163.108)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop Windows apps (Visual Studio Community 2026 18.8.0)
• Visual Studio at D:\Code\Microsoft Visual Studio\18\Community
• Visual Studio Community 2026 version 18.8.12009.203
• Windows 10 SDK version 10.0.26100.0
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.26200.8875]
• Chrome (web) • chrome • web-javascript • Google Chrome 150.0.7871.182
• Edge (web) • edge • web-javascript • Microsoft Edge 150.0.4078.65
[√] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category.
Activity
puneetkukreja98 commentedon Jul 24, 2026
@Ram-Dawson Thanks for reporting the issue, is the case you mentioned in your #189430 (comment) after this #189430 was closed the same as this issue?
Ram-Dawson commentedon Jul 24, 2026
@puneetkukreja98 Yes, that's correct.
The scenario I mentioned in my comment on #189430 was closed before it was fully resolved, as #189369 didn't cover this edge case.
This new issue and PR (#189973) serve as a follow-up to complement and supersede my previous submission. It provides a more comprehensive fix that addresses the limitations of the earlier proposal—specifically handling mDNS conflict serials with internal whitespace (like the (2) suffix) paired with ADB's single-space delimiter formatting.
puneetkukreja98 commentedon Jul 27, 2026
@Ram-Dawson Thanks for the response, routing this to team-android for further investigation.
fix(tool): parse ADB device lists by connection state (flutter#189973)
github-actions commentedon Aug 12, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.