fleet/orbit/pkg
Lucas Manuel Rodriguez ea25ce4e9e
Fix Fleet Desktop bugs on Windows (#16402)
#15821

This PR is adding two improvements and fixing two Windows bugs in Fleet
Desktop:

## Improvement
- We are now capturing the stderr of Fleet Desktop. This helped me find
bug (1) below (otherwise the panic output below was hidden from us).
- To reduce complexity I'm removing the "Theme detection" routine
because we made the decision to use the colored icon for both themes...,
see here:
415d1f493b/orbit/cmd/desktop/desktop_windows.go (L21-L27)

## Bug fixes
1. Fleet Desktop icon not showing in the task bar. This was fixed by
updating to use the latest version of `fyne.io/systray`. (See
https://github.com/fyne-io/systray/issues/22#issuecomment-1173157898.)
2. Orbit now properly detects if Fleet Desktop isn't running on Windows.

Bug (1)'s panic output 
```
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x72b14b]

goroutine 23 [running]:
fyne.io/systray.(*winTray).setTooltip(0x1eb5d40, {0x126923f?, 0x0?})
	/Users/luk/gopath/pkg/mod/fyne.io/systray@v1.10.0/systray_windows.go:260 +0xcb
fyne.io/systray.SetTooltip({0x126923f?, 0x125fc16?})
	/Users/luk/gopath/pkg/mod/fyne.io/systray@v1.10.0/systray_windows.go:961 +0x29
main.main.func1()
	/Users/luk/fleetdm/git/fleet/orbit/cmd/desktop/desktop.go:103 +0xba
fyne.io/systray.Register.func2()
	/Users/luk/gopath/pkg/mod/fyne.io/systray@v1.10.0/systray.go:98 +0x2f
created by fyne.io/systray.Register in goroutine 1
	/Users/luk/gopath/pkg/mod/fyne.io/systray@v1.10.0/systray.go:96 +0xb1
```

- [X] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [X] Manual QA for all new/changed functionality
  - For Orbit and Fleet Desktop changes:
- [X] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [x] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).
2024-01-29 18:52:55 -03:00
..
augeas update augeas lense "simplevars.aug" (#12922) 2023-07-25 09:22:41 -07:00
bitlocker make sure we report the correct error during BitLocker encryption (#16096) 2024-01-15 12:31:15 -03:00
build Add user agent to Orbit HTTP client (#5429) 2022-05-02 11:03:49 -07:00
constant Remotely configure fleetd update channels (#15848) 2024-01-02 17:59:40 -03:00
cryptoinfo Add Kolide osquery tables 2023-11-01 20:11:35 -06:00
dataflatten Add Kolide osquery tables 2023-11-01 20:11:35 -06:00
execuser launch Nudge using /usr/bin/open (#10051) 2023-02-23 14:48:40 -03:00
go-paniclog Fix Fleet Desktop bugs on Windows (#16402) 2024-01-29 18:52:55 -03:00
insecure Make creation of http.Client uniform across the codebase (#3097) 2021-11-24 15:56:54 -05:00
keystore Enroll secret in macOS keychain and Windows Credential Manager (#16068) 2024-01-16 06:51:37 -06:00
logging environment variable to disable orbit enroll logs (#13519) 2023-08-25 15:25:07 -06:00
osquery Orbit to kill pre-existing osqueryd processes during startup (#16343) 2024-01-29 16:44:50 -03:00
osservice 8009 fleet desktop icon duplication (#8017) 2022-10-13 10:58:37 -03:00
packaging Enroll secret in macOS keychain and Windows Credential Manager (#16068) 2024-01-16 06:51:37 -06:00
platform Fix Fleet Desktop bugs on Windows (#16402) 2024-01-29 18:52:55 -03:00
process Fleetctl to package .app bundles for osquery (and changes for orbit to support them) (#4393) 2022-03-15 16:04:12 -03:00
profiles Update fleetd for macOS hosts to look for custom end user email field in Fleet MDM enrollment profile (#15761) 2024-01-02 17:45:11 -03:00
scripts Queued scripts feature (#16300) 2024-01-29 11:37:54 -03:00
table Remotely configure fleetd update channels (#15848) 2024-01-02 17:59:40 -03:00
token Fixing fleetd to NOT make unnecessary duplicate call to orbit/device_token endpoint. (#15543) 2023-12-10 17:00:24 -06:00
update Fixing tests due to known exec after write Linux issue. (#16243) 2024-01-21 10:40:41 -06:00
user fix: don't attempt to launch fleet desktop until the user is logged into GUI (#16090) 2024-01-17 10:00:28 -05:00
useraction Update end user migration copy (#14158) 2023-09-27 12:10:25 -04:00
windows Add Kolide osquery tables 2023-11-01 20:11:35 -06:00