chore(startup): name the WebView2 runtime and mark every milestone
His startup.log stops after 'data dir ok', which rules out the two faults already covered and leaves the window creation itself — where a missing WebView2 runtime lands, sometimes as a silent exit rather than an error anyone can print. So the runtime's version is read from where it registers itself (both hives, and the 32-bit view where a per-machine install usually lands) and written BEFORE the window is attempted: 'WebView2: not found' answers the whole question in one line. Breadcrumbs now also mark entering wails.Run, reaching OnStartup, and the window painting — which places any launch that produces nothing between two known points.
This commit is contained in:
@@ -114,6 +114,16 @@ func main() {
|
||||
cleanupOldUpdateBinary()
|
||||
}
|
||||
|
||||
// The WebView2 runtime, named before the window is attempted. Its absence is
|
||||
// the classic silent failure — the process starts, the browser environment
|
||||
// cannot be created, and on some machines that ends the launch without an
|
||||
// error anyone can see.
|
||||
if v := webView2Version(); v != "" {
|
||||
bootLog("WebView2 runtime: %s", v)
|
||||
} else {
|
||||
bootLog("WebView2 runtime: NOT FOUND — install Microsoft Edge WebView2 Runtime")
|
||||
}
|
||||
|
||||
// Create an instance of the app structure
|
||||
app := NewApp()
|
||||
app.startupProfile = profileArg(os.Args[1:])
|
||||
@@ -135,6 +145,7 @@ func main() {
|
||||
}
|
||||
|
||||
// Create application with options
|
||||
bootLog("entering wails.Run (window %dx%d, state %v)", width, height, startState)
|
||||
err := wails.Run(&options.App{
|
||||
Title: "OpsLog",
|
||||
Width: width,
|
||||
@@ -168,6 +179,7 @@ func main() {
|
||||
},
|
||||
})
|
||||
|
||||
bootLog("wails.Run returned")
|
||||
if err != nil {
|
||||
// The last thing that can fail before a window exists, and the most
|
||||
// opaque of them: a missing WebView2 runtime lands here. println goes
|
||||
|
||||
Reference in New Issue
Block a user