evilsocket / opensnitch

OpenSnitch is a GNU/Linux interactive application firewall inspired by Little Snitch.
GNU General Public License v3.0
10.93k stars 510 forks source link

Service not working after log out and log in #1217

Open YukiXXL opened 1 week ago

YukiXXL commented 1 week ago

Describe the bug After logging out and logging back in, the service is running in the background but GUI is not. When opening any app that needs network, the request box is never shown and the app is automaticaly given permission to access the network like the service is disabled. Trying to start the GUI process with 'opensnitch-ui' sas "GUI already running, opening its window and exiting." but nothing happens. Only by killing the process and starting it again works.

Info:

To Reproduce Log out and log back in.

Post error logs: [2024-11-04 17:32:27]  WAR  Error while pinging UI service: rpc error: code = DeadlineExceeded desc = context deadline exceeded, state: READY [2024-11-04 17:32:29]  WAR  Error while pinging UI service: rpc error: code = DeadlineExceeded desc = context deadline exceeded, state: READY [2024-11-04 17:32:31]  WAR  Error while pinging UI service: rpc error: code = DeadlineExceeded desc = context deadline exceeded, state: READY [2024-11-04 17:32:33]  WAR  Error while pinging UI service: rpc error: code = DeadlineExceeded desc = context deadline exceeded, state: READY [2024-11-04 17:32:35]  WAR  Error while pinging UI service: rpc error: code = DeadlineExceeded desc = context deadline exceeded, state: READY [2024-11-04 17:32:37]  WAR  Error while pinging UI service: rpc error: code = DeadlineExceeded desc = context deadline exceeded, state: READY [2024-11-04 17:32:39]  WAR  Error while pinging UI service: rpc error: code = DeadlineExceeded desc = context deadline exceeded, state: READY [2024-11-04 17:32:41]  WAR  Error while pinging UI service: rpc error: code = DeadlineExceeded desc = context deadline exceeded, state: READY [2024-11-04 17:32:43]  WAR  Error while pinging UI service: rpc error: code = DeadlineExceeded desc = context deadline exceeded, state: READY [2024-11-04 17:32:45]  WAR  Error while pinging UI service: rpc error: code = DeadlineExceeded desc = context deadline exceeded, state: READY [2024-11-04 17:32:47]  WAR  Error while pinging UI service: rpc error: code = DeadlineExceeded desc = context deadline exceeded, state: READY [2024-11-04 17:32:48]  ERR  getting notifications: rpc error: code = Unavailable desc = keepalive watchdog timeout [2024-11-04 17:32:48]  WAR  Error while asking for rule: rpc error: code = Unavailable desc = transport is closing - /usr/bin/xbrlapi (8299) -> 127.0.0.1:4101 (proto:tcp uid:1001) [2024-11-04 17:32:48]  ERR  Invalid rule received, applying default action [2024-11-04 17:32:48]  ERR  Connection to the UI service lost.

(# /usr/bin/opensnitchd -rules-path /etc/opensnitchd/rules) ERROR: nfq_create_queue() queue not created

Additional context opensnitchd -check-requirements returns all passed.

gustavo-iniguez-goya commented 1 day ago

Hi @YukiXXL ,

Issue reproduced. When exiting the Cinnamon session our GUI is closed, but when entering again the GUI is launched, but for some reason the icon is not added to the systray.

I'll investigate what is causing this behaviour.

gustavo-iniguez-goya commented 18 hours ago

@YukiXXL , could you add this line at the bottom of /usr/bin/opensnitch-ui and let me know if the issue is fixed?

except KeyboardInterrupt:
    on_exit()
except Exception as e:
    print(e)

# this line   
on_exit()