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

Onyxia ui doesn't start if param userNamespace is set to false #833

Open
Donatien26 opened this issue Jul 16, 2024 · 3 comments
Open

Onyxia ui doesn't start if param userNamespace is set to false #833

Donatien26 opened this issue Jul 16, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Donatien26
Copy link
Contributor

Hi !

We have an onyxia instance in a cluster where user namespace are not allowed and only groups namespace are allowed. If we set the param userNamespace to false onyxia web doesn't start. Onyxia ui show a popup with this error message:

Error: Wrong assertion encountered: "There should be only one project without group (user project)"
@Donatien26 Donatien26 added the bug Something isn't working label Jul 16, 2024
@garronej
Copy link
Contributor

Thanks for reporting Donatien

@cslovell
Copy link

cslovell commented Jan 24, 2025

I ran into this situation as well - would be neat to see guidance on how to debug this. I set it to "true" with no result.

@olevitt
Copy link
Contributor

olevitt commented Jan 24, 2025

@cslovell Hi ! First step to debug this is probably to check the return body of the API call to /user/info.
You should have the list of the resolved projects which is composed of user namespace (if usernamespace is not set or set to true) + any groups the user belongs to (populated based on the groups claim in the JWT token).
If this list of projects is empty then Onyxia can't figure out where to work (no user namespace and no group namespace) resulting in the error you have.
If you have not set usernamespace or set it to true then the most likely reason the list is empty is due to the username (by default preferred_username) contains invalid characters. Onyxia will filter out any invalid username / group name because all the downstream logic (Kubernetes namespaces & S3 buckets names) relies on the username (usually prefixed).

Please check the content of the resolved list of projects and, if it's empty like I'm guessing, please check that your username only contains alphanumerical lowercase or - characters. If needed, change the username claim to a claim that only contains allowed characters and / or create a custom mapper to add a such claim in the OIDC token

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

4 participants