My GWT 2.8 app stopped working with Chrome 54 (timers not working anymore)

270 views
Skip to first unread message

Bruno Salmon

unread,
Oct 27, 2016, 7:17:35 AM10/27/16
to GWT Users
hi,

My Chrome updated yesterday from version 53 to 54 and this made my GWT 2.8 app stop working.

There is no error message in the console but after some investigation, I noticed that the problem come from the timers which are not called anymore (whatever the method: GWT Timer / Elemental2 / JSNI). It's like setTimeout() doesn't work anymore in the browser (and this is what freezes my app).

However if I write a simple GWT 2.8 app whose code is just a timer invocation, it works in Chrome 54...

The timers stop working only when I invoke my application logic (a quite big app). So it looks like something breaks the timers in the compiled javascript code, but I don't know how to investigate further (as the whole application logic run without error).

My app works fine in FireFox.

Any idea what's happening?

Bruno Salmon

unread,
Nov 21, 2016, 6:27:33 AM11/21/16
to GWT Users
I found the problem, so I'm sharing the result of my investigation as this may help other people facing a similar issue with Chrome 54+ or other webkit based browsers:

My app replaces the document <body> (which initially contains a splash screen) with the application root element once loaded and initialized. This replacement removed all previous elements under the <body> tag which were actually not only the splash screen but also the <scripts> tags (this was considered a best practice to put them here - not sure if this is still the case with http2).

Anyway removing the scripts tags once the application was loaded in memory didn't cause any problem up to Chrome 54 and the application could continue working as the scripts were already resident in memory.

But from Chrome 54 this is not the case anymore: it seems removing the script elements now immediately removes the resident application from the memory as well.

This is what caused my app stop working and even my timers programmed in the initialization step were finally not called after the scripts tags have been removed...

Max Fromberger

unread,
Nov 21, 2016, 2:05:03 PM11/21/16
to GWT Users
So You re-add the script tags?

Bruno Salmon

unread,
Nov 21, 2016, 2:52:24 PM11/21/16
to GWT Users
No I just remove all elements under <body> except the <script> tags before adding the application node. This made my application work again.
Reply all
Reply to author
Forward
0 new messages