kolide / launcher

Osquery launcher, autoupdater, and packager
https://kolide.com/launcher
Other
500 stars 98 forks source link

Nothing happens when clicking on tray icon menu item on Ubuntu #1543

Closed rolandoscott closed 6 months ago

rolandoscott commented 6 months ago

Hi, I'm on Ubuntu version 23.10. I install the package fine, and the tray icon appears. When I go to click on any of the items, nothing happens.

Running the doctor app [sudo /usr/local/kolide-k2/bin/launcher doctor] I get the following results

{"caller":"main.go:35","msg":"Launcher starting up","revision":"d5cca903ae84c603edd5c914358a69489465211b","severity":"info","ts":"2024-01-11T16:47:09.784179206Z","version":"1.2.1"} Platform: platform: linux, architecture: amd64 Launcher Version: launcher_version 1.2.1 Host Info: hostname: reas, uptime: 1 hour, 5 minutes, 44 seconds ✅ Process Report: found 4 kolide processes, at least one running as root or system ✅ Root directory contents: root directory (/var/kolide-k2/k2device.kolide.com) contains 20 files ✅ Check communication with Kolide: successfully connected to device and control server ✅ Logs: debug.json is 1483119 bytes, and was last modified at 2024-01-11 10:47:11.971619709 -0600 CST ✅ Binary directory contents: binary directory (/usr/local/kolide-k2) contains 1 files ✅ Enrollment Secret: claim for namizo ✅ Network Report: launcher can listen on local network ✅ Osquery: osqueryd version 5.10.2 ✅ Launcher Flags: launcher.flags exists and is parsable ❌ Gnome Extensions: uid:1000: error running gnome-extensions: running "/usr/bin/gnome-extensions show ubuntu-appindicators@ubuntu.com", err is: : exit status 2 ✅ Quarantine: no quarantine directories found ✅ System Time: system time is within 5.000000 minutes of server date header, delta = 0.024426 minutes ✅ DNS Resolution: successfully resolved 5/5 hosts ✅ Notary Version: Successfully gathered notary version 4370 from https://notary.kolide.co:443/v2/kolide/launcher/_trust/tuf/targets/releases.json ✅ TUF: Successfully gathered release version launcher/linux/amd64/launcher-1.4.2.tar.gz from https://tuf.kolide.com:443/repository/targets.json ✅ Osquery Conflicts: No notable directories were detected ⚠️ Server Data: no server_data store in knapsack ✅ Osquery Data: hardware_serial: PF4PDLJ0, hardware_uuid: e028c44c-34e4-11b2-a85c-a66c703cae4c, hardware_vendor: LENOVO, os_build: , os_name: Ubuntu, os_version: 23.10 (Mantic Minotaur), hardware_model: 21K9001NUS

Checkups with warnings:

Checkups with failures:

--

So theres something wrong with gnome-extensions which could maybe explain the weird tray behavior (not triggering the browser popup to be able to register the device). The thing is if i manually run it from terminal, it works as expected:

/usr/bin/gnome-extensions show ubuntu-appindicators@ubuntu.com
ubuntu-appindicators@ubuntu.com
  Name: Ubuntu AppIndicators
  Description: Support app indicators and legacy tray icons in top panel, as the default Ubuntu experience. System update of AppIndicator and KStatusNotifierItem Support extension.
  Path: /usr/share/gnome-shell/extensions/ubuntu-appindicators@ubuntu.com
  URL: https://github.com/ubuntu/gnome-shell-extension-appindicator
  State: ENABLED

I've been troubleshooting it for a few hours now but I can't understand if thats the reason its failing to open the popup window to register the machine AND / OR why that error even exists that i cant replicate by putting in the command directly.

Also is the register link an specific link or just a general link I could go to and get my computer registered? Thanks all

RebeccaMahany commented 6 months ago

Hey @rolandoscott, I suspect you're running into https://github.com/kolide/launcher/issues/1537. Could you confirm if you're using wayland or x11?

The gnome-extensions error is unrelated and something we need to clean up -- sorry about the confusion there.

rolandoscott commented 6 months ago

Seems that it might be the same error.. thanks @RebeccaMahany for pointing me to the right direction..

echo "$XDG_SESSION_TYPE"
wayland
RebeccaMahany commented 6 months ago

No problem and thank you for confirming -- switching to x11 temporarily should let you use the register link in the menu bar app. You may have to restart the launcher service sudo systemctl restart launcher.kolide-k2.service first to get it to show back up.

rolandoscott commented 6 months ago

Oh nice.. thanks, will try that!

rolandoscott commented 6 months ago

@RebeccaMahany worked like a charm.. was able to register the device this way..

RebeccaMahany commented 6 months ago

Great, I'm glad that workaround worked and that you were able to register! We should hopefully be able to address https://github.com/kolide/launcher/issues/1537 soon.

RebeccaMahany commented 6 months ago

Closing to consolidate with https://github.com/kolide/launcher/issues/1537