-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to GET single webhook #27
Comments
Any exceptions I’m the logs?
…On Mon, Jun 19, 2023, at 10:56 AM, Michele Della Neve wrote:
We are using Keycloak 21.1.1 and keycloak-events 0.17
When requesting a webhook with `GET /realms/my-realm/webhooks/:id` the
following invalid JSON is returned.
{
"id": "a656b196-1c9d-4430-9d86-ddf59ca1eeaa",
"enabled": true,
"url": "https://webhook.site/something",
"createdBy": "f23e6aa3-7dc7-44f3-98a4-da0e19247440",
"createdAt": 1686695153000,
"realm": "my-realm",
"eventTypes"
}{
"error": "unknown_error"
}
Requesting all the webhooks using `GET /realms/my-realm/webhooks` shows
the webhook correctly.
[
{
"id": "a656b196-1c9d-4430-9d86-ddf59ca1eeaa",
"enabled": true,
"url": "https://webhook.site/something",
"createdBy": "f23e6aa3-7dc7-44f3-98a4-da0e19247440",
"createdAt": 1686695153000,
"realm": "my-realm",
"eventTypes": [
"access.UPDATE_PROFILE",
"access.REGISTER"
]
}
]
—
Reply to this email directly, view it on GitHub
<#27>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAB3UHP2FDCU5QRWJNYDDIDXMAH5JANCNFSM6AAAAAAZLTVZYU>.
You are receiving this because you are subscribed to this
thread.Message ID: ***@***.***>
|
@xgp Sadly no logs. |
@xgp Good news. I turned on Also some more information. We are using mysql for the database instead of postgresql.
|
Thanks for the logs. I’m not able to reproduce, but it looks like a JPA problem when loading the webhook. Not sure why it would do that for a single and not for a collection.
I’m out for the next couple of days, but I’ll look at it when I get back. In the meantime, If you have the ability to write a test to reproduce the problem, that would be really helpful.
…On Tue, Jun 20, 2023, at 4:52 AM, Michele Della Neve wrote:
@xgp <https://github.com/xgp> Good news. I turned on `--log-level=ALL`
and was able to find this.
`2023-06-20 02:49:38,182 TRACE
[org.hibernate.LazyInitializationException] (executor-thread-0) failed
to lazily initialize a collection of role:
io.phasetwo.keycloak.model.jpa.entity.WebhookEntity.eventTypes, could
not initialize proxy - no Session:
org.hibernate.LazyInitializationException: failed to lazily initialize
a collection of role:
io.phasetwo.keycloak.model.jpa.entity.WebhookEntity.eventTypes, could
not initialize proxy - no Session
at
org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:614)
at
org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:218)
at
org.hibernate.collection.internal.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:162)
at
org.hibernate.collection.internal.PersistentSet.size(PersistentSet.java:168)
at
com.fasterxml.jackson.databind.ser.std.CollectionSerializer.serialize(CollectionSerializer.java:97)
at
com.fasterxml.jackson.databind.ser.std.CollectionSerializer.serialize(CollectionSerializer.java:25)
at
com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:728)
at
com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:774)
at
com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:178)
at
com.fasterxml.jackson.databind.ser.DefaultSerializerProvider._serialize(DefaultSerializerProvider.java:480)
at
com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:319)
at
com.fasterxml.jackson.databind.ObjectWriter$Prefetch.serialize(ObjectWriter.java:1518)
at
com.fasterxml.jackson.databind.ObjectWriter.writeValue(ObjectWriter.java:1007)
at
org.jboss.resteasy.plugins.providers.jackson.ResteasyJackson2Provider.writeTo(ResteasyJackson2Provider.java:345)
at
org.jboss.resteasy.core.interception.jaxrs.ServerWriterInterceptorContext.lambda$writeTo$1(ServerWriterInterceptorContext.java:79)
at
io.quarkus.resteasy.runtime.standalone.VertxHttpRequest$VertxExecutionContext.executeBlockingIo(VertxHttpRequest.java:251)
at
org.jboss.resteasy.core.interception.jaxrs.ServerWriterInterceptorContext.writeTo(ServerWriterInterceptorContext.java:79)
at
org.jboss.resteasy.core.interception.jaxrs.AbstractWriterInterceptorContext.syncProceed(AbstractWriterInterceptorContext.java:245)
at
org.jboss.resteasy.core.interception.jaxrs.AbstractWriterInterceptorContext.proceed(AbstractWriterInterceptorContext.java:224)
at
org.keycloak.quarkus.runtime.integration.jaxrs.TransactionalResponseInterceptor.aroundWriteTo(TransactionalResponseInterceptor.java:41)
at
org.jboss.resteasy.core.interception.jaxrs.AbstractWriterInterceptorContext.syncProceed(AbstractWriterInterceptorContext.java:254)
at
org.jboss.resteasy.core.interception.jaxrs.AbstractWriterInterceptorContext.getStarted(AbstractWriterInterceptorContext.java:170)
at
org.jboss.resteasy.core.interception.jaxrs.ServerWriterInterceptorContext.lambda$getStarted$0(ServerWriterInterceptorContext.java:73)
at
org.jboss.resteasy.core.interception.jaxrs.ServerWriterInterceptorContext.aroundWriteTo(ServerWriterInterceptorContext.java:93)
at
org.jboss.resteasy.core.interception.jaxrs.ServerWriterInterceptorContext.getStarted(ServerWriterInterceptorContext.java:73)
at
org.jboss.resteasy.core.ServerResponseWriter.lambda$writeNomapResponse$3(ServerResponseWriter.java:163)
at
org.jboss.resteasy.core.interception.jaxrs.ContainerResponseContextImpl.filter(ContainerResponseContextImpl.java:410)
at
org.jboss.resteasy.core.ServerResponseWriter.executeFilters(ServerResponseWriter.java:252)
at
org.jboss.resteasy.core.ServerResponseWriter.writeNomapResponse(ServerResponseWriter.java:101)
at
org.jboss.resteasy.core.ServerResponseWriter.writeNomapResponse(ServerResponseWriter.java:74)
at
org.jboss.resteasy.core.SynchronousDispatcher.writeResponse(SynchronousDispatcher.java:594)
at
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524)
at
org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:261)
at
org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:161)
at
org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)
at
org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:164)
at
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:247)
at
io.quarkus.resteasy.runtime.standalone.RequestDispatcher.service(RequestDispatcher.java:73)
at
io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.dispatch(VertxRequestHandler.java:151)
at
io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.handle(VertxRequestHandler.java:82)
at
io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.handle(VertxRequestHandler.java:42)
at
io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1284)
at
io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:173)
at
io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:140)
at
io.quarkus.vertx.http.runtime.StaticResourcesRecorder$2.handle(StaticResourcesRecorder.java:84)
at
io.quarkus.vertx.http.runtime.StaticResourcesRecorder$2.handle(StaticResourcesRecorder.java:71)
at
io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1284)
at
io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:173)
at
io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:140)
at
io.quarkus.vertx.http.runtime.VertxHttpRecorder$6.handle(VertxHttpRecorder.java:430)
at
io.quarkus.vertx.http.runtime.VertxHttpRecorder$6.handle(VertxHttpRecorder.java:408)
at
io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1284)
at
io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:173)
at
io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:140)
at
org.keycloak.quarkus.runtime.integration.web.QuarkusRequestFilter.lambda$createBlockingHandler$0(QuarkusRequestFilter.java:82)
at
io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:576)
at
org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
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:833)
`
—
Reply to this email directly, view it on GitHub
<#27 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAB3UHPCQLBAMSSR6DZW4V3XMEF5NANCNFSM6AAAAAAZLTVZYU>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We are using Keycloak 21.1.1 and keycloak-events 0.17
When requesting a webhook with
GET /realms/my-realm/webhooks/:id
the following invalid JSON is returned.Requesting all the webhooks using
GET /realms/my-realm/webhooks
shows the webhook correctly.I have also tried this with webhooks with a
*
event type and ran into the same result.The text was updated successfully, but these errors were encountered: