Communication between client and server broken after inactivity

Hi all,

I’m using Vaadin 7.1.0 integrated to OSGi and I enabled client push by exporting atmosphere packages version 1.0.12.

In my case, my application is unusable after a few minutes of inactivity. When I click on a button or any component which needs to communicate with the server, nothing happens, only progress indicator at the middle of the page … running indefinitely and I have no explication for it (that why I’m writing this post). I suspect the version of atmosphere which is not the same as that used by vaadin.

Any idea?

Thanks,
Mohammed

No one? No idea?

Mohammed.

Hello,

I watched what was happening in browser console and I see that on each action (button click for example) requests are sent like :

INFO: Making UIDL Request with params: 83bdf227-6be0-4f1a-9511-ce97a30fcb08[["51","com.vaadin.shared.ui.button.ButtonServerRpc",
"click",[{"type":"1", "button":"LEFT", "clientY":"253", "clientX":"63", "altKey":false, "relativeX":"63", "shiftKey":false, "metaKey":false, 
"relativeY":"46", "ctrlKey":false}]]] 0.js:205

Thu Sep 05 09:59:11 GMT+200 2013 com.vaadin.client.VConsole
INFO: Sending push message: 83bdf227-6be0-4f1a-9511-ce97a30fcb08[["51","com.vaadin.shared.ui.button.ButtonServerRpc","click",
[{"type":"1", "button":"LEFT", "clientY":"253", "clientX":"63", "altKey":false, "relativeX":"63", "shiftKey":false, "metaKey":false, 
"relativeY":"46", "ctrlKey":false}]]] 

And then a response is written and sent :

INFO: Received push message: for(;;);[{"changes" : [["change",{"pid":"103"},["39",{"id":"103","animate":false,"dragmode":2,"selectmode":"multi",
"cols":5,"rows":1,"firstrow":0,"totalrows":1,"pagelength":7,"colfooters":false,"vcolorder":["1"]
,"pb-ft":0,"pb-l":0,"clearKeyMap":true,
"v":{"selected":[],"firstvisible":0,"sortcolumn":"1","sortascending":true,"reqrows":-1,"reqfirstrow":-1,"collapsedcolumns":["2","3","4","5"]
,
"noncollapsiblecolumns":[]}},["rows",{},["tr",{"icon":"app:\/\/APP\/global\/0\/legacy\/26\/directory-icon.png","key":10,"depth":0,"ca":true,"open":false},
"Data"]],["visiblecolumns",{},["column",{"cid":"1","caption":"","fcaption":""}]
,["column",{"cid":"2","caption":"","fcaption":"","collapsed":true}]
,
["column",{"cid":"3","caption":"","fcaption":"","collapsed":true}]
,["column",{"cid":"4","caption":"","fcaption":"","collapsed":true}]
,
["column",{"cid":"5","caption":"","fcaption":"","collapsed":true}]
]]]], "state":{}, "types":{"103":"39"}, "hierarchy":{"103":[]}, "rpc" : []
, 
"meta" : {"async":true}, "resources" : {}, "timings":[2181, 6]
}] 

I waited a few seconds and I done the same action and then request is sent but no response received !

INFO: Making UIDL Request with params: 83bdf227-6be0-4f1a-9511-ce97a30fcb08[["51","com.vaadin.shared.ui.button.ButtonServerRpc","click",
[{"type":"1", "button":"LEFT", "clientY":"253", "clientX":"63", "altKey":false, "relativeX":"63", "shiftKey":false, "metaKey":false, 
"relativeY":"46", "ctrlKey":false}]]] 0.js:205
Thu Sep 05 09:59:11 GMT+200 2013 com.vaadin.client.VConsole
INFO: Sending push message: 83bdf227-6be0-4f1a-9511-ce97a30fcb08[["51","com.vaadin.shared.ui.button.ButtonServerRpc","click",
[{"type":"1", "button":"LEFT", "clientY":"253", "clientX":"63", "altKey":false, "relativeX":"63", "shiftKey":false, "metaKey":false, 
"relativeY":"46", "ctrlKey":false}]]] 0.js:205
Thu Sep 05 10:01:31 GMT+200 2013 com.vaadin.client.VConsole
INFO: Sending heartbeat request... 0.js:205
Thu Sep 05 10:01:32 GMT+200 2013 com.vaadin.client.VConsole
INFO: Heartbeat response OK 0.js:205
Thu Sep 05 10:01:32 GMT+200 2013 com.vaadin.client.VConsole
INFO: Scheduling heartbeat in 300 seconds 0.js:205
Websocket closed, reason: Unknown: no status code was provided even though one was expected. vaadinPush.js:23
Websocket closed, wasClean: true vaadinPush.js:23
Thu Sep 05 10:02:55 GMT+200 2013 com.vaadin.client.VConsole
INFO: Push connection closed, awaiting reconnection 0.js:205
Thu Sep 05 10:03:01 GMT+200 2013 com.vaadin.client.VConsole
INFO: Reopening push connection 

Node: I am using Vaadin with OSGi and to enable push I added a dependency in my app to atmosphere-runtime 1.0.12 and included vaadinPush.js in my app bundle (I had some troubles with vaadin-push bundle in OSGi).

Regards,
Mohammed.

Hi, you
need
to use the Vaadin’s rebased and patched Atmosphere bundle, Vaadin won’t work reliably with vanilla Atmosphere (and certainly not with 1.0.12). 7.1.0 had a
bug
in the vaadin-push manifest; you should upgrade to 7.1.1 or later.

The bundle required by Vaadin 7.1.1 and later is called com.vaadin.external.atmosphere.atmosphere-runtime, version 1.0.14.vaadin4.

Hi Johannes,

it seems that my problem was solved by adding transport = STREAMING to push annotation in my UI :

@Push(transport = Transport.STREAMING)

But still having the warning “Vaadin depends on Atmosphere 1.0.14.vaadin4 but version 1.0.12 was found.”. I’ll update to 1.0.14.vaadin4.

Thanks :-),
Mohammed.

Did updateing to 1.0.14 fix the issue? I have the same problem, and am going to put in the “transport = …” line to see if it helps.