Error! Client already exists

1,525 views
Skip to first unread message

phyo kyaw

unread,
Jun 23, 2021, 10:23:17 AM6/23/21
to Keycloak User
Hi

I got this pop-up  error "Error! Client already exists!" 
when I tried to save update on realm/clients/settings page.

The following is the error log from docker.
"ERROR: duplicate key value violates unique constraint "c_cli_scope_bind"
  Detail: Key (client_id, scope_id)=(2b063623-42b3-4104-ae18-a96ac1dc166d, 8ffec8e9-30fd-488e-b6a6-2df33686481d) already exists."

realm json export extract:

    {
      "id": "2b063623-42b3-4104-ae18-a96ac1dc166d",
      "clientId": "break-booking-frontend-client",
      "rootUrl": "",
      "baseUrl": "",
      "surrogateAuthRequired": false,
      "enabled": true,
   
.
.
.
    {
      "id": "8ffec8e9-30fd-488e-b6a6-2df33686481d",
      "name": "email",
      "description": "OpenID Connect built-in scope: email",
      "protocol": "openid-connect",
      "attributes": {
        "include.in.token.scope": "true",
        "display.on.consent.screen": "true",
        "consent.screen.text": "${emailScopeConsentText}"
      },

found only one mapping in client_scope_client table.

keycloak=# select * from client_scope_client;
keycloak=# \! cat /tmp/output1.txt | grep 2b063623-42b3-4104-ae18-a96ac1dc166d
 2b063623-42b3-4104-ae18-a96ac1dc166d | c087edad-a1a9-4a46-8d57-4efe8b9a571e | t
 2b063623-42b3-4104-ae18-a96ac1dc166d | 2a4a7d0a-fb72-4d28-8686-1f684693708b | t
 2b063623-42b3-4104-ae18-a96ac1dc166d | 58e633b4-cae5-4c6d-affb-e4ab046b59fa | f
 2b063623-42b3-4104-ae18-a96ac1dc166d | 94860474-997f-41a6-a977-bf30d8fb0e16 | f
 2b063623-42b3-4104-ae18-a96ac1dc166d | d6a2cb6e-5ebb-47f4-abad-4e98f1b2a547 | f
 2b063623-42b3-4104-ae18-a96ac1dc166d | 96209e48-af90-4608-b3fe-45c8ba272f58 | f
 2b063623-42b3-4104-ae18-a96ac1dc166d | ed6e6b28-6dfc-4b3a-a687-2c8372e88400 | f
 2b063623-42b3-4104-ae18-a96ac1dc166d | 8ffec8e9-30fd-488e-b6a6-2df33686481d | f

Could anyone enlighten me what is the problem?
Thank you.

Best regards
Philip

Vlasta Ramik

unread,
Jun 23, 2021, 4:26:14 PM6/23/21
to keyclo...@googlegroups.com

Hello,

it seems it might be caused/related to https://issues.redhat.com/browse/KEYCLOAK-18035.

What version are you using?

--
You received this message because you are subscribed to the Google Groups "Keycloak User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-user/2a512552-a70e-4aa9-83bf-2eca34737bf4n%40googlegroups.com.

phyo kyaw

unread,
Jun 24, 2021, 12:34:15 AM6/24/21
to Keycloak User
Hi Vlasta Ramik

I am using keycloak 13.0.1 docker version. 
I did play around with default scopes and optional scopes to check if I could get away from mandatory email requirement in account with social login.
I have attached screenshoots.
Please kindly guide me how to solve the problem?
Thank you very much.

Best regards
Philip

client scope.png

Vlasta Ramik

unread,
Jun 24, 2021, 4:05:30 AM6/24/21
to keyclo...@googlegroups.com

Hello,

solution will be to upgrade to kc14.

Regards

phyo kyaw

unread,
Jun 24, 2021, 10:14:04 PM6/24/21
to Keycloak User
Thank you. I will update it to kc14  later.
I move profile and email scopes to default and the error has gone.

Reply all
Reply to author
Forward
0 new messages