push transport question

My users working inside a corporation with its myriad networking and firewall configurations (which are a bit mysterious to me) have been getting the attached error sometimes. The body of it has this text:

(SyntaxError) : Unexpected token ) - Original JSON-text{“changes” : [[“change”,{“pid”:“159”},[“22”,{“id”:“159”,“selectmode”:“multi”,“cr”:1.0,“cols”:18,“rows”:34,“firstrow”:0,“totalrows”:64,“pagelength”:19,“colheaders”:true,“colfooters”:f

Is there a way to catch this error and start again?

Better still, is there a way to use a more robust Push mechanism (like long polling or ?) that I can set to avoid whatever problem the company’s firewall might be doing to this user. I have a feeling the firewall is just dropping the underlying socket after a given amount of time.

Thanks, Greg.

13451.png

Hi, which exact Vaadin version are you using? There have been a few fixes related to the sort of broken messages you’re getting in 7.1 maintenance releases. It is true, though, that the 7.1 push is unfortunately quite fragile in the presence of firewalls or proxies, and there may not be much that can be done about it. Vaadin 7.2 will introduce long polling support, which will hopefully make this kind of use cases more robust. In the meantime, you might like to try the builtin polling using UI.setPollInterval().

This is version 7.1.10.

Should I using polling instead of automatic push or some combination? It would be nice if I could set a 1 min polling interval to fallback on.

The programmer in me recoils from the idea of setting a 2 or 3 second poll, but maybe that’s the way to go if it would avoid these errors?

Thanks, Greg.