Describe the bug:
With the list_subscriptions plugin enabled, opensnitch-ui exits at startup on systems with protobuf older than 3.20, such as Fedora 44 (python3-protobuf 3.19.6).
plugins/list_subscriptions/ui/controllers/rules_attachment_controller.py imports the protobuf code directly:
from opensnitch.proto import ui_pb2 as ui_pb2
All other modules use opensnitch.proto.import_(), which picks proto.pre3200 for protobuf < 3.20. The direct import loads the code generated for newer protobuf versions, which fails, and the UI exits.
This affects the next release 1.9.0: every user with protobuf < 3.20 who enables the plugin. It should be fixed before 1.9.0 is released.
Include the following information:
- OpenSnitch version: master (a135384, 1.9.0)
- OS: Fedora Linux
- OS version: 44 (python 3.14.7, PyQt6 6.11.0, protobuf 3.19.6, grpcio 1.48.4)
- Window Manager: none (reproduced in a container, QT_QPA_PLATFORM=offscreen)
- Kernel version: not relevant (container)
To Reproduce:
- Build the rpm from master (
utils/packaging/ui/rpm/opensnitch-ui.spec) and install it on Fedora 44.
- Enable the plugin in
~/.config/opensnitch/settings.conf:
[plugins]
list=list_subscriptions
- Launch
opensnitch-ui.
Without the plugin enabled, the UI starts normally.
Post error logs:
[WARNING][opensnitch-ui:<module>:348] exception: ImportError("cannot import name 'builder' from 'google.protobuf.internal' (/usr/lib/python3.14/site-packages/google/protobuf/internal/__init__.py)")
opensnitch-ui then exits with status 0.
Expected behavior (optional):
The plugin loads with any protobuf version the UI supports, using opensnitch.proto.import_() like the other modules.
Describe the bug:
With the
list_subscriptionsplugin enabled, opensnitch-ui exits at startup on systems with protobuf older than 3.20, such as Fedora 44 (python3-protobuf 3.19.6).plugins/list_subscriptions/ui/controllers/rules_attachment_controller.pyimports the protobuf code directly:All other modules use
opensnitch.proto.import_(), which picksproto.pre3200for protobuf < 3.20. The direct import loads the code generated for newer protobuf versions, which fails, and the UI exits.This affects the next release 1.9.0: every user with protobuf < 3.20 who enables the plugin. It should be fixed before 1.9.0 is released.
Include the following information:
To Reproduce:
utils/packaging/ui/rpm/opensnitch-ui.spec) and install it on Fedora 44.~/.config/opensnitch/settings.conf:opensnitch-ui.Without the plugin enabled, the UI starts normally.
Post error logs:
opensnitch-ui then exits with status 0.
Expected behavior (optional):
The plugin loads with any protobuf version the UI supports, using
opensnitch.proto.import_()like the other modules.