ripxorip / kbd_stats

MIT License
9 stars 1 forks source link

Panics after a short time [Notifications Gnome] #1

Closed TomFaulkner closed 3 years ago

TomFaulkner commented 3 years ago

I am getting this error on Pop!_Os 21.04, a Ubuntu derivative.

I built from source on commit 5fc452522f9409c9207e49a6290810c43b377974, which was pulled today.

thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Error 
{ kind: Zbus(Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })) }', src/processor.rs:145:29

This happened after 49 keystrokes. I am running with this command: sudo /home/tom/.cargo/bin/kbd_stats --input_file=/dev/input/by-id/usb-ZSA_Technology_Labs_Inc_ErgoDox_EZ_Glow-event-kbd --notify_keys=50

I just ran it again and it happens even if all keystrokes are the letter a, so it doesn't seem to be a weird key combination.

On further attempts, this seems to happen when the notification is supposed to be triggered.

ripxorip commented 3 years ago

Hi, thanks for testing the app :)

The panic is raised when I am trying to show the notification through Zbus. If you omit the -n 50 it will work albeit without desktop notifications. I will try to spin in a Pop VM tomorrow and see why it isn't pleased with the notifications. I have tested i3 and plasma DE. Should work for gnome derivatives as well as far as I understand. I am relying on an external crate to display notifications, maybe I can get some hints in the repository of that crate. Don't forget that you can save the - stats to a file by using the output flag as well :) cheers

ripxorip commented 3 years ago

I think I figured it out. When you start the program with sudo it fails to talk to the bus from your session. Can you try adding yourself to the input group and start without sudo? That should do the trick?

TomFaulkner commented 3 years ago

I think I figured it out. When you start the program with sudo it fails to talk to the bus from your session. Can you try adding yourself to the input group and start without sudo? That should do the trick?

That would make sense. I'll try that.

TomFaulkner commented 3 years ago

That resolves the issue. Thanks!

ripxorip commented 3 years ago

Great, I have added a more verbose message when it falis to display notifications now.