ProtonVPN / proton-vpn-gtk-app

Official ProtonVPN Linux app
https://protonvpn.com/download-linux
GNU General Public License v3.0
238 stars 31 forks source link

Application unusable due to KDE Plasma SSTP dependencies #60

Open BrotherPatrix opened 4 months ago

BrotherPatrix commented 4 months ago

We are happy to answer your questions about the code or discuss technical ideas.

Please complete the following checklist (by adding [x]):


Recently on my Fedora 40 spin with KDE Plasma, as of KDE Plasma 6.1.2 it seems that an update automatically installs the package plasma-nm-sstp, which also installs the following dependencies: NetworkManager-sstp, sstp-client. After these packages are automatically installed, the ProtonVPN app does not work anymore and I get the following error:

2024-07-13T06:17:20.384110 | proton.vpn.connection.vpnconnector:238 | INFO | CONN:STATE_CHANGED | Connecting
2024-07-13T06:17:20.559496 | proton.vpn.backend.linux.networkmanager.core.networkmanager:91 | INFO | VPN server REACHABLE.
2024-07-13T06:17:20.562424 | proton.vpn.app.gtk.widgets.main.exception_handler:175 | CRITICAL | APP:CRASH | Unexpected error.
Traceback (most recent call last):
  File "/usr/lib64/python3.12/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/usr/lib/python3.12/site-packages/proton/vpn/core/connection.py", line 165, in connect
    await self._connector.connect(
  File "/usr/lib/python3.12/site-packages/proton/vpn/connection/vpnconnector.py", line 198, in connect
    await self._on_connection_event(
  File "/usr/lib/python3.12/site-packages/proton/vpn/connection/vpnconnector.py", line 230, in _on_connection_event
    event = await self._update_state(new_state)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/proton/vpn/connection/vpnconnector.py", line 250, in _update_state
    new_event = await state_tasks
                ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/proton/vpn/connection/states.py", line 230, in run_tasks
    await self.context.connection.start()
  File "/usr/lib/python3.12/site-packages/proton/vpn/backend/linux/networkmanager/core/networkmanager.py", line 98, in start
    future_connection = self.setup()  # Creates the network manager connection.
                        ^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/proton/vpn/backend/linux/networkmanager/protocol/openvpn/openvpn.py", line 47, in setup
    self._generate_connection()
  File "/usr/lib/python3.12/site-packages/proton/vpn/backend/linux/networkmanager/protocol/openvpn/openvpn.py", line 56, in _generate_connection
    self.connection = self._import_vpn_config(vpnconfig)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/proton/vpn/backend/linux/networkmanager/core/networkmanager.py", line 360, in _import_vpn_config
    plugin_editor = plugin.load_editor_plugin()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
gi.repository.GLib.GError: g-file-error-quark: Plugin file does not exist (/usr/lib64/NetworkManager/libnm-vpn-plugin-sstp.so) (4)
2024-07-13T06:17:20.624325 | urllib3.connectionpool:826 | WARNING | Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ffb090f94f0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /core/v4/reports/sentry/api/25/store/
2024-07-13T06:17:20.624825 | urllib3.connectionpool:826 | WARNING | Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ffb08f33920>: Failed to establish a new connection: [Errno -2] Name or service not known')': /core/v4/reports/sentry/api/25/store/
2024-07-13T06:17:20.625218 | urllib3.connectionpool:826 | WARNING | Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ffb08f33e30>: Failed to establish a new connection: [Errno -2] Name or service not known')': /core/v4/reports/sentry/api/25/store/

I have yet to confirm that this will happen also on Fedora 40 Workstation Edition, which is with Gnome. Uninstalling the plasma-nm-sstp packages, which automatically removes the dependencies as well, fixes the problem.

My question is: Can this not be fixed on your side?

I've had issues with this in the past because I had a client that uses this VPN. It's hard for me to see if this is an issue with the package or with the app, but I fear this will affect many other distributions that uses NetworkManager and extensions for SSTP.

calexandru2018 commented 3 months ago

Hey @BrotherPatrix

So here's a two part situation. First we don't test on KDE, even though from common knowledge it should work. Second is that it's the plugin that seems to be broken somehow, because all plugins should be loadable (the package does not have python bindings).

Dekomoro commented 2 months ago

there are missing dependencies on the package that are pulled in by proton-vpn-gnome-desktop but not proton-vpn-gtk-app. you can fix this error by installing those dependencies with sudo dnf install python3-proton-keyring-linux python3-proton-keyring-linux-secretservice python3-proton-vpn-killswitch-network-manager python3-proton-vpn-killswitch-network-manager-wireguard python3-proton-vpn-local-agent python3-proton-vpn-network-manager python3-proton-vpn-network-manager-openvpn python3-proton-vpn-network-manager-wireguard

Dekomoro commented 2 months ago

I got the exact same error as OP, which makes me think that this may be the same issue.