Error with keycloak on Ubuntu with Docker Compose. Invalid parameter: redirect_uri

Hi,

I have recently started testing OpenRemote and found it to be really good. I have setup OpenRemote with docker-compose and starting with below command

OR_HOSTNAME=openremote.example.dev OR_SSL_PORT=443 docker-compose up

Everything loads fine and, SSL certs and everything works fine. After Login, from menu when I click on Account, I get below error

Invalid parameter: redirect_uri

And below are the logs I see in docker-compose

keycloak_1    | 2024-06-16 22:11:01,247 WARN  [org.keycloak.theme.DefaultThemeManager] (executor-thread-2) Not found parent theme 'keycloak' of theme 'openremote'. Unable to load ACCOUNT theme 'openremote' due to this.
keycloak_1    | 2024-06-16 22:11:01,248 ERROR [org.keycloak.theme.DefaultThemeManager] (executor-thread-2) Failed to find ACCOUNT theme openremote, using built-in themes
keycloak_1    | 2024-06-16 22:11:01,248 WARN  [org.keycloak.theme.DefaultThemeManager] (executor-thread-2) Not found parent theme 'keycloak' of theme 'openremote'. Unable to load ACCOUNT theme 'openremote' due to this.
keycloak_1    | 2024-06-16 22:11:01,249 ERROR [org.keycloak.theme.DefaultThemeManager] (executor-thread-2) Failed to find ACCOUNT theme openremote, using built-in themes
keycloak_1    | 2024-06-16 22:11:03,819 WARN  [org.keycloak.events] (executor-thread-2) type="LOGIN_ERROR", realmId="ada94259-28f5-46b9-b63e-1de897b9a2b3", clientId="account-console", userId="null", ipAddress="1.2.3.4", error="invalid_redirect_uri", redirect_uri="https://openremote.example.dev/auth/realms/master/account/"

I have no idea whats wrong. I found Error with keycloack on vps with docker. Invalid parameter: redirect_uri : SOLVED which does not actually solves anything.

How can I get this sorted out.

Thanks.

The issue seems to be with the redirection URL. Specifically, the domain openremote.example.dev might not exist.

Please list down all the steps that you followed.

Hi,

I can confirm that the actual URL does exists and I have been using it without any problem. The issue only happens when I try to open the Account from the Menu. Everything else seems to be working fine.
I have added new assets, working fine and changed user’s password which is also working fine and tried creating Realms which is also working fine.
So URL definitely is working.

I am using NGROK based URL so it is public.

  1. First started NGROK on port 80
  2. Started OpenRemote using the command OR_HOSTNAME=openremote.example.dev OR_SSL_PORT=443 docker-compose up
  3. Once SSL Cert generated successfully, I stopped NGROK and started NGROK to serve traffic from port 443 which is the OR_SSL_PORT
  4. URL is working fine and I was able to login using default credentials and then changed the password and tested functionality by creating different assets, realms and other things.

Error only happens when I click on Account from Menu.

Thanks.

change hostname, put machine ip.

Hi,

I want to use hostname and not IP Address. If this is a limitation then I think the platform is of ZERO use to anyne.

You can use hostname .

Please try not setting OR_SSL_PORT as you are setting it to the default value; keycloak has issues with it being explicitly set to 443 as most browsers will just remove it from the URL and then you get the URI mismatches.