Skip to content

EGI check-in maintenance caused JSONDecodeError in authenticate_oidc #751

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

Closed
JeroenVerstraelen opened this issue Mar 19, 2025 · 1 comment
Assignees

Comments

@JeroenVerstraelen
Copy link
Contributor

JeroenVerstraelen commented Mar 19, 2025

Steps to reproduce:

import openeo

openeo.connect("openeo.vito.be/openeo/1.1").authenticate_oidc()

This causes the following error:

File ~/Projects/Utils/workspace/venv/lib/python3.11/site-packages/requests/models.py:978, in Response.json(self, **kwargs)
    974     return complexjson.loads(self.text, **kwargs)
    975 except JSONDecodeError as e:
    976     # Catch JSON-related errors and raise as requests.JSONDecodeError
    977     # This aliases json.JSONDecodeError and simplejson.JSONDecodeError
--> 978     raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Full stack trace and response.text:
https://gist.github.com/JeroenVerstraelen/ea1fd858075c4ae7ab013d1908d9e6ca

It would be better the user sees a clear message that the answer we received from EGI is not what we expected.

@soxofaan
Copy link
Member

soxofaan commented Mar 19, 2025

❯ curl -i https://aai.egi.eu/auth/realms/egi/.well-known/openid-configuration
HTTP/1.1 302 Moved Temporarily
Server: nginx
Date: Wed, 19 Mar 2025 13:30:06 GMT
Content-Type: text/html
Content-Length: 138
Location: https://aai.egi.eu/static/maintenance.html
Connection: keep-alive
Strict-Transport-Security: max-age=31536000; includeSubDomains

<html>
<head><title>302 Found</title></head>
<body>
<center><h1>302 Found</h1></center>
<hr><center>nginx</center>
</body>
</html>

It's unfortunate that they do a 302 redirect to a HTML page on a request that is assumed to be JSON

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

2 participants