[keycloak-user] Quickstart tutorials (app-angular2 and app-jee-html5) not working

Viggo Navarsete viggo.navarsete at gmail.com
Sat Feb 24 05:27:36 EST 2018


Hi,

I've deployed the jax-rs service tutorial
https://github.com/keycloak/keycloak-quickstarts/tree/latest/service-jee-jaxrs,
and then tried to run the various quickstart tutorial clients towards it:

app-angular2, app-jee-html5:
I get the following in the console:
errors.ts:42 ERROR SyntaxError: Unexpected end of JSON input

The wildfly access log shows me this:
11:13:29,795 INFO  [io.undertow.accesslog] (default task-27) 127.0.0.1
[24/Feb/2018:11:13:29 +0100] "OPTIONS /service/secured HTTP/1.1" 200
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/62.0.3202.75 Safari/537.36"
11:13:29,831 INFO  [io.undertow.accesslog] (default task-25) 127.0.0.1
[24/Feb/2018:11:13:29 +0100] "GET /service/secured HTTP/1.1" 200
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/62.0.3202.75 Safari/537.36"


But, when I run the app-jee-jsp it works as expected, I can see this in the
wildfly access log:

public gives
11:18:35,840 INFO  [stdout] (default task-22) Service url:
http://localhost:8080/service
11:18:35,865 INFO  [stdout] (default task-30) Public endpoint called
11:18:35,865 INFO  [io.undertow.accesslog] (default task-30) 127.0.0.1
[24/Feb/2018:11:18:35 +0100] "GET /service/public HTTP/1.1" 200
"Apache-HttpClient/4.5 (Java/1.8.0_151)"
11:18:35,867 INFO  [io.undertow.accesslog] (default task-22) 127.0.0.1
[24/Feb/2018:11:18:35 +0100] "GET /app-jsp/index.jsp?action=public
HTTP/1.1" 200 "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/62.0.3202.75 Safari/537.36"

secured gives
11:19:00,781 INFO  [stdout] (default task-21) Service url:
http://localhost:8080/service
11:19:00,806 INFO  [stdout] (default task-29) Secured endpoint called
11:19:00,807 INFO  [io.undertow.accesslog] (default task-29) 127.0.0.1
[24/Feb/2018:11:19:00 +0100] "GET /service/secured HTTP/1.1" 200
"Apache-HttpClient/4.5 (Java/1.8.0_151)"
11:19:00,808 INFO  [io.undertow.accesslog] (default task-21) 127.0.0.1
[24/Feb/2018:11:19:00 +0100] "GET /app-jsp/index.jsp?action=secured
HTTP/1.1" 200 "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/62.0.3202.75 Safari/537.36"


admin gives
11:19:21,979 INFO  [stdout] (default task-26) Service url:
http://localhost:8080/service
11:19:22,003 INFO  [stdout] (default task-24) Admin endpoint called
11:19:22,003 INFO  [io.undertow.accesslog] (default task-24) 127.0.0.1
[24/Feb/2018:11:19:22 +0100] "GET /service/admin HTTP/1.1" 200
"Apache-HttpClient/4.5 (Java/1.8.0_151)"
11:19:22,005 INFO  [io.undertow.accesslog] (default task-26) 127.0.0.1
[24/Feb/2018:11:19:22 +0100] "GET /app-jsp/index.jsp?action=admin HTTP/1.1"
200 "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/62.0.3202.75 Safari/537.36"


So, to me it seem like the request reach the REST endpoint at all for the
app-angular2 and app-jee-html5 clients !

This is confusing me a lot, and I get into similar issues with my own
projects, hence I want to make sure the tutorials at least work properly.

I run this on Wildfly 11.0.0.Final and Keycloak 3.4.3.Final.

Could there be some issues with Wildfly 11.0.0.Final vs the Wildfly
10.0.0.Final, or the Keycloak versions?


Could someone please confirm that they're able to run these tutorials
themselves?


Best regards,
Viggo Navarsete


More information about the keycloak-user mailing list