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

opensnitch-ui (<= 1.6.0rc4-1.noarch) needs protobuf package to 3.20.x or lower #860

Closed
iolpltuisciaoln opened this issue Feb 25, 2023 · 9 comments

Comments

@iolpltuisciaoln
Copy link

opensnitch-ui-1.5.2-1.noarch.rpm as well as opensnitch-ui-1.6.0rc4-1.noarch.f29.rpm not starting after Fedora upgrade to 37

To Reproduce
Linux localhost.localdomain 6.1.13-200.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 22 17:53:57 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

rpm -i opensnitch-ui-1.6.0rc4-1.noarch.f29.rpm

Post error logs:
❯ opensnitch-ui
Traceback (most recent call last):
File "/usr/local/bin/opensnitch-ui", line 23, in
from opensnitch.service import UIService
File "/usr/lib/python3/dist-packages/opensnitch/service.py", line 13, in
from opensnitch import ui_pb2
File "/usr/lib/python3/dist-packages/opensnitch/ui_pb2.py", line 32, in
_descriptor.EnumValueDescriptor(
File "/usr/local/lib64/python3.11/site-packages/google/protobuf/descriptor.py", line 796, 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

@gustavo-iniguez-goya
Copy link
Collaborator

Hi @iolpltuisciaoln ,

Could launch the GUI from a terminal as follow?:
$ PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python opensnitch-ui

Let me know please if the GUI show up.

@iolpltuisciaoln
Copy link
Author

Yes GUI starts this way after about a minute.

@gustavo-iniguez-goya
Copy link
Collaborator

thank you @iolpltuisciaoln !

I'll try to reproduce it and find a solution. I've got an idea.

@gustavo-iniguez-goya
Copy link
Collaborator

@iolpltuisciaoln , could you post info of your packages python3-grpcio and python3-protobuf?
$ yum info python3-grpcio python3-protobuf

I've just installed it on Fedora 38 beta and it doesn't crash. Maybe this crash is caused by a specific version of protobuf/grpcio.

Fedora 38 versions: python3-grpcio 1.48.3, python3-protobuf 3.19.6

@iolpltuisciaoln
Copy link
Author

❯ dnf info python3-grpcio python3-protobuf
Last metadata expiration check: 2:57:38 ago on Sat 25 Feb 2023 11:41:39 MSK.
Installed Packages
Name : python3-protobuf
Version : 3.19.6
Release : 1.fc37
Architecture : x86_64
Size : 1.9 M
Source : protobuf-3.19.6-1.fc37.src.rpm
Repository : @System
From repo : updates
Summary : Python bindings for Google Protocol Buffers
URL : https://github.com/protocolbuffers/protobuf
License : BSD-3-Clause
Description : This package contains Python libraries for Google Protocol Buffers

Available Packages
Name : python3-grpcio
Version : 1.48.3
Release : 1.fc37
Architecture : x86_64
Size : 2.2 M
Source : grpc-1.48.3-1.fc37.src.rpm
Repository : updates
Summary : Python language bindings for gRPC
URL : https://www.grpc.io
License : Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND MIT
Description : Python language bindings for gRPC (HTTP/2-based RPC framework).

Name : python3-protobuf
Version : 3.19.4
Release : 6.fc37
Architecture : noarch
Size : 314 k
Source : protobuf-3.19.4-6.fc37.src.rpm
Repository : fedora
Summary : Python 3 bindings for Google Protocol Buffers
URL : https://github.com/protocolbuffers/protobuf
License : BSD
Description : This package contains Python 3 libraries for Google Protocol Buffers

@iolpltuisciaoln
Copy link
Author

It somehow uses python 3.11:
❯ pip3 show protobuf
Name: protobuf
Version: 4.22.0
Summary:
Home-page: https://developers.google.com/protocol-buffers/
Author: [email protected]
Author-email: [email protected]
License: 3-Clause BSD License
Location: /usr/local/lib64/python3.11/site-packages
Requires:
Required-by: Electrum, grpcio-tools

@gustavo-iniguez-goya
Copy link
Collaborator

gustavo-iniguez-goya commented Feb 25, 2023

thank you @iolpltuisciaoln , I'll regenerate the protobuffers with 3.19.0 and will post them here for you to test them (in 8h more or less...)

@gustavo-iniguez-goya
Copy link
Collaborator

gustavo-iniguez-goya commented Feb 26, 2023

I'm unable to reproduce this issue 👎 and the current protobuffers seems to be generated with v3.20.0, so for now you'll have to use the above workaround, well adding it to your ~/.bashrc well adding it to your /etc/environment file.

By the way, regarding the delay showing up the GUI, you'll need to install and enable the extension gnome-shell-extension-appindicator: https://github.com/evilsocket/opensnitch/wiki/Known-problems#opensnitch-icon-does-not-show-up-on-gnome-shell

@iolpltuisciaoln
Copy link
Author

partially fixed with
pip3 uninstall protobuf
starting is slow tho, gnome-shell-extension-appindicato and python3-notify2 are installed.
probably fc37 issue

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