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]: Unable to retrieve windows info #2542
Comments
This looks like some access permission issue according to logs. Have you search this error? |
@vbuberen In the plugin documentation I don't see any particular setup for permissions on Windows. Furthermore, the method should return a string (even just "unknown" or something), not crash.
It could be a problem with virtualbox |
The thing is I am not the only one working on plugins and I don't really involved in Windows part of things. I shared with you what I found about the error you have seen. Presumably, you should have also seen it as you marked that Googled the error in the checkbox. Thanks for stating the obvious thing on how the plugin should work, but the tone of your message feels like demanding to me. If that is so, you are free to open a PR and resolve the issue, thus, help other people with similar setups. |
Could I ask you to check if this plugin works Ok in the setup you have with VirtualBox? I am not really familiar with Windows development and currently don't have anyone to help here, but would like to address the issue you encountered. Thus, would appreciate the feedback if that other plugin works fine for you. |
It's an issue with the VM that can be solved with the following (turn off VM first)
From https://forums.virtualbox.org/viewtopic.php?t=107885 Before that, I had the same issue: Error 0x8007000d: The data is invalid. Happens only in my VM (Win11 within VirtualBox 7 on Ubuntu 23.04), on a regular Windows machine the same executable works. Its an issue with Window/VirtualBox, the same WinApi call GetPhysicallyInstalledSystemMemory that's producing the error in the plugin also fails when calling it from a C# application. Therefore you can close this issue, it's got little to do with this flutter plugin. |
One possible "fix" is that the |
Platform
Windows 10 virtualized (VirtualBox 7.0.10)
Plugin
device_info_plus
Version
9.1.2
Flutter SDK
3.16.4
Steps to reproduce
error occurred while retrieving Windows info using device_info_plus with the folowing error message
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Error 0x00000000: Operazione completata.
#0 DeviceInfoPlusWindowsPlugin.getSystemMemoryInMegabytes (package:device_info_plus/src/device_info_plus_windows.dart:128:9)
#1 DeviceInfoPlusWindowsPlugin.getInfo (package:device_info_plus/src/device_info_plus_windows.dart:88:34)
#2 DeviceInfoPlusWindowsPlugin.deviceInfo (package:device_info_plus/src/device_info_plus_windows.dart:40:36)
#3 DeviceInfoPlugin.windowsInfo (package:device_info_plus/device_info_plus.dart:93:27)
#4 getDeviceInfo (package:myProject/lib/lib1.dart:391:47)
#5 main (package:myProject/main.dart:52:15)
Code Sample
Logs
Flutter Doctor
Checklist before submitting a bug
flutter pub upgrade
flutter clean
The text was updated successfully, but these errors were encountered: