ZITADELZZITADEL
Powered by
nilsenseN
ZITADEL•10mo ago•
14 replies
nilsense

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
/oauth/v2/token
endpoint is returning a flaky error.

time=2025-05-14T15:27:24.757Z level=ERROR msg="request error" oidc_error.parent="ID=OIDC-AhX2u Message=Errors.Internal Parent=(invalid signature (error fetching keys: ID=QUERY-Tha6f Message=Errors.AuthNKey.NotFound Parent=(sql: no rows in result set)))" oidc_error.description=Errors.Internal oidc_error.type=server_error status_code=500
time=2025-05-14T15:27:24.757Z level=ERROR msg="request error" oidc_error.parent="ID=OIDC-AhX2u Message=Errors.Internal Parent=(invalid signature (error fetching keys: ID=QUERY-Tha6f Message=Errors.AuthNKey.NotFound Parent=(sql: no rows in result set)))" oidc_error.description=Errors.Internal oidc_error.type=server_error status_code=500


I am unable to reproduce this locally and can only get it to fail in CI/CD.

I have checked the thread questions-help-bugsUnable to create proper Access Token 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.
ZITADEL banner
ZITADELJoin
ZITADEL - Identity infrastructure, simplified for you.
4,374Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Service user fetching /oauth/v2/token timing out
ShardoolSShardool / questions-help-bugs
14mo ago
OAuth token revocation
КириллККирилл / questions-help-bugs
9mo ago