Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: DeviceInfoPlugin class on Windows 10 crashes when windowsInfo is called. #2957

Open
8 tasks done
pankaj-nikam opened this issue May 23, 2024 · 11 comments
Open
8 tasks done
Labels
bug Something isn't working triage

Comments

@pankaj-nikam
Copy link

Platform

Windows 10

Plugin

device_info_plus

Version

10.1.0

Flutter SDK

3.22.1

Steps to reproduce

  1. Create a new flutter project
  2. Add plugin device_info_plus
  3. In main method should look like this:
  4. void main() async { DeviceInfoPlugin deviceInfo = DeviceInfoPlugin(); print(await deviceInfo.windowsInfo); }
  5. It crashes with
    Exception has occurred.
    WindowsException (Error 0x00000000: The operation completed successfully.)

Code Sample

void main() async {
  DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
  print(await deviceInfo.windowsInfo);
}

Logs

PS C:\dev\src\demo_world> flutter run --verbose
[ +242 ms] Unable to locate an Android SDK.
[ +143 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.       
[   +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.       
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.     
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.     
[   +1 ms] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +143 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +6 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +82 ms] Connected devices:
[   +4 ms] Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19045.3030]
[   +1 ms] Edge (web)        • edge    • web-javascript • Microsoft Edge 125.0.2535.51
[   +1 ms] [1]: Windows (windows)
[   +1 ms] [2]: Edge (edge)
[   +2 ms] Please choose one (or "q" to quit)
[   +1 ms] : 
[+5692 ms] 1
[  +13 ms] Skipping pub get: version match.
[  +38 ms] Found plugin device_info_plus at C:\Users\Pankaj\AppData\Local\Pub\Cache\hosted\pub.dev\device_info_plus-10.1.0\
[ +107 ms] Found plugin device_info_plus at C:\Users\Pankaj\AppData\Local\Pub\Cache\hosted\pub.dev\device_info_plus-10.1.0\
[  +86 ms] Found plugin device_info_plus at C:\Users\Pankaj\AppData\Local\Pub\Cache\hosted\pub.dev\device_info_plus-10.1.0\
[  +52 ms] Generating C:\dev\src\demo_world\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[ +113 ms] No packages with native assets. Skipping native assets compilation.
[   +3 ms] Initializing file store
[  +11 ms] Skipping target: gen_localizations
[   +5 ms] gen_dart_plugin_registrant: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents: C:\dev\src\demo_world\.dart_tool\package_config_subset,C:\dev\src\demo_world\.dart_tool\flutter_build\dart_plugin_registrant.dart}
[  +19 ms] Found plugin device_info_plus at C:\Users\Pankaj\AppData\Local\Pub\Cache\hosted\pub.dev\device_info_plus-10.1.0\
[  +63 ms] gen_dart_plugin_registrant: Complete
[   +5 ms] Skipping target: _composite
[   +2 ms] complete
[   +6 ms] Launching lib\main.dart on Windows in debug mode...
[   +3 ms] C:\dev\sdk\flutter\bin\cache\dart-sdk\bin\dartaotruntime.exe --disable-dart-dev C:\dev\sdk\flutter\bin\cache\dart-sdk\bin\snapshots\frontend_server_aot.dart.snapshot --sdk-root C:\dev\sdk\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --incremental
--target=flutter --experimental-emit-debug-metadata -DFLUTTER_WEB_CANVASKIT_URL=https://www.gstatic.com/flutter-canvaskit/55eae6864b296dd9f43b2cc7577ec256e5c32a8d/ --output-dill C:\Users\Pankaj\AppData\Local\Temp\flutter_tools.60a4bede\flutter_tool.e68bc7fd\app.dill --packages
C:\dev\src\demo_world\.dart_tool\package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root --initialize-from-dill build\c4c2fe0666a8af71e108614a2500861d.cache.dill.track.dill --source
file:///C:/dev/src/demo_world/.dart_tool/flutter_build/dart_plugin_registrant.dart --source package:flutter/src/dart_plugin_registrant.dart -Dflutter.dart_plugin_registrant=file:///C:/dev/src/demo_world/.dart_tool/flutter_build/dart_plugin_registrant.dart --verbosity=error
--enable-experiment=alternative-invalidation-strategy
[  +38 ms] executing: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -format json -products * -utf8 -latest -version 16 -requires Microsoft.VisualStudio.Workload.NativeDesktop Microsoft.VisualStudio.Component.VC.Tools.x86.x64
Microsoft.VisualStudio.Component.VC.CMake.Project
[  +85 ms] Exit code 0 from: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -format json -products * -utf8 -latest -version 16 -requires Microsoft.VisualStudio.Workload.NativeDesktop Microsoft.VisualStudio.Component.VC.Tools.x86.x64
Microsoft.VisualStudio.Component.VC.CMake.Project
[   +1 ms] [
             {
               "instanceId": "c2782437",
               "installDate": "2024-05-23T02:51:28Z",
               "installationName": "VisualStudio/17.10.0+34916.146",
               "installationPath": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community",
               "installationVersion": "17.10.34916.146",
               "productId": "Microsoft.VisualStudio.Product.Community",
               "productPath": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\IDE\\devenv.exe",
               "state": 4294967295,
               "isComplete": true,
               "isLaunchable": true,
               "isPrerelease": false,
               "isRebootRequired": false,
               "displayName": "Visual Studio Community 2022",
               "description": "Powerful IDE, free for students, open-source contributors, and individuals",
               "channelId": "VisualStudio.17.Release",
               "channelUri": "https://aka.ms/vs/17/release/channel",
               "enginePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\resources\\app\\ServiceHub\\Services\\Microsoft.VisualStudio.Setup.Service",
               "installedChannelId": "VisualStudio.17.Release",
               "installedChannelUri": "https://aka.ms/vs/17/release/channel",
               "releaseNotes": "https://docs.microsoft.com/en-us/visualstudio/releases/2022/release-notes-v17.10#17.10.0",
               "resolvedInstallationPath": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community",
               "thirdPartyNotices": "https://go.microsoft.com/fwlink/?LinkId=661288",
               "updateDate": "2024-05-23T02:51:28.8003746Z",
               "catalog": {
                 "buildBranch": "d17.10",
                 "buildVersion": "17.10.34916.146",
                 "id": "VisualStudio/17.10.0+34916.146",
                 "localBuild": "build-lab",
                 "manifestName": "VisualStudio",
                 "manifestType": "installer",
                 "productDisplayVersion": "17.10.0",
                 "productLine": "Dev17",
                 "productLineVersion": "2022",
                 "productMilestone": "RTW",
                 "productMilestoneIsPreRelease": "False",
                 "productName": "Visual Studio",
                 "productPatchVersion": "0",
                 "productPreReleaseMilestoneSuffix": "8.0",
                 "productSemanticVersion": "17.10.0+34916.146",
                 "requiredEngineVersion": "3.10.2154.60269"
               },
               "properties": {
                 "campaignId": "2030:6674b87e45eb4884bf2088722de7c05c",
                 "channelManifestId": "VisualStudio.17.Release/17.10.0+34916.146",
                 "includeRecommended": "1",
                 "nickname": "",
                 "setupEngineFilePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\setup.exe"
               }
             }
           ]
[  +12 ms] Building Windows application...
[   +8 ms] <- compile package:demo_world/main.dart
[   +2 ms] executing: C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -S C:\dev\src\demo_world\windows -B C:\dev\src\demo_world\build\windows\x64 -G Visual Studio 17 2022 -A x64
-DFLUTTER_TARGET_PLATFORM=windows-x64
[  +57 ms] -- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
[  +19 ms] -- Configuring done (0.0s)
[ +286 ms] -- Generating done (0.3s)
[   +9 ms] -- Build files have been written to: C:/dev/src/demo_world/build/windows/x64
[   +8 ms] executing: C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe --build C:\dev\src\demo_world\build\windows\x64 --config Debug --target INSTALL --verbose
[  +60 ms] Change Dir: 'C:/dev/src/demo_world/build/windows/x64'
[   +1 ms] Run Build Command(s): "C:/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin/amd64/MSBuild.exe" INSTALL.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:n
[ +176 ms] MSBuild version 17.10.4+10fbfbf2e for .NET Framework
[  +89 ms] Build started 23-05-2024 10:51:28.
[ +233 ms] Project "C:\dev\src\demo_world\build\windows\x64\INSTALL.vcxproj" on node 1 (default targets).
[   +2 ms] Project "C:\dev\src\demo_world\build\windows\x64\INSTALL.vcxproj" (1) is building "C:\dev\src\demo_world\build\windows\x64\ZERO_CHECK.vcxproj" (2) on node 1 (default targets).
[   +1 ms] PrepareForBuild:
[        ]   Structured output is enabled. The formatting of compiler diagnostics will reflect the error hierarchy. See https://aka.ms/cpp/structured-output for more details.
[   +1 ms] InitializeBuildStatus:
[   +1 ms]   Creating "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[   +1 ms]   Touching "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild".
[  +15 ms] CustomBuild:
[   +1 ms]   All outputs are up-to-date.
[  +42 ms] FinalizeBuildStatus:
[   +1 ms]   Deleting file "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild".
[   +1 ms]   Touching "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\ZERO_CHECK.lastbuildstate".
[   +1 ms] Done Building Project "C:\dev\src\demo_world\build\windows\x64\ZERO_CHECK.vcxproj" (default targets).
[ +112 ms] Project "C:\dev\src\demo_world\build\windows\x64\INSTALL.vcxproj" (1) is building "C:\dev\src\demo_world\build\windows\x64\ALL_BUILD.vcxproj" (3) on node 1 (default targets).
[   +1 ms] Project "C:\dev\src\demo_world\build\windows\x64\ALL_BUILD.vcxproj" (3) is building "C:\dev\src\demo_world\build\windows\x64\runner\demo_world.vcxproj" (4) on node 1 (default targets).
[        ] Project "C:\dev\src\demo_world\build\windows\x64\runner\demo_world.vcxproj" (4) is building "C:\dev\src\demo_world\build\windows\x64\flutter\flutter_assemble.vcxproj" (5) on node 1 (default targets).
[        ] PrepareForBuild:
[        ]   Structured output is enabled. The formatting of compiler diagnostics will reflect the error hierarchy. See https://aka.ms/cpp/structured-output for more details.
[   +1 ms] InitializeBuildStatus:
[   +1 ms]   Creating "x64\Debug\flutter_assemble\flutter_assemble.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[        ]   Touching "x64\Debug\flutter_assemble\flutter_assemble.tlog\unsuccessfulbuild".
[   +5 ms] CustomBuild:
[        ]   "The build of 'C:\dev\src\demo_world\build\windows\x64\CMakeFiles\886f2ca41414e5ead02a7d0519f0deeb\flutter_assemble.rule' depends on 'C:\DEV\SRC\DEMO_WORLD\WINDOWS\FLUTTER\EPHEMERAL\FLUTTER_WINDOWS.DLL' which is produced by the build of
'C:\dev\src\demo_world\build\windows\x64\CMakeFiles\497f4401edb143bb2520c586079fe7c8\flutter_windows.dll.rule'. The items cannot be built in parallel."
[ +101 ms]   Generating C:/dev/src/demo_world/windows/flutter/ephemeral/flutter_windows.dll, C:/dev/src/demo_world/windows/flutter/ephemeral/flutter_export.h, C:/dev/src/demo_world/windows/flutter/ephemeral/flutter_windows.h,
C:/dev/src/demo_world/windows/flutter/ephemeral/flutter_messenger.h, C:/dev/src/demo_world/windows/flutter/ephemeral/flutter_plugin_registrar.h, C:/dev/src/demo_world/windows/flutter/ephemeral/flutter_texture_registrar.h,
C:/dev/src/demo_world/windows/flutter/ephemeral/cpp_client_wrapper/core_implementations.cc, C:/dev/src/demo_world/windows/flutter/ephemeral/cpp_client_wrapper/standard_codec.cc, C:/dev/src/demo_world/windows/flutter/ephemeral/cpp_client_wrapper/plugin_registrar.cc,
C:/dev/src/demo_world/windows/flutter/ephemeral/cpp_client_wrapper/flutter_engine.cc, C:/dev/src/demo_world/windows/flutter/ephemeral/cpp_client_wrapper/flutter_view_controller.cc, _phony_
[ +771 ms]   [ +274 ms] Unable to locate an Android SDK.
[  +46 ms]   [  +59 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[   +1 ms]   [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[   +1 ms]   [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +1 ms]   [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[   +1 ms]   [   +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[   +1 ms]   [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +111 ms]   [ +118 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[   +1 ms]   [        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[   +1 ms]   [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +1 ms]   [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ]   [   +2 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[   +1 ms]   [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'PubDependencies' is not required, skipping update.
[  +10 ms]   [  +23 ms] Initializing file store
[  +17 ms]   [  +17 ms] Done initializing file store
[  +59 ms]   [  +58 ms] Skipping target: native_assets
[   +1 ms]   [   +1 ms] Skipping target: gen_localizations
[   +3 ms]   [   +3 ms] Skipping target: gen_dart_plugin_registrant
[+2582 ms]   [+2581 ms] Skipping target: unpack_windows
[ +438 ms]   [ +438 ms] Skipping target: kernel_snapshot
[ +246 ms]   [ +245 ms] Skipping target: debug_bundle_windows-x64_assets
[   +1 ms]   [        ] Persisting file store
[  +18 ms]   [  +19 ms] Done persisting file store
[   +8 ms]   [   +8 ms] build succeeded.
[   +8 ms]   [   +7 ms] "flutter assemble" took 3,541ms.
[ +213 ms]   [ +213 ms] ensureAnalyticsSent: 209ms
[   +1 ms]   [        ] Running 0 shutdown hooks
[   +1 ms]   [        ] Shutdown hooks complete
[   +1 ms]   [        ] exiting with code 0
[  +82 ms] FinalizeBuildStatus:
[   +1 ms]   Deleting file "x64\Debug\flutter_assemble\flutter_assemble.tlog\unsuccessfulbuild".
[   +1 ms]   Touching "x64\Debug\flutter_assemble\flutter_assemble.tlog\flutter_assemble.lastbuildstate".
[        ] Done Building Project "C:\dev\src\demo_world\build\windows\x64\flutter\flutter_assemble.vcxproj" (default targets).
[  +23 ms] Project "C:\dev\src\demo_world\build\windows\x64\runner\demo_world.vcxproj" (4) is building "C:\dev\src\demo_world\build\windows\x64\flutter\flutter_wrapper_app.vcxproj" (6) on node 1 (default targets).
[   +1 ms] PrepareForBuild:
[   +1 ms]   Structured output is enabled. The formatting of compiler diagnostics will reflect the error hierarchy. See https://aka.ms/cpp/structured-output for more details.
[   +1 ms] InitializeBuildStatus:
[   +1 ms]   Creating "flutter_wrapper_app.dir\Debug\flutter_.0D346DEA.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[        ]   Touching "flutter_wrapper_app.dir\Debug\flutter_.0D346DEA.tlog\unsuccessfulbuild".
[   +1 ms] CustomBuild:
[        ]   All outputs are up-to-date.
[  +55 ms] ClCompile:
[   +1 ms]   All outputs are up-to-date.
[  +23 ms] Lib:
[   +1 ms]   All outputs are up-to-date.
[   +1 ms]   flutter_wrapper_app.vcxproj -> C:\dev\src\demo_world\build\windows\x64\flutter\Debug\flutter_wrapper_app.lib
[  +17 ms] FinalizeBuildStatus:
[        ]   Deleting file "flutter_wrapper_app.dir\Debug\flutter_.0D346DEA.tlog\unsuccessfulbuild".
[   +1 ms]   Touching "flutter_wrapper_app.dir\Debug\flutter_.0D346DEA.tlog\flutter_wrapper_app.lastbuildstate".
[   +1 ms] Done Building Project "C:\dev\src\demo_world\build\windows\x64\flutter\flutter_wrapper_app.vcxproj" (default targets).
[   +7 ms] PrepareForBuild:
[   +1 ms]   Structured output is enabled. The formatting of compiler diagnostics will reflect the error hierarchy. See https://aka.ms/cpp/structured-output for more details.
[   +1 ms] InitializeBuildStatus:
[        ]   Creating "demo_world.dir\Debug\demo_world.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[   +1 ms]   Touching "demo_world.dir\Debug\demo_world.tlog\unsuccessfulbuild".
[   +1 ms] CustomBuild:
[   +1 ms]   All outputs are up-to-date.
[  +22 ms] ClCompile:
[   +1 ms]   C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\CL.exe /c /IC:\dev\src\demo_world\windows /IC:\dev\src\demo_world\windows\flutter\ephemeral /IC:\dev\src\demo_world\windows\flutter\ephemeral\cpp_client_wrapper\include /Zi
/nologo /W4 /WX /diagnostics:column /Od /Ob0 /D _UNICODE /D UNICODE /D WIN32 /D _WINDOWS /D _HAS_EXCEPTIONS=0 /D _DEBUG /D "FLUTTER_VERSION=\"1.0.0+1\"" /D FLUTTER_VERSION_MAJOR=1 /D FLUTTER_VERSION_MINOR=0 /D FLUTTER_VERSION_PATCH=0 /D FLUTTER_VERSION_BUILD=1 /D NOMINMAX /D UNICODE /D 
_UNICODE /D "CMAKE_INTDIR=\"Debug\"" /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /std:c++17 /Fo"demo_world.dir\Debug\\" /Fd"demo_world.dir\Debug\vc143.pdb" /external:W4 /Gd /TP /wd4100 /errorReport:queue
C:\dev\src\demo_world\windows\flutter\generated_plugin_registrant.cc C:\dev\src\demo_world\windows\runner\flutter_window.cpp
[  +57 ms]   generated_plugin_registrant.cc
[ +232 ms]   flutter_window.cpp
[ +767 ms]   Generating Code...
[  +74 ms] ResourceCompile:
[   +1 ms]   All outputs are up-to-date.
[  +38 ms] Link:
[   +1 ms]   C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:"C:\dev\src\demo_world\build\windows\x64\runner\Debug\demo_world.exe" /INCREMENTAL /ILK:"demo_world.dir\Debug\demo_world.ilk" /NOLOGO
..\flutter\Debug\flutter_wrapper_app.lib dwmapi.lib C:\dev\src\demo_world\windows\flutter\ephemeral\flutter_windows.dll.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker'     
uiAccess='false'" /manifest:embed /manifestinput:C:\dev\src\demo_world\windows\runner\runner.exe.manifest /DEBUG /PDB:"C:/dev/src/demo_world/build/windows/x64/runner/Debug/demo_world.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /DYNAMICBASE /NXCOMPAT
/IMPLIB:"C:/dev/src/demo_world/build/windows/x64/runner/Debug/demo_world.lib" /MACHINE:X64  /machine:x64 demo_world.dir\Debug\Runner.res
[   +2 ms]   demo_world.dir\Debug\flutter_window.obj
[        ]   demo_world.dir\Debug\main.obj
[        ]   demo_world.dir\Debug\utils.obj
[        ]   demo_world.dir\Debug\win32_window.obj
[        ]   demo_world.dir\Debug\generated_plugin_registrant.obj
[ +232 ms]   demo_world.vcxproj -> C:\dev\src\demo_world\build\windows\x64\runner\Debug\demo_world.exe
[   +8 ms] FinalizeBuildStatus:
[   +1 ms]   Deleting file "demo_world.dir\Debug\demo_world.tlog\unsuccessfulbuild".
[   +1 ms]   Touching "demo_world.dir\Debug\demo_world.tlog\demo_world.lastbuildstate".
[        ] Done Building Project "C:\dev\src\demo_world\build\windows\x64\runner\demo_world.vcxproj" (default targets).
[  +26 ms] Project "C:\dev\src\demo_world\build\windows\x64\ALL_BUILD.vcxproj" (3) is building "C:\dev\src\demo_world\build\windows\x64\flutter\flutter_wrapper_plugin.vcxproj" (7) on node 1 (default targets).
[   +1 ms] PrepareForBuild:
[   +1 ms]   Structured output is enabled. The formatting of compiler diagnostics will reflect the error hierarchy. See https://aka.ms/cpp/structured-output for more details.
[   +1 ms] InitializeBuildStatus:
[        ]   Creating "flutter_wrapper_plugin.dir\Debug\flutter_.B61F7886.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[   +1 ms]   Touching "flutter_wrapper_plugin.dir\Debug\flutter_.B61F7886.tlog\unsuccessfulbuild".
[   +1 ms] CustomBuild:
[        ]   All outputs are up-to-date.
[   +5 ms] ClCompile:
[   +1 ms]   All outputs are up-to-date.
[   +2 ms] Lib:
[        ]   All outputs are up-to-date.
[        ]   flutter_wrapper_plugin.vcxproj -> C:\dev\src\demo_world\build\windows\x64\flutter\Debug\flutter_wrapper_plugin.lib
[   +9 ms] FinalizeBuildStatus:
[        ]   Deleting file "flutter_wrapper_plugin.dir\Debug\flutter_.B61F7886.tlog\unsuccessfulbuild".
[        ]   Touching "flutter_wrapper_plugin.dir\Debug\flutter_.B61F7886.tlog\flutter_wrapper_plugin.lastbuildstate".
[   +1 ms] Done Building Project "C:\dev\src\demo_world\build\windows\x64\flutter\flutter_wrapper_plugin.vcxproj" (default targets).
[   +9 ms] PrepareForBuild:
[   +1 ms]   Structured output is enabled. The formatting of compiler diagnostics will reflect the error hierarchy. See https://aka.ms/cpp/structured-output for more details.
[   +1 ms] InitializeBuildStatus:
[   +1 ms]   Creating "x64\Debug\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[        ]   Touching "x64\Debug\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild".
[   +1 ms] CustomBuild:
[        ]   All outputs are up-to-date.
[  +16 ms] FinalizeBuildStatus:
[   +1 ms]   Deleting file "x64\Debug\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild".
[        ]   Touching "x64\Debug\ALL_BUILD\ALL_BUILD.tlog\ALL_BUILD.lastbuildstate".
[        ] Done Building Project "C:\dev\src\demo_world\build\windows\x64\ALL_BUILD.vcxproj" (default targets).
[   +8 ms] PrepareForBuild:
[        ]   Structured output is enabled. The formatting of compiler diagnostics will reflect the error hierarchy. See https://aka.ms/cpp/structured-output for more details.
[   +1 ms] InitializeBuildStatus:
[        ]   Creating "x64\Debug\INSTALL\INSTALL.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[   +1 ms]   Touching "x64\Debug\INSTALL\INSTALL.tlog\unsuccessfulbuild".
[  +45 ms] CustomBuild:
[   +1 ms]   1>
[  +14 ms] PostBuildEvent:
[   +1 ms]   setlocal
[   +1 ms]   "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -DBUILD_TYPE=Debug -P cmake_install.cmake
[        ]   if %errorlevel% neq 0 goto :cmEnd
[        ]   :cmEnd
[   +1 ms]   endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
[   +1 ms]   :cmErrorLevel
[   +1 ms]   exit /b %1
[        ]   :cmDone
[   +1 ms]   if %errorlevel% neq 0 goto :VCEnd
[        ]   :VCEnd
[  +49 ms]   -- Install configuration: "Debug"
[  +26 ms]   -- Up-to-date: C:/dev/src/demo_world/build/windows/x64/runner/Debug/data/icudtl.dat
[   +1 ms]   -- Up-to-date: C:/dev/src/demo_world/build/windows/x64/runner/Debug/flutter_windows.dll
[        ]   -- Up-to-date: C:/dev/src/demo_world/build/windows/x64/runner/Debug
[   +7 ms]   -- Installing: C:/dev/src/demo_world/build/windows/x64/runner/Debug/data/flutter_assets
[        ]   -- Installing: C:/dev/src/demo_world/build/windows/x64/runner/Debug/data/flutter_assets/AssetManifest.bin
[   +2 ms]   -- Installing: C:/dev/src/demo_world/build/windows/x64/runner/Debug/data/flutter_assets/AssetManifest.json
[   +1 ms]   -- Installing: C:/dev/src/demo_world/build/windows/x64/runner/Debug/data/flutter_assets/FontManifest.json
[   +2 ms]   -- Installing: C:/dev/src/demo_world/build/windows/x64/runner/Debug/data/flutter_assets/fonts
[   +1 ms]   -- Installing: C:/dev/src/demo_world/build/windows/x64/runner/Debug/data/flutter_assets/fonts/MaterialIcons-Regular.otf
[   +8 ms]   -- Installing: C:/dev/src/demo_world/build/windows/x64/runner/Debug/data/flutter_assets/kernel_blob.bin
[ +166 ms]   -- Installing: C:/dev/src/demo_world/build/windows/x64/runner/Debug/data/flutter_assets/NOTICES.Z
[   +2 ms]   -- Installing: C:/dev/src/demo_world/build/windows/x64/runner/Debug/data/flutter_assets/packages
[   +1 ms]   -- Installing: C:/dev/src/demo_world/build/windows/x64/runner/Debug/data/flutter_assets/packages/cupertino_icons
[   +1 ms]   -- Installing: C:/dev/src/demo_world/build/windows/x64/runner/Debug/data/flutter_assets/packages/cupertino_icons/assets
[   +1 ms]   -- Installing: C:/dev/src/demo_world/build/windows/x64/runner/Debug/data/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf
[   +1 ms]   -- Installing: C:/dev/src/demo_world/build/windows/x64/runner/Debug/data/flutter_assets/shaders
[   +1 ms]   -- Installing: C:/dev/src/demo_world/build/windows/x64/runner/Debug/data/flutter_assets/shaders/ink_sparkle.frag
[  +14 ms] FinalizeBuildStatus:
[   +1 ms]   Deleting file "x64\Debug\INSTALL\INSTALL.tlog\unsuccessfulbuild".
[   +1 ms]   Touching "x64\Debug\INSTALL\INSTALL.tlog\INSTALL.lastbuildstate".
[        ] Done Building Project "C:\dev\src\demo_world\build\windows\x64\INSTALL.vcxproj" (default targets).
[   +1 ms] Build succeeded.
[        ]     0 Warning(s)
[        ]     0 Error(s)
[        ] Time Elapsed 00:00:07.27
[  +26 ms] Building Windows application... (completed in 8.0s)
[   +4 ms] √ Built build\windows\x64\runner\Debug\demo_world.exe
[ +175 ms] VM Service URL on device: http://127.0.0.1:51950/f2zURrMoXy4=/
[   +3 ms] Caching compiled dill
[  +74 ms] Connecting to service protocol: http://127.0.0.1:51950/f2zURrMoXy4=/
[  +55 ms] [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Error 0x00000000: The operation completed successfully.
[   +1 ms] #0      DeviceInfoPlusWindowsPlugin.getSystemMemoryInMegabytes (package:device_info_plus/src/device_info_plus_windows.dart:128:9)
[   +1 ms] #1      DeviceInfoPlusWindowsPlugin.getInfo (package:device_info_plus/src/device_info_plus_windows.dart:88:34)
[   +1 ms] #2      DeviceInfoPlusWindowsPlugin.deviceInfo (package:device_info_plus/src/device_info_plus_windows.dart:40:36)
[   +1 ms] #3      DeviceInfoPlugin.windowsInfo (package:device_info_plus/device_info_plus.dart:93:27)
[   +2 ms] #4      main (package:demo_world/main.dart:8:26)
[   +1 ms] #5      _runMain.<anonymous closure> (dart:ui/hooks.dart:301:23)
[   +1 ms] #6      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:297:19)
[   +2 ms] #7      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
[  +67 ms] Launching a Dart Developer Service (DDS) instance at http://127.0.0.1:0, connecting to VM service at http://127.0.0.1:51950/f2zURrMoXy4=/.
[  +72 ms] DDS is listening at http://127.0.0.1:51953/ouXRCD4PGc4=/.
[  +63 ms] Successfully connected to service protocol: http://127.0.0.1:51950/f2zURrMoXy4=/
[  +20 ms] DevFS: Creating new filesystem on the device (null)
[  +17 ms] DevFS: Created new filesystem on the device (file:///C:/Users/Pankaj/AppData/Local/Temp/demo_world94b4061d/demo_world/)
[   +2 ms] Updating assets
[ +108 ms] Syncing files to device Windows...
[   +3 ms] Compiling dart to kernel with 0 updated files
[   +1 ms] Processing bundle.
[   +1 ms] <- recompile package:demo_world/main.dart 494bd678-bbdc-4efb-91a4-e7ed0f6afe85
[   +1 ms] <- 494bd678-bbdc-4efb-91a4-e7ed0f6afe85
[   +2 ms] Bundle processing done.
[ +114 ms] Updating files.
[   +1 ms] DevFS: Sync finished
[   +2 ms] Syncing files to device Windows... (completed in 126ms)
[   +1 ms] Synced 0.0MB.
[   +1 ms] <- accept
[   +4 ms] Connected to _flutterView/0x19eb6307f70.
[   +3 ms] Flutter run key commands.
[   +2 ms] r Hot reload. 
[   +2 ms] R Hot restart.
[   +1 ms] h List all available interactive commands.
[   +1 ms] d Detach (terminate "flutter run" but leave application running).
[   +1 ms] c Clear the screen
[   +2 ms] q Quit (terminate the application on the device).
[   +1 ms] A Dart VM Service on Windows is available at: http://127.0.0.1:51953/ouXRCD4PGc4=/

Flutter Doctor

PS C:\dev\src\demo_world> flutter doctor -v
[√] Flutter (Channel stable, 3.22.1, on Microsoft Windows [Version 10.0.19045.3030], locale en-IN)
    • Flutter version 3.22.1 on channel stable at C:\dev\sdk\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision a14f74ff3a (13 hours ago), 2024-05-22 11:08:21 -0500
    • Engine revision 55eae6864b
    • Dart version 3.4.1
    • DevTools version 2.34.3

[√] Windows Version (Installed version of Windows is version 10 or higher)

[X] Android toolchain - develop for Android devices
    X Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[X] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.10.0)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.10.34916.146
    • Windows 10 SDK version 10.0.22621.0

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).

[√] VS Code (version 1.89.1)
    • VS Code at C:\Users\Pankaj\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.88.0

[√] Connected device (2 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19045.3030]
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 125.0.2535.51

[√] Network resources
    • All expected network resources are available.

! Doctor found issues in 3 categories.

Checklist before submitting a bug

  • I searched issues in this repository and couldn't find such bug/problem
  • I Google'd a solution and I couldn't find it
  • I searched on StackOverflow for a solution and I couldn't find it
  • I read the README.md file of the plugin
  • I'm using the latest version of the plugin
  • All dependencies are up to date with flutter pub upgrade
  • I did a flutter clean
  • I tried running the example project
@pankaj-nikam pankaj-nikam added bug Something isn't working triage labels May 23, 2024
@pankaj-nikam
Copy link
Author

Windows 10 version: Version 22H2 19045.3030

@miquelbeltran
Copy link
Member

Interesting, it looks like the issue is here:

[  +55 ms] [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Error 0x00000000: The operation completed successfully.
[   +1 ms] #0      DeviceInfoPlusWindowsPlugin.getSystemMemoryInMegabytes (package:device_info_plus/src/device_info_plus_windows.dart:128:9)

It is throwing an exception with the message "The operation completed successfully."

Looking at SO, I saw this response: https://stackoverflow.com/a/6428680

Windows has a hard limit of 10000 handles per process. The rather unhelpful exception "The operation completed successfully" might indicate that this limit was reached.

I am not a Windows dev expert so no idea how to move this forward, I wonder if this is an internal issue with Flutter/Dart.

  • Any chance you can downgrade to a previous Flutter version and try again?
  • Is this issue happening 100% of the time, or only in some occasions/after a while?

@pankaj-nikam
Copy link
Author

Hi @miquelbeltran , it runs fine on Windows 11. I am not sure why, did it work on your machine? Yes, it is happening 100% of the time. I didnt get a chance to downgrade Flutter and check.

@miquelbeltran
Copy link
Member

I only have a Win 11 computer, so I never saw this issue when I did my own testing.

@pankaj-nikam
Copy link
Author

Can confirm that this works fine with Windows 11. Created a VM just to reproduce this. I just installed Visual Studio 2022 with C++ desktop and then installed the Flutter SDK to reproduce this.

@giregk
Copy link

giregk commented Jun 27, 2024

I also faced this issue with some clients running Windows RDS.

@DanielCardona

This comment was marked as duplicate.

@ndhbr

This comment was marked as duplicate.

@SooChang-Lee

This comment was marked as duplicate.

@schotti1001

This comment was marked as duplicate.

@miquelbeltran
Copy link
Member

Stop replying with "same problem", that will not fix the issue. If you want to help, submit a fix for the issue.

Locking the thread to maintainers.

@fluttercommunity fluttercommunity locked as too heated and limited conversation to collaborators Aug 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

7 participants