fix(startup): pin the WebView2 profile, and retry without the GPU after a hang

His log reaches 'entering wails.Run' and stops: WebView2 is installed
(120.0.2210.91) and never hands control back. A hang, not a failure —
there is no error to report, so the two remaining causes have to be
addressed rather than diagnosed.

The profile folder is now named explicitly, on the LOCAL disk. Wails
defaults it into the ROAMING profile, which on a managed account can be
redirected to a share; a WebView2 profile on a share that is slow or gone
does not fail, it hangs. Naming it also gives someone a folder they can
be told to delete, which is the fix when the profile itself is corrupt.

And a marker is written before the window is attempted, removed when it
paints. Finding it at the next launch means the last one never got there,
so that launch runs with GPU acceleration off: a WebView2 that cannot get
on with the graphics driver hangs exactly like one that cannot start, and
this is the single lever that separates them — at no cost on machines
where it was never the problem.
This commit is contained in:
2026-08-25 21:13:22 +02:00
parent 660653ce14
commit 2adf252942
4 changed files with 81 additions and 6 deletions
+1
View File
@@ -1560,6 +1560,7 @@ func (a *App) startup(ctx context.Context) {
// launch. Show is unconditional: whatever happens above, the window must appear.
func (a *App) domReady(ctx context.Context) {
bootLog("OnDomReady reached — the window has painted")
clearLaunchMarker()
a.restoreWindowPosition()
wruntime.WindowShow(ctx)
// The one number that matches what the operator actually experiences: click