mirror of
https://github.com/Comfy-Org/desktop.git
synced 2026-11-04 23:47:43 +00:00
[GH-ISSUE #1665] App update fails to upgrade venv dependencies (SQLAlchemy), causing crash on startup #493
Labels
No labels
area: desktop-app
Bounty
bug
bug-cop:answered
bug-cop:response-received
component: installer
component: preload
custom node
dependencies
Design
documentation
duplicate
enhancement
expected
frontend
good first issue
installation
Low-Priority
performance
Planned
platform: cross-platform
platform: windows
Potential Bug
Potential Bug
pull-request
question
refactor
Release
stale
User Support
V1
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/desktop#493
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?
Originally created by @snomiao on GitHub (Mar 18, 2026).
Original GitHub issue: https://github.com/Comfy-Org/desktop/issues/1665
Description
After the ComfyUI Desktop app updates, ComfyUI fails to start with:
and earlier:
The app's validation check passes (
pythonPackages: "OK") viauv pip install --dry-run, but the venv still has SQLAlchemy 1.x while the new ComfyUI version requires SQLAlchemy 2.0+ (DeclarativeBase,mapped_column,Mapped).Steps to Reproduce
Expected Behavior
The desktop app should upgrade venv dependencies when the bundled ComfyUI version changes, especially for breaking dependency changes.
Actual Behavior
pythonPackages: "OK"(the--dry-runcheck doesn't catch the mismatch)ImportError: cannot import name 'mapped_column' from 'sqlalchemy.orm'Environment
Workaround
Use "Reset Environment" in the ComfyUI Desktop troubleshooting UI. This recreates the venv and installs the correct dependencies.
Note: Reset Environment does NOT reinstall custom node pip dependencies — see related issue about that.
Log excerpt
┆Issue is synchronized with this Notion page by Unito
@dosubot[bot] commented on GitHub (Mar 18, 2026):
This is a confirmed issue with the desktop app's dependency validation logic. The root cause is that the
hasRequirements()function usesuv pip install --dry-runto check packages, but there's a critical flaw: outdated packages (like SQLAlchemy 1.x → 2.x) are sometimes incorrectly classified as errors instead of upgrade candidates, which prevents the automatic upgrade flow from triggering.When
hasRequirements()returns'package-upgrade', the app correctly triggersupdatePackages()automatically. However, the detection logic only recognizes certain known upgrade patterns (likeaiohttp,av,yarl, and Manager packages). SQLAlchemy isn't in that list, so when uv reports it needs upgrading, the system may treat it as an error and send users to maintenance instead.This is related to PR #1429 which addressed similar issues, and matches reports in #1346 where validation shows "OK" at startup but runtime dependencies fail.
Workaround confirmation: Reset Environment works because it deletes the entire
.venvand recreates it, then reinstalls from the correct requirements - bypassing the flawed upgrade detection entirely.To reply, just mention @dosu.
Share context across your team and agents. Try Dosu.