Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI does not work in Ubuntu 20.04 #678

Closed
pabloab opened this issue Jun 25, 2022 · 8 comments
Closed

UI does not work in Ubuntu 20.04 #678

pabloab opened this issue Jun 25, 2022 · 8 comments

Comments

@pabloab
Copy link

pabloab commented Jun 25, 2022

OpenSnitch (service and UI) was running fine on my Ubuntu 20.04, v1.5.0. Not sure why now UI crush with (service status is fine):

$ /bin/sh -c 'pkill -15 opensnitch-ui; opensnitch-ui'
Traceback (most recent call last):
  File "/usr/bin/opensnitch-ui", line 23, in <module>
    from opensnitch.service import UIService
  File "/usr/lib/python3/dist-packages/opensnitch/service.py", line 13, in <module>
    from opensnitch import ui_pb2
  File "/usr/lib/python3/dist-packages/opensnitch/ui_pb2.py", line 32, in <module>
    _descriptor.EnumValueDescriptor(
  File "/home/pablo/.local/lib/python3.8/site-packages/google/protobuf/descriptor.py", line 755, in __new__
    _message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates

Doesn't seem related to issue #647 (pip3 install --ignore-installed grpcio doesn't solve the issue). Tried installing last stable version (python3-opensnitch-ui v1.5.1-1) without luck (no errors through the installation).

Using Ubuntu 20.04.4 LTS, GNOME Shell, Linux 5.4.0-120-generic #136-Ubuntu SMP Fri Jun 10 13:40:48 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux. python3-protobuf v3.6.1.3-2ubuntu5.

To reproduce, run /bin/sh -c 'pkill -15 opensnitch-ui; opensnitch-ui' on a terminal.

@gustavo-iniguez-goya
Copy link
Collaborator

Hi @pabloab ,

Could you post your python3-protobuf installed version? $ dpkg -l 'python3-protobuf'

Also, could you launch the GUI as follow?:
$ export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python opensnitch-ui

Thak you for reporting this issue! I'll try to reproduce it to try several things before bothering you with more tests.

@gustavo-iniguez-goya
Copy link
Collaborator

On a fresh ubuntu 20.04 installation, with python3-protobuf 3.6.1 (3.6.1.3-2ubuntu5) and python3-grpcio (1.16.1-1ubuntu5) 1.16.1 the GUI works fine as expected.

was running fine on my Ubuntu 20.04, v1.5.0. Not sure why now UI crush

mmh, have you installed or upgraded recently anything?

@pabloab
Copy link
Author

pabloab commented Jun 26, 2022

Could you post your python3-protobuf installed version? $ dpkg -l 'python3-protobuf'

python3-protobuf 3.6.1.3-2ubuntu5

Also, could you launch the GUI as follow?: $ export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python opensnitch-ui

bash: export: `opensnitch-ui': not a valid identifier

$ which python -> /usr/bin/python -> /etc/alternatives/python -> /usr/bin/python3. $ python --version: Python 3.8.10.

mmh, have you installed or upgraded recently anything?

Beside just regular apt update/upgrade, I had some issues between guake (build from source) and python libraries installed through brew.

and python3-grpcio (1.16.1-1ubuntu5) 1.16.1

I installed python3-grpcio (apt) and now it's working. I uninstalled it a couple of days ago (UI stopped working weeks ago) trying to fix this issue (maybe based on this comment), so it is unclear to me what happened.

@pabloab pabloab closed this as completed Jun 26, 2022
@gustavo-iniguez-goya
Copy link
Collaborator

🎉 :)

@pabloab
Copy link
Author

pabloab commented Jun 27, 2022

A regular apt autoremove removed python3-protobuf (only). After that, pkill -15 opensnitch-ui; opensnitch-ui crash with the same first stack trace. Installed python3-protobuf again immediately, but it still crashes the same way.

$ dpkg -l | egrep "python3-protobuf|python3-grpcio" | awk '{print $2" "$3}'; pkill -15 opensnitch-ui; opensnitch-ui
python3-grpcio 1.16.1-1ubuntu5
python3-protobuf 3.6.1.3-2ubuntu5
Traceback (most recent call last):
  File "/usr/bin/opensnitch-ui", line 23, in <module>
...

@pabloab pabloab reopened this Jun 27, 2022
@gustavo-iniguez-goya
Copy link
Collaborator

@pabloab see if you have any python3-protobuf or python3-grpcio locally installed, either in your home: ~/.local/lib/python* or globally /usr/local/lib/python*

If you have any of those packages installed in those directories remove them with pip and try again. It looks like a compatbility problem between installed versions.

@gustavo-iniguez-goya
Copy link
Collaborator

closing, follow last comment to address this problem.

@pabloab
Copy link
Author

pabloab commented Dec 1, 2022

ls -lahR ~/.local/lib/python* /usr/local/lib/python* | egrep "python3-protobuf|python3-grpcio" didn't return anything, but today start working. grep upgrade /var/log/dpkg.log | grep py doesn't return anything either.

Maybe not related, but I recently fix an issue with locale command. Was using /home/linuxbrew/.linuxbrew/bin/locale instead of the one it comes with libc-bin package. Homebrew were adding its stuff in $PATH, so it has priority, and maybe its glibc version conflict with standard one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants