After the first Heartbeat request is sent (by default 5 minutes after the portlet is loaded), the portlet doesn't respond anymore. For example, if a button on the portlet is clicked the loading indicator is shown and stayed there forever like the following.
To reproduce it, click on a button in the portlet after 5 minutes (heartbeatInterval) has passed since the portlet is loaded.
The following errors are shown in the browser console log:
Received message with server id 6 but expected 5. Postponing handling until the missing message(s) have been received
Gave up waiting for message 5 from the server
One other noticeable thing that seems to be the cause of this bug is that the heartbeat request has a JSON response which can be seen in the Network section of Chrome Developer Tools. While normally heartbeat requests don't have any response. The JSON response is like the following.
In fact, the heartbeat request is not handled by HeartbeatHandler. It's handled by either PortletBootstrapHandler or PortletUidlRequestHandler because their canHandleRequest method returns true for a heartbeat request.
After the first Heartbeat request is sent (by default 5 minutes after the portlet is loaded), the portlet doesn't respond anymore. For example, if a button on the portlet is clicked the loading indicator is shown and stayed there forever like the following.
To reproduce it, click on a button in the portlet after 5 minutes (heartbeatInterval) has passed since the portlet is loaded.
The following errors are shown in the browser console log:
One other noticeable thing that seems to be the cause of this bug is that the heartbeat request has a JSON response which can be seen in the Network section of Chrome Developer Tools. While normally heartbeat requests don't have any response. The JSON response is like the following.
In fact, the heartbeat request is not handled by
HeartbeatHandler
. It's handled by eitherPortletBootstrapHandler
orPortletUidlRequestHandler
because theircanHandleRequest
method returnstrue
for a heartbeat request.Versions: