zitadel: OAuthErrorEvent: unable to retrieve client by id since version 2.5.0
Describe the bug
The server reports an error that the web browser shows in its console, when accessing the web UI at /ui/console
whenever the user is logged in or not. The errors are reported from version 2.5.0 and onwards (to anybody reading this from the future, the current version is 2.10.0).
In the not logged in state, the following OAuth message is reported by the server:
(The JSON payload has been formatted for readability)
Uncaught (in promise): OAuthErrorEvent:
{
"type": "code_error",
"reason": {},
"params": {
"error": "server_error",
"error_description": "unable+to+retrieve+client+by+id",
"state": "<redacted>"
}
}
In the logged in state, seemingly related errors are returned by the server in the GRPC calls. A message in the browser console is:
could not read projectid by clientid (AUTH-GHpw2)
The payloads sent by the server don’t have more information that I can copy-paste here for examination.
To Reproduce The same client application behavior can be observed when logged in and not logged in, except for the messages reported in the browser console.
- Visit
/ui/console
- The page visible to the user has no content (see screenshot).
- Open the browser dev tools console
- Notice the error(s)
Expected behavior I expect to be redirected to the login page or have the console with the required data, whichever is relevant according to the login state of the user.
Screenshots
Desktop: Server side error, not applicable.
Smartphone: Server side error, not applicable.
Server: OS: Debian 11.5 Database: PostgreSQL 14
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 34 (29 by maintainers)
The workaround seems to work properly on my installation, though time travelling might not be a good idea, as you’ve said in the comment of the SQL snippet. 😁
Nonetheless, accessing
/
redirects to/ui/console
and finally to/ui/login/login?...
without any errors. I can complete the login flow to the console, and an external application using Oauth2 with OIDC.I now simply created a new instance - as I already mentioned, in my case there was anyway just test and prototype data…
hi @CMiksche the new release v2.14.0 will rise another error. Please wait for v2.14.1 before you upgrade
Now I had to set the rights again:
GRANT USAGE ON SCHEMA projections,auth,adminapi TO <myuser>;
And also the ownership of all new tables:
ALTER TABLE auth.locks OWNER TO <myuser>;
I started it afterwards and
start-from-init
failed becauseWhile
start
failed because:FEHLER: Relation »projections.instances« existiert nicht (SQLSTATE 42P01)
But when I try to delete
current_sequences_instance_id_idx
, it shows me the following error:So I created a PR for that: https://github.com/zitadel/zitadel/pull/4798