Skip to content

fix: desktop service crash-loop on startup notification failure - #183

Merged
nlewo merged 1 commit into
nlewo:mainfrom
luochen1990:fix/desktop-startup-crash-loop
Aug 4, 2026
Merged

fix: desktop service crash-loop on startup notification failure#183
nlewo merged 1 commit into
nlewo:mainfrom
luochen1990:fix/desktop-startup-crash-loop

Conversation

@luochen1990

@luochen1990 luochen1990 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Problem

On startup the banner notification may fire before the daemon is ready on
the session bus (common graphical-session.target race). beeep fails
and cmd/desktop.go:32 panic(err)s, exiting code 2 and crash-looping:

panic: beeep: dbus: unexpected EOF; notify-send: exit status 1; ...

Fix

paniclogrus.Warnf. The banner is decorative; missing it doesn't
affect event subscription.

Mirrors handler() in the same file (desktop.go:139 uses
logrus.Errorf for functional event notifications) but at lower severity
— event misses cost the user build/deploy events, banner misses don't.

Complementary to #148 (adds a Restart= fallback; this removes the root cause).

Testing

go build && go vet && go test all pass; manually verified — starting
before the daemon is ready now warns instead of panicking.

Banner notification failure (graphical-session.target race) triggered
panic(), crash-looping the service. Demote to logrus.Warnf — banner is
decorative; functional event notifications in handler() already use logrus.Errorf.
@luochen1990
luochen1990 force-pushed the fix/desktop-startup-crash-loop branch from df60b59 to e85db72 Compare August 1, 2026 13:25
@nlewo
nlewo merged commit e72d8cc into nlewo:main Aug 4, 2026
2 checks passed
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.

2 participants