Vaadin radomly shows problem alerts

Hello, I’m using Vaadin 6.8.8 deployed on a Glassfish server, I need a cross-site embedded app so I also use Vaadin-XS addon (the version from SVN).

When I was developming my application I got a lot of session expired and communication problems, It was frustrating. Maybe I was in the middle of my application flow and I got a session expired notification.

So I decided to use the SessionGuard addon to try to keep alive the session (I don’t know if that is necessary).

final SessionGuard sessionGuard = new SessionGuard();

And also I override the getSystemMessages method to modify the communication error and session expired messages and restart the application.

public static SystemMessages getSystemMessages() {
		CustomizedSystemMessages m = new CustomizedSystemMessages();

		return m;

Now I think the number of problems has decreased. But now, a
JavaScript standard alert with
Server Error
message appears
. Sometimes even when the application starts for the first time.

I’m stuck with this. I don’t know if it’s a glassfish related issue, a vaadin-xs issue or a vaadin issue. How can avoid this alert? And how can I avoid session expired problems?

Can someone help me and give any clue?