Skip to content

flutter emulators --launch crash when running via VM with --preview-dart-2 #18995

@DanTup

Description

@DanTup

When working on Flutter I often run flutter_tools through the VM (dart bin/flutter_tools.dart doctor). Today I did this but had --preview-dart-2 enabled for the VM and I hit this crash (it was trying to launch an emulator):

Flutter crash report; please file at https://github.com/flutter/flutter/issues.

command

flutter emulators --launch fl

exception

_TypeError: type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'Map<String, String>'

#0      VsCode._getVersionFromPackageJson (package:flutter_tools/src/vscode/vscode.dart:185:49)
#1      new VsCode.fromDirectory (package:flutter_tools/src/vscode/vscode.dart:64:34)
#2      VsCode._findInstalled (package:flutter_tools/src/vscode/vscode.dart:170:25)
#3      VsCode._installedWindows (package:flutter_tools/src/vscode/vscode.dart:132:12)
#4      VsCode.allInstalled (package:flutter_tools/src/vscode/vscode.dart:80:14)
#5      VsCodeValidator.installedValidators (package:flutter_tools/src/vscode/vscode_validator.dart:20:10)
#6      _DefaultDoctorValidatorsProvider.validators (package:flutter_tools/src/doctor.dart:57:44)
#7      Doctor.validators (package:flutter_tools/src/doctor.dart:80:46)
#8      Doctor.workflows (package:flutter_tools/src/doctor.dart:94:36)
#9      EmulatorsCommand.runCommand (package:flutter_tools/src/commands/emulators.dart:37:16)
<asynchronous suspension>
#10     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:347:18)
#11     _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/libasync_patch.dart:77:64)
#12     _rootRunUnary (dart:async/zone.dart:1134:38)
#13     _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#14     _FutureListener.handleValue (dart:async/future_impl.dart:129:18)
#15     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:638:45)
#16     Future._propagateToListeners (dart:async/future_impl.dart:667:32)
#17     Future._complete (dart:async/future_impl.dart:472:7)
#18     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#19     _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async/runtime/libasync_patch.dart:33:20)
#20     _rootRun (dart:async/zone.dart:1126:13)
#21     _CustomZone.run (dart:async/zone.dart:1023:19)
#22     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:949:23)
#23     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#24     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#25     _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:113:13)
#26     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:166:5)

flutter doctor

[✓] Flutter (Channel improve-integration-tests, v0.5.6-pre.131, on Microsoft Windows [Version 10.0.17134.112], locale en-GB)
    • Flutter version 0.5.6-pre.131 at M:\Coding\Applications\Google\flutter
    • Framework revision 1007db9437 (77 minutes ago), 2018-07-02 13:27:40 +0100
    • Engine revision 6fe748490d
    • Dart version 2.0.0-dev.63.0.flutter-4c9689c1d2

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.0)
    • Android SDK at M:\Apps\Android
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
    • All Android licenses accepted.

• No issues found!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions