I'm trying to use guacamole API to embed guacamole (version 1.0.0) in our application as a web component. I managed to create the web component (I'm using Vaadin 8.6 running in Apache Karaf 4.1.7 OSGI container, which uses Jetty 9.3 as default) and it's mostly working for a while. My remote desktop is displayed on the HTML element as expected. However, after a while of interacting with the remote desktop, mouse click events don't seem to work anymore. Sometimes I click and I get the expected response, like a popup window, from the remote desktop 30 seconds later or more. Funny thing is that first the click events don't work but the mouse movement and cursor changes keep working but after a while even those fail until everything freezes.
First I just followed the example from "Writing your own web application" and then I implemented a WebSocket servlet based on the code from the guacamole app. But that also has the same problem.
I verified that the client side is sending the mouse events, at least up to guacamole client call to sendMouseState.
Running the standard guacamole app in the same machine (in Tomcat) and connecting to the same guacd server with the same connection to remote desktop, works just fine, so I don't think the machine is slow. My full application in Karaf is not particularly heavy either.
Any hints what might be happening or how to debug it?