mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2026-03-24 04:46:56 +00:00
[PR #7782] [MERGED] chore: bumped device_info_plus to 11.2.2 #8109
Labels
No labels
2024
2025
2026
acct mgmt
AI
automation
bug
calendar
ci
CJK
cloud
code-block
collaboration
copy-paste
database
data migration
data sync
deploy
desktop
develop
develop
documentation
duplicate
editor
editor-plugin
emoji
export
files
flutter-only
follow-up
formula
good first issue for devs
good first issue for experienced devs
grid
hacktoberfest
HACKTOBERFEST-ACCEPTED
help wanted
i18n
icons
images
importer
improvements
infra
install
integrations
IR
kanban board
login
look and joy
mentorship
mobile
mobile
needs design
new feature
new feature
non-coding
notes
notifications
onboarding
organization
P0+
permission
platform-linux
platform-mac
platform-windows
plugins
program
pull-request
Q1 25
Q1 26
Q2 24
Q2 25
Q3 24
Q3 25
Q4 24
Q4 25
react
regression
rust
rust
Rust-only
Rust-only
Rust-starter
Rust-starter
self-hosted
shortcuts
side panel
slash-menu
sync v2
table
tablet
task
tauri
templates
tests
themes
translation
v0.5.6
v0.5.8
v0.5.9
v0.6.0
v0.6.1
v0.6.4
v0.6.7
v0.6.8
v0.7.1
v0.7.4
v0.7.4
v0.7.5
v0.7.6
v0.7.7
v0.7.8
v0.8.0
v0.8.4
v0.8.5
v0.8.9
web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AppFlowy-IO/AppFlowy#8109
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/7782
Author: @birnam
Created: 4/18/2025
Status: ✅ Merged
Merged: 4/21/2025
Merged by: @LucasXu0
Base:
main← Head:dependencybump-device_info_plus📝 Commits (3)
dd783adbumped device_info_plus to 11.2.2 -- this version avoids the crash that happens when getInfo() is called on Windows in a VM or with Hyper-V active9cc8890chore: bumped device_info_plus to 11.2.2 -- this version avoids the crash that happens when getInfo() is called on Windows in a VM or with Hyper-V activeb1c97b1Merge branch 'dependencybump-device_info_plus' of github.com:birnam/AppFlowy into dependencybump-device_info_plus📊 Changes
2 files changed (+3 additions, -3 deletions)
View changed files
📝
frontend/appflowy_flutter/pubspec.lock(+2 -2)📝
frontend/appflowy_flutter/pubspec.yaml(+1 -1)📄 Description
Bug Resolution
fixes https://github.com/AppFlowy-IO/AppFlowy/issues/6422
and the related issues:
https://github.com/AppFlowy-IO/AppFlowy/issues/6677
https://github.com/AppFlowy-IO/AppFlowy/issues/6979
https://github.com/AppFlowy-IO/AppFlowy/issues/5874
Bug: When running AppFlowy.exe on some Windows machines, an uncaught error stopped all app processes resulting in the window never appearing and the application processes to be stuck in 'Background processes' in Task Manager. Unlike some similar reports, this case was not caused by the window appearing offscreen or corrupted AppData files.
Cause: A system call to
GetPhysicallyInstalledSystemMemoryreturns an unexpected0, causing device_info_plus to throw an error when used to retrieve a deviceId. See device_info_plus issue https://github.com/fluttercommunity/plus_plugins/issues/2957 for their discussion. After doing more research into this on my own, I found the root cause.On Windows, device_info_plus calls
GetPhysicallyInstalledSystemMemoryto get the amount of system memory. This function is known to fail in Windows VMs, but I found that it also fails when Microsoft Hyper-V is active on the computer. I believe Hyper-V to be the missing commonality between the multiple issues linked above. Hyper-V is enabled to meet various requirements, such as WSL, Docker Desktop, or running other hypervisors in order to pass CPU based virtualization to other VMs.The device_info_plus fix was to return 0 when
GetPhysicallyInstalledSystemMemoryfailed, which prevents the crash although does not actually provide the memory information. This is not an issue for AppFlowy since we only need the deviceId, although I will recommend they include a fallback call toGlobalMemoryStatusExto actually retrieve the system memory information when the existing call fails.For reference, this is their comment on this solution from the linked issue. The other two properties mentioned involve calls to GetComputerNameEx and GetUserName. In my tests, neither of these have shown vulnerable to the VM/Hyper-V condition, and regardless neither of these omissions affect AppFlowy.
Fix description: the device_info_plus dependency override was updated to 11.2.2, which was the first to integrate the 2957 fix. (There are newer 11.3.x releases but I found dependency clashes when trying the latest version in AppFlowy)
PR Checklist
Summary by Sourcery
Update device_info_plus dependency to version 11.2.2 to resolve Windows-specific memory retrieval issues
Bug Fixes:
Chores:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.