Flaky error from /oauth/v2/token
Latest Self-hosted version that has been tested: v2.71.6
Behavior not present in (at least) v2.58.3
In some of my integration tests, I am finding that the
/oauth/v2/token
endpoint is returning a flaky error.
I am unable to reproduce this locally and can only get it to fail in CI/CD.
I have checked the thread here with the same error code, but the more I'm debugging the more my issue seems different since it does indeed hit successfully.
This seems like a race condition with the database.
Comments below will be an example of my test flow. @Raccine, I'd appreciate if you'd be able to point me to the right person to get support for this.10 Replies
Here is a sample of some of my test flow:
Would also appreciate if someone is able to point me to the go sdk that I can replace the rest call to /oauth/v2/token, (which is what I use for
getZitadelUserToken(testUserSecret, userTokenExpiry)
Unknown User•4w ago
Message Not Public
Sign In & Join Server To View
Thank you. I've gone through the documentation and am asking becasue I can't find the API that matches that endpoint. **
Unknown User•4w ago
Message Not Public
Sign In & Join Server To View
I have opened a Github issue bug here
GitHub
[Bug]: Potential Race Condition - flaky error from /oauth/v2/token ...
Preflight Checklist I could not find a solution in the documentation, the existing issues or discussions I have joined the ZITADEL chat Environment Self-hosted Version 2.71.6 Database PostgreSQL Da...
@Rajat Anyway you could take a look at this too?
bump
hey @nilsense we have taken in it consideration, I will check with my team when can we work on it or any other input from the engineers. Altho, I'd like to ask you too, would you be interested in doing this PR given if engineers can give more input/context on the issue?. please lmk 🙂
I will get back to you with more inputs of the engineers on the issue
Hey there @Rajat, thanks for getting back to me. I'm generally willing to contribute but it would depend on the context as well. I've already spent a lot of time trying to figure it out (unsuccessfully). Let me know what your people say and we can go from there! (Hoping to get this solved in v2 if possible)
nice and thanks @nilsense let me discuss with my team and I will come uo with something, what did you already tried already 😄 you can tell me here and I'd try to unblock you with that
Just tracing the error more or less. I wasn't exactly sure if it was something I was doing wrong on my side or Zitadel's side. But confirming the issue, how it is caused, and a potential path to resolve it would help me get in further (if I have time).