flathub / com.protonvpn.www

https://flathub.org/apps/details/com.protonvpn.www
10 stars 1 forks source link

Protonvpn will not launch if you suspend the pc while it's connected then quit it. #220

Open Growebis opened 2 months ago

Growebis commented 2 months ago

If i leave my Protonvpn connection on and i suspend the laptop, upon waking it up it drops the connection and refuses to cancel the connection, when quitting the app and then opening it again, it doesn't open at all. I managed to get logs by running flatpak run com.protonvpn.www so here is what i got:

Gtk-Message: 13:34:54.307: Failed to load module "xapp-gtk3-module"
2024-04-09T10:34:54.771774 | proton.vpn.connection.vpnconnector:238 | INFO | CONN:STATE_CHANGED | Disconnected (initial state)
Traceback (most recent call last):
  File "/app/bin/protonvpn-app", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/app/lib/python3.11/site-packages/proton/vpn/app/gtk/__main__.py", line 34, in main
    controller = Controller.get(executor)
                 ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/proton/vpn/app/gtk/controller.py", line 56, in get
    executor.submit(controller.initialize_vpn_connector).result()
  File "/usr/lib/python3.11/concurrent/futures/_base.py", line 456, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/app/lib/python3.11/site-packages/proton/vpn/app/gtk/controller.py", line 89, in initialize_vpn_connector
    self._connector = await self._api.get_vpn_connector()
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/proton/vpn/core/api.py", line 54, in get_vpn_connector
    vpn_connector = await VPNConnector.get_instance(settings)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/proton/vpn/connection/vpnconnector.py", line 66, in get_instance
    await cls._instance.initialize_state(initial_state)
  File "/app/lib/python3.11/site-packages/proton/vpn/connection/vpnconnector.py", line 149, in initialize_state
    await self._update_state(state)
  File "/app/lib/python3.11/site-packages/proton/vpn/connection/vpnconnector.py", line 250, in _update_state
    new_event = await state_tasks
                ^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/proton/vpn/connection/states.py", line 176, in run_tasks
    await self.context.kill_switch.disable()
  File "/app/lib/python3.11/site-packages/proton/vpn/killswitch/backend/linux/networkmanager/nmkillswitch.py", line 77, in disable
    await self._ks_handler.remove_full_killswitch_connection()
  File "/app/lib/python3.11/site-packages/proton/vpn/killswitch/backend/linux/networkmanager/killswitch_connection_handler.py", line 202, in remove_full_killswitch_connection
    await self._remove_connection(_get_connection_id(permanent=False))
  File "/app/lib/python3.11/site-packages/proton/vpn/killswitch/backend/linux/networkmanager/killswitch_connection_handler.py", line 228, in _remove_connection
    await _wrap_future(self.nm_client.remove_connection_async(connection))
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/proton/vpn/killswitch/backend/linux/networkmanager/nmclient.py", line 228, in remove_connection_async
    self._run_on_glib_loop_thread(_remove_connection_async).result()
  File "/usr/lib/python3.11/concurrent/futures/_base.py", line 456, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/app/lib/python3.11/site-packages/proton/vpn/killswitch/backend/linux/networkmanager/nmclient.py", line 116, in wrapper
    future.set_result(function(*args, **kwargs))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/lib/python3.11/site-packages/proton/vpn/killswitch/backend/linux/networkmanager/nmclient.py", line 215, in _remove_connection_async
    handler_id = device.connect("state-changed", _on_interface_state_changed)
                 ^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'connect'

While restarting it is the easy solution, sometimes its difficult to restart if one has a lot of tabs open or they have work to be done. Running Linux Mint 21.3 Cinnamon Xorg.

proletarius101 commented 2 months ago

Can you reproduce this issue with the DEB packages? It looks to me like a NetworkManager incompatibility

Growebis commented 2 months ago

Can you reproduce this issue with the DEB packages? It looks to me like a NetworkManager incompatibility

I tried with the DEB version, however it seems as though after a suspend, i can disconnect then reconnect and it worked (although i did get the prompt to for authentication required but after a few tries it worked)

proletarius101 commented 2 months ago

If you are able to reproduce the issue with the DEB version, it's an upstream bug. You need to report the issue to Proton and ask them to fix it. This repository is nothing but a repackaging of the upstream software.