Javascript adapter promise error after upgrade to keycloak 11

We upgraded to version 11 because of the SameSite cookie issue. But now our app cannot initiate keycloak using the javascript adapter.

We receive this error: Error: Uncaught (in promise): TypeError: Method Promise.prototype.then called on incompatible receiver [object Promise]

On line 365 of keycloak.js which is:
configPromise.then(function () {
check3pCookiesSupported().then(processInit)
.catch(function() {
promise.setError();
});
});

When our app is doing a keycloak.init() like this: keycloak.init({onLoad: ‘check-sso’})

This code was working in the older version and just broke after upgrading to 11. Any ideas how to resolve this?

2 Likes

have the same issue, has someone a idea?

Uncaught (in promise) TypeError: Cannot read property 'appendChild' of null
    at check3pCookiesSupported (test.js:1305)
    at keycloak.js:366

Same issue for us as @tanya1218 is having.

did someone made an issue?

I just created an issue: https://issues.redhat.com/browse/KEYCLOAK-15158

What browser do you use? Does it happen on a different browser?

It happens in the latest version of Chrome. Also occurs in Firefox and Safari

does someone have a workaround or some new information?

Additonal post: Does someone has a working keycloak js adapter since 11.0.0?

Hi! We’ve prepared a fix and we’d be very grateful if you could check it works for you. Thank you!