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

GUI crashes on start #524

Closed TamasBarta closed 3 years ago

TamasBarta commented 3 years ago

Hi,

Describe the bug I installed OpenSnitch on Arch Linux to try it, but I can't run the GUI as it crashes on start.

To Reproduce

Steps to reproduce the behavior:

  1. Install https://aur.archlinux.org/packages/opensnitch/ (yay -S opensnitch)
  2. Run the GUI from the terminal

Post error logs:

$ opensnitch-ui
Traceback (most recent call last):
  File "/usr/bin/opensnitch-ui", line 22, in <module>
    from opensnitch.service import UIService
  File "/usr/lib/python3.9/site-packages/opensnitch/service.py", line 13, in <module>
    from opensnitch import ui_pb2
  File "/usr/lib/python3.9/site-packages/opensnitch/ui_pb2.py", line 22, in <module>
    create_key=_descriptor._internal_create_key,
AttributeError: module 'google.protobuf.descriptor' has no attribute '_internal_create_key'

Expected behavior (optional) A clear and concise description of what you expected to happen.

OS (please complete the following information):

Additional context

Installed packages/versions:

$ pacman -Q python-protobuf python-grpcio python-grpcio-tools opensnitch 
python-protobuf 3.17.3-1
python-grpcio 1.41.0-1
python-grpcio-tools 1.41.0-1
opensnitch 1.4.1-2
gustavo-iniguez-goya commented 3 years ago

Hi @TamasBarta ,

See if you have an old protobuf version installed via pip: pip3 list | grep protobuf If so remove or upgrade it.

TamasBarta commented 3 years ago

Something must be really messed up, as pip list already crashes. I'll figure out. Until I figure it out, I'll close this issue, as it seems like it is caused by my setup.

gustavo-iniguez-goya commented 3 years ago

thank you @TamasBarta !

Wouter1 commented 2 years ago

@TamasBarta @gustavo-iniguez-goya

I had the same error, on fresh installed ubuntu 20 LTS.

Problems were caused by old python libraries that come with ubuntu

default PyQT5 is 5.14.1 default protobuf is 3.6.1

I had to do a pip install --upgrade of both modules before it worked.

May I suggest that the install procedure on the https://github.com/evilsocket/opensnitch/wiki/Compilation checks the minimum versions of all required packages and upgrades if needed?

Also when you run opensnitch-ui the only thing that appears is a very small icon in the top menu bar. You have to click on that icon to open the UI. The opensnitch-ui itself just gives a short message "connecting to server" or something and it seems it's just hanging. I think this is ment as a background task to start at login time as background process.

gustavo-iniguez-goya commented 2 years ago

Hi @Wouter1 !

May I suggest that the install procedure on the https://github.com/evilsocket/opensnitch/wiki/Compilation checks the minimum versions of all required packages and upgrades if needed?

Sure, I'll add it soon. I've just downloaded and tested latest ubuntu 20.04.3 and using the dependencies from the repositories the GUI works just fine: python3-grpcio 1.16.1, python3-unicode 1.1.1, python3-slugify 4.0.0 and python3-protobuf 3.6.1.3

Also when you run opensnitch-ui the only thing that appears is a very small icon in the top menu bar. You have to click on that icon to open the UI. The opensnitch-ui itself just gives a short message "connecting to server" or something and it seems it's just hanging. I think this is ment as a background task to start at login time as background process.

mm, I haven't seen that message "connecting to server". When I click on the systray icon, a dropdown menu shows up, then click on "Events" and the GUI is launched.

Wouter1 commented 2 years ago

Yes. Except that my dropdown looks different, without Events:

I think most users expect a window GUI to pop up immediately when they start a bla.ui application. So I would suggest adding some explanation there in the wiki page.

BTW it works great , many thanks for providing this.

gustavo-iniguez-goya commented 2 years ago

ok, I see. The thing is that that behaviour depends on the Desktop Environment. On Cinnamon, LxQt, KDE and some others, clicking on the systray icon displays the GUI . That's our default behaviour, but some DEs override it.

Ok, I'll add an explanation to the wiki.