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

Auth-related error sometimes occur when performing a search #1354

Open
amarandon opened this issue Oct 17, 2024 · 0 comments
Open

Auth-related error sometimes occur when performing a search #1354

amarandon opened this issue Oct 17, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@amarandon
Copy link
Collaborator

While performing a search on the dedl provider, I sometimes get this error. Unfortunately this isn't always reproducible.

2024-10-17 17:35:14,362 eodag.core                       [INFO    ] Searching on provider dedl
2024-10-17 17:35:14,363 eodag.auth.token_exchange        [DEBUG   ] Getting subject auth token
2024-10-17 17:35:14,363 eodag.auth.openid_connect        [DEBUG   ] Fetching access token from https://auth.destine.eu/realms/desp/protocol/openid-connect/token
2024-10-17 17:35:14,470 eodag.core                       [ERROR   ] Error while searching on provider dedl (ignored):
Traceback (most recent call last):
  File "/home/amarando/Projects/eodag/eodag/api/core.py", line 1872, in _do_search
    if auth := self._plugins_manager.get_auth(
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        search_plugin.provider,
        ^^^^^^^^^^^^^^^^^^^^^^^
        getattr(search_plugin.config, "api_endpoint", None),
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        search_plugin.config,
        ^^^^^^^^^^^^^^^^^^^^^
    ):
    ^
  File "/home/amarando/Projects/eodag/eodag/plugins/manager.py", line 393, in get_auth
    auth = auth_plugin.authenticate()
  File "/home/amarando/Projects/eodag/eodag/plugins/authentication/token_exchange.py", line 93, in authenticate
    subject_auth = self.subject.authenticate()
  File "/home/amarando/Projects/eodag/eodag/plugins/authentication/openid_connect.py", line 286, in authenticate
    self.token_info["access_token"] = self._get_access_token()
                                      ~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/amarando/Projects/eodag/eodag/plugins/authentication/openid_connect.py", line 86, in _get_access_token
    res = self._request_new_token()
  File "/home/amarando/Projects/eodag/eodag/plugins/authentication/openid_connect.py", line 298, in _request_new_token
    authentication_response = self.authenticate_user(state)
  File "/home/amarando/Projects/eodag/eodag/plugins/authentication/openid_connect.py", line 375, in authenticate_user
    login_form = login_forms[0]
                 ~~~~~~~~~~~^^^
IndexError: list index out of range
@amarandon amarandon added the bug Something isn't working label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant