Skip to content

Cant connect on headless server enviroment due to keyring fails #2

Open

Description

@Buddycat-64

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

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

  • I have searched open and closed issues for duplicates
  • This isn't a feature request
  • This is not a report about my app not working as expected

Hello proton team

when trying to connect I get an error about keychains and DBUS
as far as I'm aware this happens as:

usually when connecting it calls on seahorse to create a keychain with the server credentials, but this requires a GUI due to user confirmation and as I have no GUI the create keychain request throws a DISMISSED error, this is apparent in the logs, any help would be apricated

[LOG:]

2025-11-22T11:39:01.815887+00:00 | proton.keyring_linux.core.keyring_linux:120 | ERROR | Keyring keyring.backends.SecretService.Keyring (priority: 5) error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/secretstorage/util.py", line 46, in send_and_get_reply
return self._connection.send_and_get_reply(msg, unwrap=True)
File "/usr/lib/python3/dist-packages/jeepney/io/blocking.py", line 190, in send_and_get_reply
return unwrap_msg(msg_in)
File "/usr/lib/python3/dist-packages/jeepney/wrappers.py", line 214, in unwrap_msg
raise DBusErrorResponse(msg)
jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.UnknownMethod] ('Object does not exist at path “/org/freedesktop/secrets/collection/login”',)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/secretstorage/collection.py", line 161, in get_default_collection
return Collection(connection)
File "/usr/lib/python3/dist-packages/secretstorage/collection.py", line 44, in init
self._collection.get_property('Label')
File "/usr/lib/python3/dist-packages/secretstorage/util.py", line 64, in get_property
(signature, value), = self.send_and_get_reply(msg)
File "/usr/lib/python3/dist-packages/secretstorage/util.py", line 49, in send_and_get_reply
raise ItemNotFoundException('Item does not exist!') from resp
secretstorage.exceptions.ItemNotFoundException: Item does not exist!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/keyring/backends/SecretService.py", line 61, in get_preferred_collection
collection = secretstorage.get_default_collection(bus)
File "/usr/lib/python3/dist-packages/secretstorage/collection.py", line 163, in get_default_collection
return create_collection(connection, 'Default',
File "/usr/lib/python3/dist-packages/secretstorage/collection.py", line 145, in create_collection
raise PromptDismissedException('Prompt dismissed.')
secretstorage.exceptions.PromptDismissedException: Prompt dismissed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/proton/keyring_linux/core/keyring_linux.py", line 111, in _is_backend_working
keyring_backend.get_password(
File "/usr/lib/python3/dist-packages/keyring/backends/SecretService.py", line 78, in get_password
collection = self.get_preferred_collection()
File "/usr/lib/python3/dist-packages/keyring/backends/SecretService.py", line 63, in get_preferred_collection
raise InitError("Failed to create the collection: %s." % e)
keyring.errors.InitError: Failed to create the collection: Prompt dismissed..
2025-11-22T11:39:01.972425+00:00 | proton.keyring_linux.core.keyring_linux:120 | ERROR | Keyring keyring.backends.SecretService.Keyring (priority: 5) error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/secretstorage/util.py", line 46, in send_and_get_reply
return self._connection.send_and_get_reply(msg, unwrap=True)
File "/usr/lib/python3/dist-packages/jeepney/io/blocking.py", line 190, in send_and_get_reply
return unwrap_msg(msg_in)
File "/usr/lib/python3/dist-packages/jeepney/wrappers.py", line 214, in unwrap_msg
raise DBusErrorResponse(msg)
jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.UnknownMethod] ('Object does not exist at path “/org/freedesktop/secrets/collection/login”',)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/secretstorage/collection.py", line 161, in get_default_collection
return Collection(connection)
File "/usr/lib/python3/dist-packages/secretstorage/collection.py", line 44, in init
self._collection.get_property('Label')
File "/usr/lib/python3/dist-packages/secretstorage/util.py", line 64, in get_property
(signature, value), = self.send_and_get_reply(msg)
File "/usr/lib/python3/dist-packages/secretstorage/util.py", line 49, in send_and_get_reply
raise ItemNotFoundException('Item does not exist!') from resp
secretstorage.exceptions.ItemNotFoundException: Item does not exist!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/keyring/backends/SecretService.py", line 61, in get_preferred_collection
collection = secretstorage.get_default_collection(bus)
File "/usr/lib/python3/dist-packages/secretstorage/collection.py", line 163, in get_default_collection
return create_collection(connection, 'Default',
File "/usr/lib/python3/dist-packages/secretstorage/collection.py", line 145, in create_collection
raise PromptDismissedException('Prompt dismissed.')
secretstorage.exceptions.PromptDismissedException: Prompt dismissed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/proton/keyring_linux/core/keyring_linux.py", line 111, in _is_backend_working
keyring_backend.get_password(
File "/usr/lib/python3/dist-packages/keyring/backends/SecretService.py", line 78, in get_password
collection = self.get_preferred_collection()
File "/usr/lib/python3/dist-packages/keyring/backends/SecretService.py", line 63, in get_preferred_collection
raise InitError("Failed to create the collection: %s." % e)
keyring.errors.InitError: Failed to create the collection: Prompt dismissed..
2025-11-22T11:39:02.398195+00:00 | proton.keyring_linux.core.keyring_linux:120 | ERROR | Keyring keyring.backends.SecretService.Keyring (priority: 5) error
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/secretstorage/util.py", line 46, in send_and_get_reply
return self._connection.send_and_get_reply(msg, unwrap=True)
File "/usr/lib/python3/dist-packages/jeepney/io/blocking.py", line 190, in send_and_get_reply
return unwrap_msg(msg_in)
File "/usr/lib/python3/dist-packages/jeepney/wrappers.py", line 214, in unwrap_msg
raise DBusErrorResponse(msg)
jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.UnknownMethod] ('Object does not exist at path “/org/freedesktop/secrets/collection/login”',)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/secretstorage/collection.py", line 161, in get_default_collection
return Collection(connection)
File "/usr/lib/python3/dist-packages/secretstorage/collection.py", line 44, in init
self._collection.get_property('Label')
File "/usr/lib/python3/dist-packages/secretstorage/util.py", line 64, in get_property
(signature, value), = self.send_and_get_reply(msg)
File "/usr/lib/python3/dist-packages/secretstorage/util.py", line 49, in send_and_get_reply
raise ItemNotFoundException('Item does not exist!') from resp
secretstorage.exceptions.ItemNotFoundException: Item does not exist!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/keyring/backends/SecretService.py", line 61, in get_preferred_collection
collection = secretstorage.get_default_collection(bus)
File "/usr/lib/python3/dist-packages/secretstorage/collection.py", line 163, in get_default_collection
return create_collection(connection, 'Default',
File "/usr/lib/python3/dist-packages/secretstorage/collection.py", line 145, in create_collection
raise PromptDismissedException('Prompt dismissed.')
secretstorage.exceptions.PromptDismissedException: Prompt dismissed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/proton/keyring_linux/core/keyring_linux.py", line 111, in _is_backend_working
keyring_backend.get_password(
File "/usr/lib/python3/dist-packages/keyring/backends/SecretService.py", line 78, in get_password
collection = self.get_preferred_collection()
File "/usr/lib/python3/dist-packages/keyring/backends/SecretService.py", line 63, in get_preferred_collection
raise InitError("Failed to create the collection: %s." % e)
keyring.errors.InitError: Failed to create the collection: Prompt dismissed..

Activity

  1. alexwhb commented on Dec 1, 2025

    @alexwhb

    I'm having this issue as well on a Ubuntu 24 LTS server

  2. Buddycat-64 commented on Dec 1, 2025

    @Buddycat-64
    Author

    A workaround that may work it’s downloading the ovpn/wireguard files then manually connecting to there servers using those files and openvpn/wireguard

  3. alexwhb commented on Dec 1, 2025

    @alexwhb

    @Buddycat-64 thank you for that suggestion. :) I actually have done that on my router and it works. This server that I'm setting up actually was intended to sit in between my modem and my router and be the VPN for my whole home. The reason being... those individual wire guard configs work for a month or so... and then they randomly stop working which takes down my whole home's internet, so I want to script something that's more resilient. I imagine they stop working probably due to those servers on occasion getting over loaded or something. It's definitely not a huge deal, but would be really cool to have a stable whole home VPN.

  4. Buddycat-64 commented on Dec 1, 2025

    @Buddycat-64
    Author

    The fact that they randomly shut off and the connection drops have you considered using either open VPN or a keep alive?

  5. yutayu commented on Dec 12, 2025

    @yutayu

    I want to make proton-vpn-cli autostart at boot.
    Although It requies manually input Keyring .

  6. jsuelwald commented on Dec 17, 2025

    @jsuelwald

    I also ran into that issue, would be nice to use this on a server without any gui

  7. Buddycat-64 commented on Dec 17, 2025

    @Buddycat-64
    Author

    Sadly I have no coding skills to fix this

    I can do a tiny bit of BASH and that’s literally it

  8. kapipapi commented on Dec 18, 2025

    @kapipapi

    Same on headless Ubuntu Server 24.04.2 LTS

  9. Buddycat-64 commented on Dec 19, 2025

    @Buddycat-64
    Author

    That’s literally what I’m using 🤣

  10. Symmetricity commented on Dec 22, 2025

    @Symmetricity

    I ran into this problem as well. I was able to get past the keyring error by following the instructions here: https://keyring.readthedocs.io/en/latest/#using-keyring-on-headless-linux-systems
    Notably I did not need to start the additional Dbus session - skipped that step.
    This doesn't resolve the underlying issue of the CLI having a dependency on a GUI, but is a workaround.

  11. Buddycat-64 commented on Dec 22, 2025

    @Buddycat-64
    Author

    Dude your a genius

  12. Buddycat-64 commented on Dec 22, 2025

    @Buddycat-64
    Author

    Thanks, I’ve a found a new VPN solution for different means but still, thanks

  13. Symmetricity commented on Dec 23, 2025

    @Symmetricity

    Just to add, since I was having a further issue with headless Ubuntu (was using the Ubuntu minimal cloud image): You also need to have NetworkManager managing the interface for it to work, since the cli backend uses NetworkManager.
    Solution here: https://askubuntu.com/a/1075112

  14. valentin-baron commented on Dec 24, 2025

    @valentin-baron

    I'm having the same issue on my raspberry pi:

    protonvpn signin my_user_name
    2025-12-24T13:35:40.692678+00:00 | proton.keyring_linux.core.keyring_linux:120 | ERROR | Keyring keyring.backends.SecretService.Keyring (priority: 5) error
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/secretstorage/util.py", line 48, in send_and_get_reply
        raise DBusErrorResponse(resp_msg)
    jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.UnknownMethod] ('Object does not exist at path “/org/freedesktop/secrets/collection/login”',)
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/secretstorage/collection.py", line 177, in get_default_collection
        return Collection(connection)
      File "/usr/lib/python3/dist-packages/secretstorage/collection.py", line 45, in __init__
        self._collection.get_property('Label')
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
      File "/usr/lib/python3/dist-packages/secretstorage/util.py", line 67, in get_property
        (signature, value), = self.send_and_get_reply(msg)
                              ~~~~~~~~~~~~~~~~~~~~~~~^^^^^
      File "/usr/lib/python3/dist-packages/secretstorage/util.py", line 52, in send_and_get_reply
        raise ItemNotFoundException('Item does not exist!') from resp
    secretstorage.exceptions.ItemNotFoundException: Item does not exist!
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/keyring/backends/SecretService.py", line 62, in get_preferred_collection
        collection = secretstorage.get_default_collection(bus)
      File "/usr/lib/python3/dist-packages/secretstorage/collection.py", line 179, in get_default_collection
        return create_collection(connection, 'Default', 'default', session)
      File "/usr/lib/python3/dist-packages/secretstorage/collection.py", line 159, in create_collection
        raise PromptDismissedException('Prompt dismissed.')
    secretstorage.exceptions.PromptDismissedException: Prompt dismissed.
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/proton/keyring_linux/core/keyring_linux.py", line 111, in _is_backend_working
        keyring_backend.get_password(
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
            "ProtonVPN",
            ^^^^^^^^^^^^
            "TestingThatBackendIsWorking"
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        )
        ^
      File "/usr/lib/python3/dist-packages/keyring/backends/SecretService.py", line 79, in get_password
        collection = self.get_preferred_collection()
      File "/usr/lib/python3/dist-packages/keyring/backends/SecretService.py", line 64, in get_preferred_collection
        raise InitError(f"Failed to create the collection: {e}.") from e
    keyring.errors.InitError: Failed to create the collection: Prompt dismissed..
    Password: 
    
  15. yutayu commented on Jan 2, 2026

    @yutayu

    I want to make proton-vpn-cli autostart at boot. Although It requies manually input Keyring .
    But it is not error and not problem.

  16. Ulugbeg commented on Feb 15, 2026

    @Ulugbeg

    I have the same issue as valentin-baron, on arch. protonvpn app version 0.16.

  17. varac commented on Feb 23, 2026

    @varac

    I get this after a fresh install on a clean Debian Trixie installation:

    $ protonvpn signin foo@example.org
    Traceback (most recent call last):
      File "/usr/bin/protonvpn", line 33, in <module>
        sys.exit(load_entry_point('proton-vpn-cli==0.1.6', 'console_scripts', 'protonvpn')())
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
      File "/usr/lib/python3/dist-packages/proton/vpn/cli/__init__.py", line 134, in main
        asyncio.run(app(obj=Params()))  # pylint: disable=E1120
                    ~~~^^^^^^^^^^^^^^
      File "/usr/lib/python3/dist-packages/click/core.py", line 1161, in __call__
        return self.main(*args, **kwargs)
               ~~~~~~~~~^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3/dist-packages/click/core.py", line 1082, in main
        rv = self.invoke(ctx)
      File "/usr/lib/python3/dist-packages/click/core.py", line 1694, in invoke
        super().invoke(ctx)
        ~~~~~~~~~~~~~~^^^^^
      File "/usr/lib/python3/dist-packages/click/core.py", line 1443, in invoke
        return ctx.invoke(self.callback, **ctx.params)
               ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3/dist-packages/click/core.py", line 788, in invoke
        return __callback(*args, **kwargs)
      File "/usr/lib/python3/dist-packages/click/decorators.py", line 33, in new_func
        return f(get_current_context(), *args, **kwargs)
      File "/usr/lib/python3/dist-packages/proton/vpn/cli/__init__.py", line 107, in app
        vpn_gui_running = asyncio.run(_vpn_gui_running())
      File "/usr/lib/python3.13/asyncio/runners.py", line 195, in run
        return runner.run(main)
               ~~~~~~~~~~^^^^^^
      File "/usr/lib/python3.13/asyncio/runners.py", line 118, in run
        return self._loop.run_until_complete(task)
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
      File "/usr/lib/python3.13/asyncio/base_events.py", line 725, in run_until_complete
        return future.result()
               ~~~~~~~~~~~~~^^
      File "/usr/lib/python3/dist-packages/proton/vpn/cli/__init__.py", line 54, in _vpn_gui_running
        bus = await MessageBus(bus_type=BusType.SESSION).connect()
                    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3/dist-packages/dbus_fast/aio/message_bus.py", line 206, in __init__
        super().__init__(bus_address, bus_type, ProxyObject, negotiate_unix_fd)
        ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "src/dbus_fast/message_bus.py", line 154, in dbus_fast.message_bus.BaseMessageBus.__init__
      File "src/dbus_fast/_private/address.py", line 114, in dbus_fast._private.address.get_bus_address
      File "src/dbus_fast/_private/address.py", line 69, in dbus_fast._private.address.get_session_bus_address
    dbus_fast.errors.InvalidAddressError: DBUS_SESSION_BUS_ADDRESS not set and could not get DISPLAY environment variable to get bus address
    
  18. Koberum commented on Feb 25, 2026

    @Koberum
    apt install gnome-keyring dbus-x11 libsecret-1-0
    eval "$(dbus-launch --sh-syntax)"
    eval "$(printf '\n' | gnome-keyring-daemon --unlock --components=secrets)"
    protonvpn signin
    

    This solves the signin issue with DBUS_SESSION_BUS_ADDRESS error, but i'm still unable to connect on Ubuntu 24 LTS Server

  19. added 2 commits that reference this issue on Mar 8, 2026
    0275bbc
    b9bc434
  20. MrSom3body commented on Apr 11, 2026

    @MrSom3body

    You can prepend any protonvpn command with dbus-run-session. At least that's how I got it running

  21. Benjamin-Loison commented on Jul 26, 2026

    @Benjamin-Loison

    @MrSom3body Can you elaborate?

    time dbus-run-session protonvpn --verbose connect
    Output:
    dbus-daemon[1129785]: [session uid=1000 pid=1129785 pidfd=5] Activating service name='org.freedesktop.secrets' requested by ':1.1' (uid=1000 pid=1129786 comm="/usr/bin/python3 /usr/bin/protonvpn --verbose conn")
    discover_other_daemon: 1GNOME_KEYRING_CONTROL=/run/user/1000/keyring
    SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
    

    when run via SSH to Debian 13 GNOME (unlocked graphical user session).

    After 2 minutes the program execution stops with:
    dbus-daemon[1129785]: [session uid=1000 pid=1129785 pidfd=5] Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)
    An unexpected error occurred. Please try again.
    If the error persists please contact customer support: https://protonvpn.com/support/contact?subject=%5BCLI%5D&os=Linux&platform=VPN%20for%20Linux
    
    real	2m0.305s
    user	0m0.223s
    sys	0m0.017s
    
  22. Benjamin-Loison commented on Jul 26, 2026

    @Benjamin-Loison

    Following #issuecomment-3683819981:

    @Symmetricity you haven't achieved using the VPN feature? You are just talking about signin, right?

  23. Benjamin-Loison commented on Jul 26, 2026

    @Benjamin-Loison

    Following #issuecomment-3594921079:

    @Buddycat-64 My aim is to workaround Flickr anti-bot to retrieve 140 photos by IP, hence I need to leverage many ProtonVPN IPs and automating generating WireGuard credentials with hatemosphere/protonvpn-wg-confgen leads to ~18 minutes cooldown after each range of 10 IPs, while protonvpn does not have this issue. The first experiment was run both with ProtonVPN Free and Plus, the latter can only be run with Plus. OpenVPN has a similar rate-limit issue.

  24. Benjamin-Loison commented on Jul 26, 2026

    @Benjamin-Loison
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions