-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Open
Open
Copy link
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Description
This issue tracks solving the root issue discussed in #125971. To summarize the issue, flutter daemon
occasionally exits when trying to run adb devices -l
due to the command completing with an error. Source of this call:
flutter/packages/flutter_tools/lib/src/android/android_device_discovery.dart
Lines 70 to 80 in ce822ec
try { | |
text = (await _processUtils.run(<String>[_androidSdk!.adbPath!, 'devices', '-l'], | |
throwOnError: true, | |
)).stdout.trim(); | |
} on ProcessException catch (exception) { | |
throwToolExit( | |
'Unable to run "adb", check your Android SDK installation and ' | |
'$kAndroidHome environment variable: ${exception.executable}\n' | |
'Error details: ${exception.message}', | |
); | |
} |
See #125971 (comment), which includes the exception that comes from invoking adb devices -l
. Specifically, we see
daemon still not running
error: cannot connect to daemon at tcp:5037: Connection refused"}}]
While it's not clear what the root cause of this failure is, it's possible that the flutter tool could prevent or workaround it. See #125971 (comment). It's possible we can use something like adb reconnect
, which should restart the connection to the server from the host side.
AbdeMohlbi
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team