Uploaded image for project: 'Red Hat build of Keycloak'
  1. Red Hat build of Keycloak
  2. RHBK-1018

[GHI#26597] Keycloak UI meets "Internal Sever Error" after save "Refresh Token Max Reuse" number

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False

      Before reporting an issue

      [X] I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

      Area

      admin/ui

      Describe the bug

      When save "Refresh Token Max Reuse" number, the UI page went blank with error: "Internal Sever Error"
      !Screenshot from 2024-01-30 00-21-33
      !Screenshot from 2024-01-30 00-38-55

      Version

      23.0.5

      Expected behavior

      Should save successfully without error.Internal Sever Error

      Actual behavior

      The page went to blank with error "Internal Sever Error".
      See logs in keycloak pod:
      2024-01-30 10:18:01,057 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (executor-thread-17) Uncaught server error: java.lang.NumberFormatException: For input string: ""
      at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
      at java.base/java.lang.Integer.parseInt(Integer.java:678)
      at java.base/java.lang.Integer.valueOf(Integer.java:999)
      at org.keycloak.models.jpa.RealmAdapter.lambda$getUserActionTokenLifespans$2(RealmAdapter.java:593)
      at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
      at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
      at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
      at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
      at java.base/java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1850)
      at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
      at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
      at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
      at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
      at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
      at org.keycloak.models.jpa.RealmAdapter.getUserActionTokenLifespans(RealmAdapter.java:593)
      at org.keycloak.models.cache.infinispan.entities.CachedRealm.<init>(CachedRealm.java:241)
      at org.keycloak.models.cache.infinispan.RealmCacheSession.prepareCachedRealm(RealmCacheSession.java:438)
      at org.keycloak.models.cache.infinispan.RealmCacheManager.computeSerialized(RealmCacheManager.java:142)
      at org.keycloak.models.cache.infinispan.RealmCacheSession.getRealm(RealmCacheSession.java:420)
      at org.keycloak.models.jpa.JpaRealmProvider.getRealmByName(JpaRealmProvider.java:162)
      at org.keycloak.models.cache.infinispan.RealmCacheSession.prepareCachedRealmByName(RealmCacheSession.java:480)
      at org.keycloak.models.cache.infinispan.RealmCacheSession.lambda$getRealmByName$0(RealmCacheSession.java:472)
      at org.keycloak.models.cache.infinispan.RealmCacheManager.computeSerialized(RealmCacheManager.java:142)
      at org.keycloak.models.cache.infinispan.RealmCacheSession.getRealmByName(RealmCacheSession.java:472)
      at org.keycloak.services.managers.RealmManager.getRealmByName(RealmManager.java:98)
      at org.keycloak.services.resources.RealmsResource.resolveRealmAndUpdateSession(RealmsResource.java:180)
      at org.keycloak.services.resources.RealmsResource.getProtocol(RealmsResource.java:105)
      at org.keycloak.services.resources.RealmsResource$quarkusrestinvoker$getProtocol_b2af2a2de155d6f3564a200a8d3634cdf6f57aa2.invoke(Unknown Source)
      at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
      at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:141)
      at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:145)
      at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:576)
      at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
      at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
      at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
      at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
      at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
      at java.base/java.lang.Thread.run(Thread.java:840)

      How to Reproduce?

      1. Login with admin.
      2. Go to "Realm Settings"->"Tokens" tab, enable "Revoke Refresh Token", set number for "Refresh Token Max Reuse", click "Save".

      Anything else?

      No response

              Unassigned Unassigned
              pvlha Pavel Vlha
              Keycloak Core Clients
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: