nilsenseN
ZITADEL8mo ago
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 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


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.
Was this page helpful?