From 6e89743e4e6249a4ffbdf4ea80176613688c0e2a Mon Sep 17 00:00:00 2001 From: RebeccaMahany Date: Mon, 9 Sep 2024 17:07:17 -0400 Subject: [PATCH] Check for systray error: unable to init instance: Unspecified error --- ee/desktop/runner/runner_windows.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ee/desktop/runner/runner_windows.go b/ee/desktop/runner/runner_windows.go index 804f4c4fc..a680545b2 100644 --- a/ee/desktop/runner/runner_windows.go +++ b/ee/desktop/runner/runner_windows.go @@ -69,7 +69,10 @@ func osversion() (string, error) { // logIndicatesSystrayNeedsRestart checks to see if the log line contains // "tray not ready yet", which indicates that the systray had an irrecoverable -// error during initialization and requires restart. +// error during initialization and requires restart. Sometimes the tray may +// also fail to initialize with "Unspecified error", so we check for the generic +// initialization failed message as well. func logIndicatesSystrayNeedsRestart(logLine string) bool { - return strings.Contains(logLine, systray.ErrTrayNotReadyYet.Error()) + return strings.Contains(logLine, systray.ErrTrayNotReadyYet.Error()) || + strings.Contains(logLine, "systray error: unable to init instance") }