We are using Vaadin 7.6.5 with automatic pushmode using Java 8 and Tomcat 8.
Periodically, sometimes after clicking and getting the “red wait spinner” that doesn’t seem to resolve itself after an extended wait (15 seconds or so), and sometimes even when the view/form appears normal (nothing spinning), buttons will no longer do anything when clicked.
Then if I just click the browser refresh button, the web page is usable again (the buttons work), and sometimes even the window/view change takes place based on the prior button click that seemed to do nothing (showing the button press was received, but the response was somehow lost).
What might be causing Vaadin UI to hang like this? The browser refresh is an easy workaround, but it makes our UI seem weaker because it seems to need this refresh several times a day, and many users just close the browser rather than refresh as it is unresponsive to their clicks (or gets stuck with the red wait cursor).
Have you tried to open your web application with ?debug parameter in URL. Normally client side exceptions are invisible, but once use ?debug, the client side exceptions will be shown on the browser screen. One thing that causes behavior you see is client side exception (the Widgetset execution will stop and hence your UI is not responsive anymore). It can be something else too, but you can use the hint I mentioned to verify that.
Unfortunately, this happens in production environments where ?debug isn’t enabled. And if you change the URL to add it on non-production systems, the page reloads and all is okay after the browser refresh.
Also, we can’t make it fail on purpose (do X and then the problem occurs). It just happens from time to time, and when browser refreshed all is okay again (as if the UI “environment” is happy).
But we can try running on our dev systems with ?debug set, but then we’ll have that window “in the way” all time time while we await this transient issue.
Is there any way to have client exception caught and then transmitted to the server to be reported there?
Similar problem happen to my application as well, this happen when user click a button real quick, without running ?debug the screen is just freeze.
Below Debug message log shows the exception, may I ask what could possibly cause this?
18043ms Index: -1, Size: 3
java.lang.IndexOutOfBoundsException: Index: -1, Size: 3
at Unknown.Ig(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.Kg(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.new NXd(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.Ode(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.t2d(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.m3c(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.B3c(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.r4c(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.Ukb(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.Hmb(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.$h(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.bi(com.vaadin.DefaultWidgetSet-0.js)
at Unknown.eval(com.vaadin.DefaultWidgetSet-0.js)
I hadn’t thought about viewing the javascript console, but I did note that when I click on the button that triggers a file down (using a non-Vaadin download servlet link), there was an error “Failed to load resource: Frame load interrupted” that seems to be related to the browser then being non-responsive until I reload the page:
From my Safari browsers JS console;
[Debug]
Mon Jul 20 2020 12:27:05 GMT-0700 (PDT) Atmosphere: beforeunload event (vaadinPush.js, line 1)
[Error]
Failed to load resource: Frame load interrupted (transnapshotsdownload, line 0)
[Debug]
Mon Jul 20 2020 12:27:10 GMT-0700 (PDT) Atmosphere: beforeunload event timeout reached. Reset _beforeUnloadState flag (vaadinPush.js, line 1)