BLANK PORT 8000
TrudyCyns opened this issue · 5 comments
Hello,
I am just starting my journey with Keycloak and I am having an issue with the test application. I have successfully downloaded and run it. However, localhost:8000 opens up blank. I have inspected elements and gotten the following errors:
Failed to load resource: the server responded with a status of 404 (Not Found)
Uncaught ReferenceError: Keycloak is not defined
at (index):37:18
Any insight would be highly appreciated.
In ch2/frontend/index.html
, change the source for keycloak.js to "http://localhost:8080/js/keycloak.js"
(line 5)
re-run npm install and npm start for both frontend and backend. That worked for me
Thank you, it worked for me as well.
I have experienced another problem. Port 8000 is now loading endlessly.
Hi, since the book was published Keycloak has removed /auth
from the default context path in the new distribution. To follow the book it's better to use the Keycloak WildFly (deprecated)
download from https://www.keycloak.org/downloads rather than the new Quarkus distribution.
Alternatively you can either set the environment variable KC_URL without /auth
before building/running the examples:
export KC_URL=http://localhost:8080
Or, you can configure the new Keycloak distribution to include /auth
:
bin/kc.sh start-dev --http-relative-path=auth
We are planning a 2nd edition of the book that brings it up to line with the new distribution of Keycloak. Not sure when that will be published though.
Please re-open if the issue still persists.