Skip to content

[Bug Report] list_subscriptions plugin prevents the UI from starting with protobuf < 3.20 (Fedora 44) #1683

Description

@aadrian

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:

  1. Build the rpm from master (utils/packaging/ui/rpm/opensnitch-ui.spec) and install it on Fedora 44.
  2. Enable the plugin in ~/.config/opensnitch/settings.conf:
    [plugins]
    list=list_subscriptions
    
  3. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions