Skip to content

Windows first install: plain words while WebView2 installs, and never a blank window - #1544

Merged
davidmckayv merged 4 commits into
mainfrom
fix/windows-first-install-screens
Nov 13, 2026
Merged

davidmckayv merged 4 commits into
mainfrom
fix/windows-first-install-screens

Conversation

@davidmckayv

@davidmckayv davidmckayv commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

What a person saw

A clean install of 1.0.2 on Windows Server 2022, with no WebView2 Runtime on the machine:

  1. A raw command on the Installing page. While the installer brought Microsoft's WebView2 Runtime, the status line read Execute: C:\Users\ADMINI~1\AppData\Local\Temp\MicrosoftEdgeWebview2Setup.exe /silent /install.
  2. Nothing, then a blank white window. After Finish, no window at all for about 10 s, then the OpenBot window stayed blank white for about a minute before the setup page appeared.

Why

  1. NSIS's ExecWait writes Execute: <command> to the status line itself, over the line printed before it. Never offer to delete data when installing over OpenBot on Windows, and stop what OpenBot runs on uninstall #1462 fixed this for the old version's uninstall; the WebView2 step (Tauri's template) and the template's other ExecWaits still did it.
  2. The main window is built visible (Build the window visible again: a window first created hidden froze setup on Windows #1416), and everything inside it is WebView2's. Until the page paints, WebView2 shows its DefaultBackgroundColor, which is white by default (Microsoft). On the box, WebView2 had just been installed: its processes started within 2 s of the window, but it took most of a minute to write its new profile and load the page (profile files written from 00:34:57 to 00:35:41, Defender watching every WebView2 process as a child of a new openbot-desktop.exe). Earlier clean boxes painted in 1 to 2 s, so the time varies; the window just had nothing of its own to show meanwhile. Before that, the installer had closed and the app's process took about 10 s to reach its window.

What changed

Installer

  • Every ExecWait in the template (WebView2 install, WebView2 update, both old-uninstaller paths) is wrapped in SetDetailsPrint listonly / SetDetailsPrint both (NSIS), as the hook's own uninstall already was, so the plain line stays. The WebView2 waits also move the bar (OPENBOT_PROGRESS_MOVING).
  • The WebView2 lines are in plain words: "Installing a part of Windows that OpenBot's window needs. This takes a minute.", and the same for downloading, done and failed.
  • The bootstrapper download no longer shows NSISdl's own box ("Downloading MicrosoftEdgeWebview2Setup.exe", "Connecting ..."): it uses NSISdl::download_quiet from the same address, under the plain line with the bar moving.
  • From the last page, after starting OpenBot, the installer stays on screen saying "Opening OpenBot. This can take a minute." until OpenBot's window (Tauri Window, titled OpenBot) is visible, for 60 s at most. Its buttons and close are off meanwhile, and it hands on its messages every 100 ms, so it never shows as not responding.

App (Windows)

  • The main window is built with the setup screens' ground as its background, which Tauri passes to WebView2 as the default background (Tauri). Pages other than setup get WebView2's white back, as before.
  • New first_paint: from the moment the window first shows, a native child window of OpenBot's own covers the webview with the setup page's first card, drawn where the page puts it, in its colours and sizes (light or dark): "Getting OpenBot ready / This can take a minute.". When the page paints, its own "Getting OpenBot ready" card replaces it in place. build() shows the window and then waits for WebView2 while pumping the thread's messages, so an out-of-context WinEvent hook on that thread puts the cover up there (SetWinEventHook). It follows the window's size and goes when the setup page's first heartbeat says it painted (a setup page that loads but never says so is uncovered after 10 s; any other page uncovers at once).
  • The webview is never hidden and nothing presses keys: neither the hidden-window freeze (Build the window visible again: a window first created hidden froze setup on Windows #1416) nor the fake Alt (Bring the window forward on Windows without pressing Alt #1417) comes back.
  • The log says when the window showed relative to process start, how long WebView2 took, and how long the cover stayed up.

Tests

  • desktop/scripts/installer-update.test.ts: every ExecWait in the template and hooks sits between listonly and both; the WebView2 download, install and update run under the plain line with the bar moving, the download quietly from Tauri's own address; the last page stays until OpenBot's window is up. Red on main (5 failures, including the unwrapped ExecWaits), green here.
  • desktop/scripts/installer-language.test.ts: the WebView2 lines say "a part of Windows that OpenBot's window needs", with no "WebView2", "bootstrapper" or "Error:".
  • first_paint (Windows CI, real windows): a window shown while its thread pumps gets the cover at once; a webview child made afterwards goes under it once build() returns; it follows a resize; it goes after the page's heartbeat and never comes back. Plus a check that its colours, words and card position are the setup page's own (styles.css).

Live

Clean box, internal build of this branch: results in a comment below.

… a blank window

Installing on a clean Windows Server 2022, the Installing page showed the raw
"Execute: ...MicrosoftEdgeWebview2Setup.exe /silent /install" while Microsoft's
WebView2 Runtime installed. Every ExecWait in the template now says its command
to the details list only, so the plain line before it stays, and the WebView2
lines are in plain words ("Installing a part of Windows that OpenBot's window
needs. This takes a minute.") with the bar moving.

After Finish, nothing was on screen for about ten seconds, then OpenBot's window
stayed blank white for about a minute while WebView2 started for the first time.
The window is now built on the setup screens' ground, which WebView2 also takes
as its default background, and a native "Getting OpenBot ready" covers it from
its first show until the setup page's first heartbeat says it painted. The
installer's last page stays, saying OpenBot is opening, until OpenBot's window
is up.
A new child window goes under its siblings; wry then raises its container to the
top. The test now does the same, so it checks that the cover is put back on top.
… card

On the clean box the bootstrapper download showed NSISdl's own box, "Downloading
MicrosoftEdgeWebview2Setup.exe" and "Connecting ...", over the page. It now comes
with download_quiet, from the same address, under the plain line with the bar
moving.

The cover's heading now sits in a card where the setup page puts its own, in the
page's colours and sizes, so the page replaces it in place.
@davidmckayv

Copy link
Copy Markdown
Contributor Author

Live: clean Windows Server 2022, internal build of f127d24

Internal build run 43355631763, unsigned; artifact digest sha256:ba4618c7... matched the downloaded zip, installer 799df192... matched on the box. The box was reset to its clean image and proved clean first (no WebView2 Runtime, no WSL). Installed from zero, the screen sampled every 0.5 s from the installer's start to 72 s after Finish.

Installing page

  • Downloading a part of Windows that OpenBot's window needs. (no NSISdl box), then Installing a part of Windows that OpenBot's window needs. This takes a minute. for the whole WebView2 install (91 s), with the bar moving. No Execute: line at any sample.

After Finish (this run was slow, as the reported one was)

  • +0.2 s to +8.8 s: the installer's last page, buttons off, "Opening OpenBot. This can take a minute."
  • +8.8 s: OpenBot's window shows (6.4 s after its process started) and the installer closes in the same sample. The window shows the setup page's card, "Getting OpenBot ready / This can take a minute.", on OpenBot's ground.
  • WebView2 was ready 8.1 s later; the setup page painted at +35 s, its own "Getting OpenBot ready" card replacing the cover in place. Log: the window said Getting OpenBot ready for 26.2s.
  • No sample with nothing on screen; no sample with a blank white window.

An earlier run on the same clean image with a fast WebView2 start: window 0.5 s after Finish, cover for 2.6 s, then the page.

@davidmckayv
davidmckayv merged commit f8af37a into main Nov 13, 2026
30 checks passed
@davidmckayv
davidmckayv deleted the fix/windows-first-install-screens branch November 13, 2026 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant