# NPE in Keycloak 16.1.1 (Docker)

**URL:** <https://forum.keycloak.org/t/npe-in-keycloak-16-1-1-docker/15407>\
**Category:** Getting advice\
**Tags:** authentication\
**Created:** [May 6, 2022, 6:08pm UTC](https://forum.keycloak.org/t/npe-in-keycloak-16-1-1-docker/15407 "2022-05-06T18:08:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jvanhill](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/32.png) [@jvanhill](https://forum.keycloak.org/u/jvanhill)\
**Post date:** [May 6, 2022, 6:08pm UTC](https://forum.keycloak.org/t/npe-in-keycloak-16-1-1-docker/15407/1 "2022-05-06T18:08:02Z")

</div>

I have some functional tests that use the Keycloak docker image to run against. Intermittently when authenticating with Keycloak, the tests will fail. Sometimes when this occurs, I will see the following NPE (other times, my test fails to capture trace from the container):

```auto
02:33:25,091 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (default task-2) Uncaught server error: java.lang.NullPointerException
at org.keycloak.keycloak-services@16.1.1//org.keycloak.services.util.AuthenticationFlowURLHelper.getLastExecutionUrl(AuthenticationFlowURLHelper.java:92)
at org.keycloak.keycloak-services@16.1.1//org.keycloak.services.util.BrowserHistoryHelper$JavascriptHistoryReplace.saveResponseAndRedirect(BrowserHistoryHelper.java:93)
at org.keycloak.keycloak-services@16.1.1//org.keycloak.services.resources.LoginActionsService.processFlow(LoginActionsService.java:324)
at org.keycloak.keycloak-services@16.1.1//org.keycloak.services.resources.LoginActionsService.processAuthentication(LoginActionsService.java:283)
at org.keycloak.keycloak-services@16.1.1//org.keycloak.services.resources.LoginActionsService.authenticate(LoginActionsService.java:267)
at org.keycloak.keycloak-services@16.1.1//org.keycloak.services.resources.LoginActionsService.authenticateForm(LoginActionsService.java:340)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)

```

---

<div class="post-metadata">

**Author:** ![jvanhill](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/32.png) [@jvanhill](https://forum.keycloak.org/u/jvanhill)\
**Post date:** [May 13, 2022, 4:55pm UTC](https://forum.keycloak.org/t/npe-in-keycloak-16-1-1-docker/15407/2 "2022-05-13T16:55:39Z")

</div>

Bumping to see if anyone has encountered anything like this.

Perhaps I need to open an issue? Not sure where I do so.
