Skip to content

Failed to initialize connection to any devices after upgrading to v3.3.0 #1919

@samcsk

Description

@samcsk

Steps to reproduce:

Dart Code v3.3.0, Flutter Code v3.3.0

1. Pressing F5 in editor
2. Selecting 'Start pixel_2 mobile emulator' at the 'Select a device to use' menu.

Available options:

Start pixel_2 mobile emulator
Create Android Emulator

*Despite an adb debuggable device was connected, no other devices were shown in the list.

3. The following error messages were shown, depending on the AVD was already running or not:

If already running...

Cannot launch without an active device
Failed to launch pixel_2: emulator: ERROR: Running multiple emulators with the same AVD is an experimental feature. Please use -read-only flag to enable this feature.

If not running...

Launching pixel_2...
Android emulator launching
Waiting for pixel_2 to connect...
Android emulator launched
Failed to launch pixel_2: Error: Emulator didn't connect within 60 seconds

*Similar behavior was observed if 'Create Android Emulator' was selected in Step 2.

4. No messages were logged in 'DEBUG CONSOLE' of VS Code

The above issue was also observed under Dart Code v3.3.0, Flutter Code v3.2.0

The above issue was not observed under
Dart Code v3.2.1, Flutter Code v3.3.0 nor Dart Code v3.2.1, Flutter Code v3.2.0
and everything behaves normally.

Everything also works normally if using flutter commands manually in terminal, e.g. flutter devices or flutter run -d <deviceID>

Log:

Dart Code extension: 3.3.0
Flutter extension: 3.3.0 (not activated)
VS Code: 1.36.1
Platform: win
Workspace type: Flutter
Multi-root?: false
Dart SDK:
    Loc: C:\flutter\bin\cache\dart-sdk
    Ver: 2.4.0
Flutter SDK:
    Loc: C:\flutter
    Ver: 1.7.8+hotfix.4
HTTP_PROXY: undefined
NO_PROXY: undefined

[11:28:13 PM] [General] [Info] Starting debug session...
[11:28:13 PM] [General] [Info]     workspace: C:\Users\Username\Documents\Code\project_name
[11:28:13 PM] [General] [Info] Using found common entry point: C:\Users\Username\Documents\Code\project_name\lib\main.dart
[11:28:13 PM] [General] [Info] Using workspace as cwd: C:\Users\Username\Documents\Code\project_name
[11:28:13 PM] [General] [Info] Detected launch project as Flutter
[11:28:13 PM] [General] [Info] Using Flutter debug adapter for this session
[11:28:13 PM] [FlutterDaemon] [Info] ==> [{"id":"10","method":"daemon.getSupportedPlatforms","params":{"projectRoot":"C:\\Users\\Username\\Documents\\Code\\project_name"}}]
[11:28:13 PM] [FlutterDaemon] [Info] <== [{"id":"10","result":{"platforms":["ios","android"]}}]
[11:28:13 PM] [FlutterDaemon] [Info] ==> [{"id":"11","method":"emulator.getEmulators"}]
[11:28:13 PM] [FlutterDaemon] [Info] <== [{"id":"11","result":[{"id":"Pixel_2_API_28","name":"pixel_2","category":"mobile","platformType":"android"}]}]
[11:28:14 PM] [FlutterDaemon] [Info] ==> [{"id":"12","method":"emulator.launch","params":{"emulatorId":"Pixel_2_API_28"}}]
[11:28:16 PM] [FlutterDaemon] [Info] <== [{"id":"12","error":"emulator: ERROR: Running multiple emulators with the same AVD is an experimental feature.\r\nPlease use -read-only flag to enable this feature.","trace":"#0      AndroidEmulator.launch.<anonymous closure> (package:flutter_tools/src/android/android_emulator.dart:58:17)\n#1      _rootRunUnary (dart:async/zone.dart:1132:38)\n#2      _CustomZone.runUnary (dart:async/zone.dart:1029:19)\n#3      _FutureListener.handleValue (dart:async/future_impl.dart:126:18)\n#4      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)\n#5      Future._propagateToListeners (dart:async/future_impl.dart:668:32)\n#6      Future._completeWithValue (dart:async/future_impl.dart:483:5)\n#7      Future.wait.<anonymous closure> (dart:async/future.dart:400:22)\n#8      _rootRunUnary (dart:async/zone.dart:1132:38)\n#9      _CustomZone.runUnary (dart:async/zone.dart:1029:19)\n#10     _FutureListener.handleValue (dart:async/future_impl.dart:126:18)\n#11     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)\n#12     Future._propagateToListeners (dart:async/future_impl.dart:668:32)\n#13     Future._complete (dart:async/future_impl.dart:473:7)\n#14     Stream.fold.<anonymous closure> (dart:async/stream.dart:742:18)\n#15     _rootRun (dart:async/zone.dart:1120:38)\n#16     _CustomZone.run (dart:async/zone.dart:1021:19)\n#17     _CustomZone.runGuarded (dart:async/zone.dart:923:7)\n#18     _BufferingStreamSubscription._sendDone.sendDone (dart:async/stream_impl.dart:389:13)\n#19     _BufferingStreamSubscription._sendDone (dart:async/stream_impl.dart:399:15)\n#20     _BufferingStreamSubscription._close (dart:async/stream_impl.dart:283:7)\n#21     _SinkTransformerStreamSubscription._close (dart:async/stream_transformers.dart:96:11)\n#22     _EventSinkWrapper.close (dart:async/stream_transformers.dart:23:11)\n#23     _WindowsCodePageDecoderSink.close (dart:io/string_transformer.dart:124:11)\n#24     _ConverterStreamEv…
[11:28:16 PM] [General] [Warn] Unable to launch due to no active device

flutter doctor -v:

[√] Flutter (Channel stable, v1.7.8+hotfix.4, on Microsoft Windows [Version 10.0.18362.264], locale en-__)
    • Flutter version 1.7.8+hotfix.4 at C:\flutter
    • Framework revision 20e59316b8 (3 weeks ago), 2019-07-18 20:04:33 -0700
    • Engine revision fee001c93f
    • Dart version 2.4.0

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
    • Android SDK at C:\Users\Username\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.1
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[√] Android Studio (version 3.4)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 38.1.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[√] VS Code (version 1.36.1)
    • VS Code at C:\Users\Username\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.2.0

[√] Connected device (2 available)
    • ONEPLUS A3003             • placeholder  • android-arm64 • Android 9 (API 28)
    • Android SDK built for x86 • emulator-5554 • android-x86   • Android 9 (API 28) (emulator)

My current workaround: Downgrading to Dart-Code v3.2.1
Possibly related issues: #1885, #1878

Many thanks.
I'd love to use the new Flutter Outline feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting infoRequires more information from the customer to progressin flutterRelates to running Flutter appsis bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions