fix(startup): report a window that never opens

The data folder is created and stays empty, the process keeps running,
and no window appears. Nothing returns, so nothing is logged: WebView2
never hands control back, and a hang has no error to report.

So the ABSENCE of progress is reported. If OnStartup has not been reached
twelve seconds after wails.Run, that is written to the startup log and
shown in a message box naming the two causes — a missing WebView2 runtime
and an antivirus blocking msedgewebview2.exe — because 'OpsLog is not
responding' otherwise sends people to reinstall OpsLog, which is the one
thing that cannot help: the part that has not started is not ours.
This commit is contained in:
2026-08-25 21:09:30 +02:00
parent f3b607b15a
commit 660653ce14
3 changed files with 34 additions and 0 deletions
+1
View File
@@ -997,6 +997,7 @@ func (a *App) startup(ctx context.Context) {
// One line in the startup log too, not only in OpsLog's own: the two
// together say whether a launch that produced no window got as far as our
// code at all, which is the fork every "it does not start" report turns on.
startupReached.Store(true)
bootLog("OnStartup reached")
dataDir, err := userDataDir()