hopefully they will be a fix soon. I am thinking about to use a older keycloak version in the meantime, not ideal but the other solution is to implement it myself.
Ok, I was able to reproduce the scenario.
It seems to happen when you try to initialize the KC adapter in script block in the <head/> tag.
At this time, the document is not ready loaded and the part in the Keycloak JS adapter document.body.appendChild(...) will fail.
So, wrap your code in a function and execute in in the <body onload="..."> tag, or, move it to the end of the body of your html page. Then, the body is already available when executing the script and it will work.
As a backend guy without much JS knowledge, I wouldn’t have figured it out. Probably a good idea to meantion this in the documentation because I and probably also the other people, that have this problem, only copy pasted the docs code.
@dcr31000 Hi! It seems like you’re using newer adapter with older Keycloak version. Also, there were some more fixes in this area. Could you please try it with current master branch?