You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Crash: uncaught "Cannot resize a pty that has already exited" kills the entire app — reproducible from Settings/Update with Open Terminal unavailable (Windows) #255
Open WebUI Desktop crashes with an Electron error dialog:
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot resize a pty that has already exited
at WindowsPtyAgent.resize (C:\Users\ioryy\AppData\Local\Programs\open-webui\resources\app.asar\node_modules...:23)
at WindowsTerminal. (...:26)
at WindowsTerminal._deferNoArgs (...:24)
at WindowsTerminal.resize (...:14)
at MessagePortMain. (...\out\main\index.js:21)
at MessagePortMain.emit (node:events:519:28)
at MessagePortMain._internalPort.emit (node:electron/js2c/browser_init:2:117074)
Environment
OS: Windows 11 Pro
Open WebUI Desktop version: 0.0.18 (when first encountered); still reproducible after updating to v0.0.20 (latest release at time of writing)
Model access: remote API connection only (llama.cpp server stopped)
Open Terminal server: not running / unavailable during the reliable reproduction below
Steps to reproduce (reliable — screen recorded)
The recording shows the following sequence; the crash occurs even though Open Terminal is not available (Terminal unavailable: Terminal server [http://127.0.0.1:38234/] not found):
Launch Open WebUI Desktop on Windows 11.
Open the bottom console tab to view the embedded server logs (uvicorn.protocols.http.h11_impl).
Collapse the console, open the sidebar, and open Settings (gear icon, bottom left).
Switch to the "Open WebUI" tab (server status shows Running).
Click the Update button (Updating...).
Return to the main chat workspace: a "Connection lost, Reconnecting..." notice appears, then the canvas enters a "Starting Open WebUI..." loading state.
As the interface reloads, the main process throws the fatal error dialog above (≈00:17 in the recording).
Additional observations
The crash is not caused by the user-facing Terminal feature. It reproduces with the Open Terminal server unavailable, which indicates the failing PTY belongs to the desktop app's own embedded Open WebUI server process (spawned so its output can be shown in the console tab), not to a user terminal session.
Two different outcomes depending on trigger:
Update path (reliable): the error dialog appears, but the embedded server still launches afterwards and the app continues.
During normal use: while a chat response is being generated (models via API, Open Terminal active and being used by the LLM to modify files on disk), the embedded server disconnects permanently and the app becomes unusable. The only remedy is to completely close and relaunch the app. This happens frequently (not every time), especially when switching conversations or opening the app settings mid-generation.
I have not isolated whether an explicit window resize is required; the crash also occurs without one (e.g., immediately after the console tab opens during server restart), suggesting any resize/layout event racing with process teardown can trigger it.
Expected behavior
The app must not crash when a resize is delivered to a PTY whose process has already exited. The resize should be ignored or handled gracefully instead of throwing an uncaught exception in the main process.
Additional context
OpenWebui.pty.Crash.mp4
Screen recording of the reliable reproduction is available on request.
This matches the known Windows node-pty behavior where resize throws Cannot resize a pty that has already exited; the same crash pattern is reported in other node-pty-based applications on Windows (e.g., microsoft/node-pty#827).
Open WebUI Desktop crashes with an Electron error dialog:
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot resize a pty that has already exited
at WindowsPtyAgent.resize (C:\Users\ioryy\AppData\Local\Programs\open-webui\resources\app.asar\node_modules...:23)
at WindowsTerminal. (...:26)
at WindowsTerminal._deferNoArgs (...:24)
at WindowsTerminal.resize (...:14)
at MessagePortMain. (...\out\main\index.js:21)
at MessagePortMain.emit (node:events:519:28)
at MessagePortMain._internalPort.emit (node:electron/js2c/browser_init:2:117074)
Environment
OS: Windows 11 Pro
Open WebUI Desktop version: 0.0.18 (when first encountered); still reproducible after updating to v0.0.20 (latest release at time of writing)
Model access: remote API connection only (llama.cpp server stopped)
Open Terminal server: not running / unavailable during the reliable reproduction below
Steps to reproduce (reliable — screen recorded)
The recording shows the following sequence; the crash occurs even though Open Terminal is not available (Terminal unavailable: Terminal server [http://127.0.0.1:38234/] not found):
Launch Open WebUI Desktop on Windows 11.
Open the bottom console tab to view the embedded server logs (uvicorn.protocols.http.h11_impl).
Collapse the console, open the sidebar, and open Settings (gear icon, bottom left).
Switch to the "Open WebUI" tab (server status shows Running).
Click the Update button (Updating...).
Return to the main chat workspace: a "Connection lost, Reconnecting..." notice appears, then the canvas enters a "Starting Open WebUI..." loading state.
As the interface reloads, the main process throws the fatal error dialog above (≈00:17 in the recording).
Additional observations
The crash is not caused by the user-facing Terminal feature. It reproduces with the Open Terminal server unavailable, which indicates the failing PTY belongs to the desktop app's own embedded Open WebUI server process (spawned so its output can be shown in the console tab), not to a user terminal session.
Two different outcomes depending on trigger:
Update path (reliable): the error dialog appears, but the embedded server still launches afterwards and the app continues.
During normal use: while a chat response is being generated (models via API, Open Terminal active and being used by the LLM to modify files on disk), the embedded server disconnects permanently and the app becomes unusable. The only remedy is to completely close and relaunch the app. This happens frequently (not every time), especially when switching conversations or opening the app settings mid-generation.
I have not isolated whether an explicit window resize is required; the crash also occurs without one (e.g., immediately after the console tab opens during server restart), suggesting any resize/layout event racing with process teardown can trigger it.
Expected behavior
The app must not crash when a resize is delivered to a PTY whose process has already exited. The resize should be ignored or handled gracefully instead of throwing an uncaught exception in the main process.
Additional context
OpenWebui.pty.Crash.mp4
Screen recording of the reliable reproduction is available on request.
This matches the known Windows node-pty behavior where resize throws Cannot resize a pty that has already exited; the same crash pattern is reported in other node-pty-based applications on Windows (e.g., microsoft/node-pty#827).