question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error in Core? ( Clients Client details Dedicated scopes): Cannot read properties of undefined (reading 'helpText')

See original GitHub issue

Describe the bug

When opening up a client from any realm and navigating to Client scopes tab in the Client details view, upon clicking a dedicated mapper (for example account-dedicated, see screenshot) image

I get an error in the UI: “Cannot read properties of undefined (reading ‘helpText’)” and cannot proceed (see another screenshot) image

I am running Keycloak 19.0.2 with the switch “–features-disabled=step-up-authentication” set.

Running browser dev tools & debugger I was able to see that the exception is coming from here, the mapperType set by

protocolMappers.filter(
         (type) => type.id === mapper.protocolMapper
       )[0];

Being undefined: https://github.com/keycloak/keycloak-ui/blob/c6ab6a11901581bf58c5a551385b5f7f6a9cd7b7/apps/admin-ui/src/client-scopes/add/MapperDialog.tsx#L65

I can also see that the protocolMapper list is missing a mapper with protocolMapper value of oidc-acr-mapper.

EDIT: Additional information: I debugged how the default protocolMappers get populated in the UI and was able to surmise that during Keycloak startup DESPITE deliberately disabling step up authentication support, for some reason the OidcLoginProtocolFactory will call Profile.isFeatureEnabled(Profile.Feature.STEP_UP_AUTHENTICATION) (see https://github.com/keycloak/keycloak/blob/55c514ad56b4e13b5d0d64a75a9bcc6a512d3f32/services/src/main/java/org/keycloak/protocol/oidc/OIDCLoginProtocolFactory.java#L215) and it will return true instead of false which will lead to creating the oidc-acr-mapper protocol mapper. This could be related to this behaviour seen here.

Version

19.0.2 (also observed in 20.0.0)

Environment

Chrome version 107

Expected behavior

Expected for keycloak not to display error and to display whatever is in dedicated mapper tab.

Actual behavior

I get an error in the UI: “Cannot read properties of undefined (reading ‘helpText’)” and cannot proceed (see another screenshot) image

How to Reproduce?

Open up keycloak admin UI, navigate to any realm and pick a client in the client menu (from left). then navigate to Client scopes. In that view, pick the “clientname-dedicated” mapper (ie. if my client would be named account, then i’d have account-dedicated item in the list) and click it. This reproduces the error in the Keycloak UI.

Anything else?

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
lexcaocommented, Nov 8, 2022

@elavrenchuk I am not sure, may be the next release. Need Keycloak team to check.

1reaction
lexcaocommented, Nov 8, 2022

Hi, @elavrenchuk The PR was merged but is not released. Could you please try nightly?

Read more comments on GitHub >

github_iconTop Results From Across the Web

“Cannot read property 'client' of undefined” angularJS with ...
this is what i am getting in console angular.js:14328 TypeError: Cannot read property 'client' of undefined at ChildScope.$scope.notify ...
Read more >
Cannot read properties of undefined (reading 'trim') #4277
Description. We saw in our Application Insights the following error: Cannot read properties of undefined (reading 'trim').
Read more >
WebLogic Server Known and Resolved Issues
Change Request Number Found In Fixed In CR200627 9.0 CR208373 9.0 9.2 CR214481 9.0 9.2
Read more >
Fix 'cannot read properties of undefined (reading map)' in JS
The "Uncaught TypeError: Cannot read properties of undefined (reading 'map')" error occurs in JavaScript, whenever you try to use the array map ...
Read more >
New and Changed Aura Components - Salesforce Help
Build UI easily with these new and changed components. Changed Aura ComponentsThe following components have changed. lightning:accordionSection On desktop.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found