Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot connect to a server. #59

Closed
2 of 3 tasks
Giger22 opened this issue Jul 2, 2024 · 3 comments
Closed
2 of 3 tasks

Cannot connect to a server. #59

Giger22 opened this issue Jul 2, 2024 · 3 comments

Comments

@Giger22
Copy link

Giger22 commented Jul 2, 2024

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

I get an error message "unexpected error occurred".

(protonvpn-app:30611): Gtk-WARNING **: 19:46:00.205: Locale not supported by C library.
        Using the fallback 'C' locale.
/usr/lib/python3.12/site-packages/proton/loader/loader.py:90: RuntimeWarning: Loader: couldn't load transport/requests, is it installed properly?
  acceptable_classes = self.get_all(type_name)
2024-07-02T15:05:13.973302 | proton.vpn.connection.vpnconnector:238 | INFO | CONN:STATE_CHANGED | Connecting
2024-07-02T15:05:18.977674 | proton.vpn.app.gtk.widgets.main.exception_handler:175 | CRITICAL | APP:CRASH | Unexpected error.
Traceback (most recent call last):
  File "/usr/lib/python3.12/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
TimeoutError

Sometimes I get this error.

TimeoutError
2024-07-02T17:37:57.383950 | proton.vpn.core.usage:80 | ERROR | Failed to report error '(<class 'TimeoutError'>, TimeoutError(), <traceback object at 0x7f1eb030dc00>)'
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/proton/vpn/core/usage.py", line 76, in report_error
    sanitized_error = self._sanitize_error(error)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/proton/vpn/core/usage.py", line 130, in _sanitize_error
    return (error_info[0], _sanitize(error_info[1]), error_info[2])
                           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/proton/vpn/core/usage.py", line 125, in _sanitize
    _, filename = os.path.split(error.filename)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen posixpath>", line 103, in split
TypeError: expected str, bytes or os.PathLike object, not NoneType

I also get this error but it disappears when I enable/disable kwallet.

--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/secretstorage/util.py", line 48, in send_and_get_reply
    raise DBusErrorResponse(resp_msg)
jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name org.freedesktop.secrets was not provided by any .service files',)

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

Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/keyring/backends/SecretService.py", line 62, in get_preferred_collection
    collection = secretstorage.get_default_collection(bus)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/secretstorage/collection.py", line 177, in get_default_collection
    return Collection(connection)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/secretstorage/collection.py", line 45, in __init__
    self._collection.get_property('Label')
  File "/usr/lib/python3.12/site-packages/secretstorage/util.py", line 67, in get_property
    (signature, value), = self.send_and_get_reply(msg)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/secretstorage/util.py", line 58, in send_and_get_reply
    raise SecretServiceNotAvailableException(data) from resp
secretstorage.exceptions.SecretServiceNotAvailableException: The name org.freedesktop.secrets was not provided by any .service files

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

Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/proton/keyring_linux/core/keyring_linux.py", line 110, in _is_backend_working
    keyring_backend.get_password(
  File "/usr/lib/python3.12/site-packages/keyring/backends/SecretService.py", line 79, in get_password
    collection = self.get_preferred_collection()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-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: The name org.freedesktop.secrets was not provided by any .service files.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.12/logging/__init__.py", line 1160, in emit
    msg = self.format(record)
          ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/logging/__init__.py", line 999, in format
    return fmt.format(record)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/logging/__init__.py", line 703, in format
    record.message = record.getMessage()
                     ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/logging/__init__.py", line 392, in getMessage
    msg = msg % self.args
          ~~~~^~~~~~~~~~~
  File "/usr/lib/python3.12/site-packages/keyring/backend.py", line 99, in __str__
    return f"{keyring_class.__module__}.{keyring_class.__name__} (priority: {keyring_class.priority:g})"
                                                                             ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/jaraco/classes/properties.py", line 202, in __get__
    return self.fget.__get__(None, owner)()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/keyring/backends/SecretService.py", line 44, in priority
    raise RuntimeError(
RuntimeError: The Secret Service daemon is neither running nor activatable through D-Bus
Call stack:
  File "/usr/lib/python3.12/threading.py", line 1030, in _bootstrap
    self._bootstrap_inner()
  File "/usr/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.12/threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.12/site-packages/proton/vpn/app/gtk/utils/executor.py", line 89, in _run_asyncio_loop_forever
    self._loop.run_forever()
  File "/usr/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/lib/python3.12/asyncio/base_events.py", line 1987, in _run_once
    handle._run()
  File "/usr/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/lib/python3.12/site-packages/proton/vpn/app/gtk/controller.py", line 94, in initialize_vpn_connector
    self._connector = await self._api.get_vpn_connector()
  File "/usr/lib/python3.12/site-packages/proton/vpn/core/api.py", line 57, in get_vpn_connector
    settings = await self.load_settings()
  File "/usr/lib/python3.12/site-packages/proton/vpn/core/api.py", line 67, in load_settings
    if self._session_holder.session.logged_in:
  File "/usr/lib/python3.12/site-packages/proton/vpn/core/session_holder.py", line 73, in session
    self._session = self._proton_sso.get_default_session(
  File "/usr/lib/python3.12/site-packages/proton/sso/sso.py", line 192, in get_default_session
    sessions = self.sessions
  File "/usr/lib/python3.12/site-packages/proton/sso/sso.py", line 130, in sessions
    keyring = self._keyring
  File "/usr/lib/python3.12/site-packages/proton/sso/sso.py", line 111, in _keyring
    self.__keyring_backend = Keyring.get_from_factory()
  File "/usr/lib/python3.12/site-packages/proton/keyring/_base.py", line 49, in get_from_factory
    keyring_backend = Loader.get("keyring", class_name=backend)
  File "/usr/lib/python3.12/site-packages/proton/loader/loader.py", line 105, in get
    if entry.cls._validate():
  File "/usr/lib/python3.12/site-packages/proton/keyring_linux/secretservice/secretservice_backend.py", line 43, in _validate
    return cls._is_backend_working(SecretService.Keyring())
  File "/usr/lib/python3.12/site-packages/proton/keyring_linux/core/keyring_linux.py", line 119, in _is_backend_working
    logger.exception("Keyring %s error", keyring_backend)
Message: 'Keyring %s error'
Arguments: (<keyring.backends.SecretService.Keyring object at 0x75db81d23c50>,)
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/secretstorage/util.py", line 48, in send_and_get_reply
    raise DBusErrorResponse(resp_msg)
jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.ServiceUnknown] ('The name org.freedesktop.secrets was not provided by any .service files',)

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

Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/keyring/backends/SecretService.py", line 62, in get_preferred_collection
    collection = secretstorage.get_default_collection(bus)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/secretstorage/collection.py", line 177, in get_default_collection
    return Collection(connection)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/secretstorage/collection.py", line 45, in __init__
    self._collection.get_property('Label')
  File "/usr/lib/python3.12/site-packages/secretstorage/util.py", line 67, in get_property
    (signature, value), = self.send_and_get_reply(msg)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/secretstorage/util.py", line 58, in send_and_get_reply
    raise SecretServiceNotAvailableException(data) from resp
secretstorage.exceptions.SecretServiceNotAvailableException: The name org.freedesktop.secrets was not provided by any .service files

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

Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/proton/keyring_linux/core/keyring_linux.py", line 110, in _is_backend_working
    keyring_backend.get_password(
  File "/usr/lib/python3.12/site-packages/keyring/backends/SecretService.py", line 79, in get_password
    collection = self.get_preferred_collection()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-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: The name org.freedesktop.secrets was not provided by any .service files.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.12/logging/handlers.py", line 73, in emit
    if self.shouldRollover(record):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/logging/handlers.py", line 196, in shouldRollover
    msg = "%s\n" % self.format(record)
                   ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/logging/__init__.py", line 999, in format
    return fmt.format(record)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/logging/__init__.py", line 703, in format
    record.message = record.getMessage()
                     ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/logging/__init__.py", line 392, in getMessage
    msg = msg % self.args
          ~~~~^~~~~~~~~~~
  File "/usr/lib/python3.12/site-packages/keyring/backend.py", line 99, in __str__
    return f"{keyring_class.__module__}.{keyring_class.__name__} (priority: {keyring_class.priority:g})"
                                                                             ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/jaraco/classes/properties.py", line 202, in __get__
    return self.fget.__get__(None, owner)()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/keyring/backends/SecretService.py", line 44, in priority
    raise RuntimeError(
RuntimeError: The Secret Service daemon is neither running nor activatable through D-Bus
Call stack:
  File "/usr/lib/python3.12/threading.py", line 1030, in _bootstrap
    self._bootstrap_inner()
  File "/usr/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.12/threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.12/site-packages/proton/vpn/app/gtk/utils/executor.py", line 89, in _run_asyncio_loop_forever
    self._loop.run_forever()
  File "/usr/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
    self._run_once()
  File "/usr/lib/python3.12/asyncio/base_events.py", line 1987, in _run_once
    handle._run()
  File "/usr/lib/python3.12/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/lib/python3.12/site-packages/proton/vpn/app/gtk/controller.py", line 94, in initialize_vpn_connector
    self._connector = await self._api.get_vpn_connector()
  File "/usr/lib/python3.12/site-packages/proton/vpn/core/api.py", line 57, in get_vpn_connector
    settings = await self.load_settings()
  File "/usr/lib/python3.12/site-packages/proton/vpn/core/api.py", line 67, in load_settings
    if self._session_holder.session.logged_in:
  File "/usr/lib/python3.12/site-packages/proton/vpn/core/session_holder.py", line 73, in session
    self._session = self._proton_sso.get_default_session(
  File "/usr/lib/python3.12/site-packages/proton/sso/sso.py", line 192, in get_default_session
    sessions = self.sessions
  File "/usr/lib/python3.12/site-packages/proton/sso/sso.py", line 130, in sessions
    keyring = self._keyring
  File "/usr/lib/python3.12/site-packages/proton/sso/sso.py", line 111, in _keyring
    self.__keyring_backend = Keyring.get_from_factory()
  File "/usr/lib/python3.12/site-packages/proton/keyring/_base.py", line 49, in get_from_factory
    keyring_backend = Loader.get("keyring", class_name=backend)
  File "/usr/lib/python3.12/site-packages/proton/loader/loader.py", line 105, in get
    if entry.cls._validate():
  File "/usr/lib/python3.12/site-packages/proton/keyring_linux/secretservice/secretservice_backend.py", line 43, in _validate
    return cls._is_backend_working(SecretService.Keyring())
  File "/usr/lib/python3.12/site-packages/proton/keyring_linux/core/keyring_linux.py", line 119, in _is_backend_working
    logger.exception("Keyring %s error", keyring_backend)
Message: 'Keyring %s error'
Arguments: (<keyring.backends.SecretService.Keyring object at 0x75db81d23c50>,)
/usr/lib/python3.12/site-packages/proton/loader/loader.py:90: RuntimeWarning: Loader: couldn't load transport/requests, is it installed properly?
  acceptable_classes = self.get_all(type_name)

@Anonymous941
Copy link

Try resetting your keyring:

mv ~/.local/share/keyrings ~/.local/share/keyrings.bak

If that doesn't work, have you tried reinstalling?

rm -rf ~/.config/Proton
rm -rf ~/.cache/Proton
rm -rf ~/.config/protonvpn
rm -rf ~/.cache/protonvpn
sudo apt purge --autoremove protonvpn # don't worry if this fails
sudo apt purge --autoremove proton-vpn-gnome-desktop
wget https://repo.protonvpn.com/debian/dists/unstable/main/binary-all/protonvpn-beta-release_1.0.3-3_all.deb
sudo dpkg -i ./protonvpn-beta-release_1.0.3-3_all.deb
sudo apt update
sudo apt upgrade
sudo apt install proton-vpn-gnome-desktop

@Giger22
Copy link
Author

Giger22 commented Jul 3, 2024

I had had tried it before. It have not helped.

@calexandru2018
Copy link
Member

So

File "/usr/lib/python3.12/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
TimeoutError

Is a duplicate of #57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants