ProtonVPN / proton-vpn-gtk-app

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

AttributeError: 'KeyringBackendLinuxSecretService' object has no attribute 'KEYRING_SERVICE' #44

Closed Anonymous941 closed 2 months ago

Anonymous941 commented 2 months ago

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

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


When executing protonvpn-app after updating:

(protonvpn-app:1227797): Gdk-WARNING **: 14:49:26.033: Failed to read portal settings: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Settings” on object at path /org/freedesktop/portal/desktop
Traceback (most recent call last):
  File "/usr/bin/protonvpn-app", line 33, in <module>
    sys.exit(load_entry_point('proton-vpn-gtk-app==4.3.0', 'console_scripts', 'protonvpn-app')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/proton/vpn/app/gtk/__main__.py", line 34, in main
    controller = Controller.get(executor)
                 ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/proton/vpn/app/gtk/controller.py", line 57, 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 "/usr/lib/python3/dist-packages/proton/vpn/app/gtk/controller.py", line 97, in initialize_vpn_connector
    self._connector = await self._api.get_vpn_connector()
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/proton/vpn/core/api.py", line 55, in get_vpn_connector
    settings = await self.load_settings()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/proton/vpn/core/api.py", line 65, in load_settings
    if self._session_holder.session.logged_in:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/proton/vpn/core/session.py", line 73, in session
    self._session = self._proton_sso.get_default_session(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/proton/sso/sso.py", line 192, in get_default_session
    sessions = self.sessions
               ^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/proton/sso/sso.py", line 133, in sessions
    keyring_index = keyring[self.__keyring_index_name()]
                    ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/proton/keyring/_base.py", line 65, in __getitem__
    return self._get_item(key)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/proton/keyring_linux/secretservice/secretservice_backend.py", line 57, in _get_item
    self.KEYRING_SERVICE,
    ^^^^^^^^^^^^^^^^^^^^
AttributeError: 'KeyringBackendLinuxSecretService' object has no attribute 'KEYRING_SERVICE'
calexandru2018 commented 2 months ago

Make sure that you've updated both packages, it seems like you didn't update the linux-keyring one

Anonymous941 commented 2 months ago

For some reason, all attempts to upgrade that package fail (running apt update && apt upgrade and pip3 install proton-keyring-linux==0.0.2 both result in an error), but cloning the source and building manually somehow fixed it

calexandru2018 commented 2 months ago

Then I suspect that either you were doing something wrong or something wrong was with your system, because installing it via pip we don't have versions requirements/conflicts, so it should be something else blocking it.

Edit: I've asked our QA to give this a try, but honestly we've QAed this before releasing and we didn't detect this issue.

Anonymous941 commented 2 months ago

Sorry, this turned out to be caused by my testing of this package for the PR, and using the depreciated setup.py to install

calexandru2018 commented 2 months ago

Gotcha, thanks for coming back 💯

Anonymous941 commented 2 months ago

Thanks for maintaining this repository! I'm really excited about the recent bugfixes and features