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

Changing schema leads to error 500 (on hosted ui) #56

Closed
till opened this issue Feb 18, 2022 · 13 comments · Fixed by ory/kratos#2241
Closed

Changing schema leads to error 500 (on hosted ui) #56

till opened this issue Feb 18, 2022 · 13 comments · Fixed by ory/kratos#2241
Assignees

Comments

@till
Copy link

till commented Feb 18, 2022

I updated my schema, tested login with an existing account, that worked, but when I go to /ui/settings: error?id=0a0c448d-d821-4a70-a7f9-84fff9fe510e:

{
  "code": 500,
  "message": "expected a client to be set for github.com/ory/jsonschema/v3/httploader.HTTPClient but received nil",
  "status": "Internal Server Error"
}

Originally posted by @till in #55 (reply in thread)

@aeneasr
Copy link
Member

aeneasr commented Feb 18, 2022

Thank you for the report! Can you confirm that this happens reproducible? We have observed this error before but are not yet sure where it originates from. Would be very helpful if you had some info!

@tricky42 could you maybe check what the server logs are saying with eg stack traces?

@till
Copy link
Author

till commented Feb 18, 2022

@aeneasr yeah, any "old" account has a different schema. When I re-register with a new account, my new schema is used and then /ui/settings works.

How do you update accounts to use the new schema?

@aeneasr
Copy link
Member

aeneasr commented Feb 18, 2022

The update currently needs to be done using the API / CLI and we still lack a good guide for it. The old Schema should still work though! Is that old Schema the one which is broken? If so could you please share your slug of the project so we can investigate? :)

@till
Copy link
Author

till commented Feb 18, 2022

@aeneasr understood, I'll check out api/cli.

For the schema, just to make sure:

  • we used the email preset first
  • accounts created with email preset can login ✅
  • accounts created with email preset can not use the settings 🔴
  • accounts created with the new schema can login ✅
  • accounts created with the new schema can use settings ✅

My slug: keen-meninsky-blk98bepad

@aeneasr
Copy link
Member

aeneasr commented Feb 18, 2022

Thank you very much for the info! This will help identify the issue much faster!

@aeneasr
Copy link
Member

aeneasr commented Feb 20, 2022

Thank you for the info, I tried to reproduce this error on your slug and also one of my projects but was not able to reproduce it. It appears that it could be an issue related to cold starts of the system. We will need to do further investigation! Have you observed this error in the meanwhile?

@aeneasr
Copy link
Member

aeneasr commented Feb 20, 2022

I was able to find this in the logs and it appears to happen quite frequently. We will try to figure out where it comes from :)

@till
Copy link
Author

till commented Feb 20, 2022

@aeneasr Okay, but yeah - I can re-pro any time I use an old account.


I haven't found schema migration stuff yet? Any example tips on what exactly to look for?

Also, kinda wondering I guess you were referring to kratos cli, not ory's?

@aeneasr
Copy link
Member

aeneasr commented Feb 20, 2022

Maybe I misunderstood then! So you create an account, change the schema, use that account to access settings? It would be super helpful to get the flow from start to finish, looks like I am missing something!

The CLIs don’t yet fully support this as we identified the need to address something in Kratos itself before that can work. It will take a bit lore time to figure this out correctly

@till
Copy link
Author

till commented Feb 20, 2022

Flow 1

  • Create an account user1
  • Edit schema
  • Can no longer access settings with user1

Flow 2

  • Create another account user2 (it uses new/edited schema from Flow 1)
  • Can access settings with user2

Better?

@aeneasr
Copy link
Member

aeneasr commented Feb 21, 2022

Thank you! Are you using presets or custom schemas?

@aeneasr
Copy link
Member

aeneasr commented Feb 21, 2022

Ok, awesome, I was able to reproduce this:

  1. Create account on preset "username"
  2. Log out
  3. Change to custom schema
  4. Log in with account
  5. Access settings -> error

aeneasr added a commit to ory/kratos that referenced this issue Feb 21, 2022
@aeneasr aeneasr self-assigned this Feb 21, 2022
@aeneasr
Copy link
Member

aeneasr commented Feb 21, 2022

Issue found and fix pending - thank you for the report!

aeneasr added a commit to ory/kratos that referenced this issue Feb 21, 2022
peturgeorgievv pushed a commit to senteca/kratos-fork that referenced this issue Jun 30, 2023
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

Successfully merging a pull request may close this issue.

2 participants