How do I troubleshoot Flutter desktop not running on Windows?

  desktop, flutter, virtualbox, windows

I have a fresh VM running Windows 10 Pro in Virtualbox, updated with Flutter installed.

Windows Flutter apps will not launch, and I can’t seem to find any information through the error message.

flutter devices

1 connected device:

Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19042.804]

flutter doctor -v

[✓] Flutter (Channel dev, 1.27.0-4.0.pre, on Microsoft Windows [Version 10.0.19042.804], locale en-US)
    • Flutter version 1.27.0-4.0.pre at C:toolsflutter
    • Framework revision f8cd24de95 (7 days ago), 2021-02-16 11:24:17 -0800
    • Engine revision 1d537824d6
    • Dart version 2.13.0 (build 2.13.0-30.0.dev)

[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.8.6)
    • Visual Studio at C:Program Files (x86)Microsoft Visual Studio19Community
    • Visual Studio Community 2019 version 16.8.31019.35
    • Windows 10 SDK version 10.0.18362.0

[✓] VS Code (version 1.53.2)
    • VS Code at C:UsersMerrittAppDataLocalProgramsMicrosoft VS Code
    • Flutter extension version 3.19.0

[✓] Connected device (1 available)
    • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19042.804]

• No issues found!

flutter create myapp

Creating project myapp...
  myapp.gitignore (created)
  myapp.idealibrariesDart_SDK.xml (created)
  myapp.idealibrariesKotlinJavaRuntime.xml (created)
  myapp.ideamodules.xml (created)
  myapp.idearunConfigurationsmain_dart.xml (created)
  myapp.ideaworkspace.xml (created)
  myapp.metadata (created)
  myappandroidappbuild.gradle (created)
  myappandroidappsrcmainkotlincomexamplemyappMainActivity.kt (created)
  myappandroidbuild.gradle (created)
  myappandroidmyapp_android.iml (created)
  myappandroid.gitignore (created)
  myappandroidappsrcdebugAndroidManifest.xml (created)
  myappandroidappsrcmainAndroidManifest.xml (created)
  myappandroidappsrcmainresdrawablelaunch_background.xml (created)
  myappandroidappsrcmainresdrawable-v21launch_background.xml (created)
  myappandroidappsrcmainresmipmap-hdpiic_launcher.png (created)
  myappandroidappsrcmainresmipmap-mdpiic_launcher.png (created)
  myappandroidappsrcmainresmipmap-xhdpiic_launcher.png (created)
  myappandroidappsrcmainresmipmap-xxhdpiic_launcher.png (created)
  myappandroidappsrcmainresmipmap-xxxhdpiic_launcher.png (created)
  myappandroidappsrcmainresvaluesstyles.xml (created)
  myappandroidappsrcmainresvalues-nightstyles.xml (created)
  myappandroidappsrcprofileAndroidManifest.xml (created)
  myappandroidgradlewrappergradle-wrapper.properties (created)
  myappandroidgradle.properties (created)
  myappandroidsettings.gradle (created)
  myappiosRunnerAppDelegate.swift (created)
  myappiosRunnerRunner-Bridging-Header.h (created)
  myappiosRunner.xcodeprojproject.pbxproj (created)
  myappiosRunner.xcodeprojxcshareddataxcschemesRunner.xcscheme (created)
  myappios.gitignore (created)
  myappiosFlutterAppFrameworkInfo.plist (created)
  myappiosFlutterDebug.xcconfig (created)
  myappiosFlutterRelease.xcconfig (created)
  myappiosRunnerAssets.xcassetsAppIcon.appiconsetContents.json (created)
  my[email protected]1x.png (created)
  [email protected].png (created)
  [email protected].png (created)
  myappiosRunnerAssets.xcassetsAppIcon.appicons[email protected] (created)
  [email protected].png (created)
  [email protected].png (created)
  [email protected].png (created)
  [email protected].png (created)
  [email protected].png (created)
  [email protected].png (created)
  [email protected].png (created)
  [email protected].png (created)
  [email protected].png (created)
  [email protected].png (created)
  my[email protected]2x.png (created)
  myappiosRunnerAssets.xcassetsLaunchImage.imagesetContents.json (created)
  myappiosRunnerAssets.xcassetsLaunchImage.imagesetLaunchImage.png (created)
  [email protected]png (created)
  [email protected]png (created)
  myappiosRunnerAssets.xcassetsLaunchImage.imagesetREADME.md (created)
  myappiosRunnerBase.lprojLaunchScreen.storyboard (created)
  myappiosRunnerBase.lprojMain.storyboard (created)
  myappiosRunnerInfo.plist (created)
  myappiosRunner.xcodeprojproject.xcworkspacecontents.xcworkspacedata (created)
  myappiosRunner.xcodeprojproject.xcworkspacexcshareddataIDEWorkspaceChecks.plist (created)
  myappiosRunner.xcodeprojproject.xcworkspacexcshareddataWorkspaceSettings.xcsettings (created)
  myappiosRunner.xcworkspacecontents.xcworkspacedata (created)
  myappiosRunner.xcworkspacexcshareddataIDEWorkspaceChecks.plist (created)
  myappiosRunner.xcworkspacexcshareddataWorkspaceSettings.xcsettings (created)
  myapplibmain.dart (created)
  myappmyapp.iml (created)
  myapppubspec.yaml (created)
  myappREADME.md (created)
  myapptestwidget_test.dart (created)
  myappwindows.gitignore (created)
  myappwindowsCMakeLists.txt (created)
  myappwindowsflutterCMakeLists.txt (created)
  myappwindowsrunnerCMakeLists.txt (created)
  myappwindowsrunnerflutter_window.cpp (created)
  myappwindowsrunnerflutter_window.h (created)
  myappwindowsrunnermain.cpp (created)
  myappwindowsrunnerresource.h (created)
  myappwindowsrunnerresourcesapp_icon.ico (created)
  myappwindowsrunnerrunner.exe.manifest (created)
  myappwindowsrunnerRunner.rc (created)
  myappwindowsrunnerrun_loop.cpp (created)
  myappwindowsrunnerrun_loop.h (created)
  myappwindowsrunnerutils.cpp (created)
  myappwindowsrunnerutils.h (created)
  myappwindowsrunnerwin32_window.cpp (created)
  myappwindowsrunnerwin32_window.h (created)
Running "flutter pub get" in myapp...                            1,153ms
Wrote 90 files.

All done!
In order to run your application, type:

  $ cd myapp
  $ flutter run

To enable null safety, type:

  $ cd myapp
  $ dart migrate --apply-changes

Your application code is in myapplibmain.dart.

cd myapp

flutter run -d windows

Launching libmain.dart on Windows in debug mode...
Building Windows application...
Lost connection to device.
Activating Dart DevTools...                                      1,403ms

^ Hangs indefinitely

Running in VSCode

Launching libmain.dart on Windows in debug mode...
libmain.dart:1
Connecting to VM Service at ws://127.0.0.1:50470/laIfc9Hl43s=/ws
Error handling 'checkPlatformOverride' custom request: method not available: ext.flutter.platformOverride
Error handling 'checkBrightnessOverride' custom request: method not available: ext.flutter.brightnessOverride
Error handling 'serviceExtension' custom request: method not available: ext.flutter.inspector.setPubRootDirectories
Error handling 'checkIsWidgetCreationTracked' custom request: method not available: ext.flutter.inspector.isWidgetCreationTracked
Lost connection to device.
Exited (sigterm)

I am at a loss as to what to try next, and this exact setup works fine in VMWare, just not Virtualbox – and VMWare has been giving me no end of headaches.

Source: Windows Questions

LEAVE A COMMENT