You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using waiter and an error occurs triggering the shiny:disconnected event, no gray screen appears. The app is not responsive anymore, but the lack of a visual hint of disconnection can be frustrating until you realize the app is not responding, especially in complex apps.
This can be reproduced clicking the Generate error button in the following example:
I've tracked the error to this code in assets/waiter/custom.js in the latest code in master:
$(document).on('shiny:disconnected',function(event){console.log("seems like a disconnect, hiding waiter");// this line was added to know when this was triggeredhide_waiter();Shiny.setInputValue("waiter_hidden",true,{priority: 'event'});});
Following this, in the hide_waiter js function it seems to fail in this step:
The last line fails as the dom is already null, as shown in the chromium console:
> waiter.js:124 Uncaught TypeError: Cannot read property 'getElementsByClassName' of null
I can think on two solutions for this:
Remove the event listener in custom.js. If the app is disconnected anyways, there is no need of removing the waiter.
Add a try-catch to the hide_waiter function, to catch this case and avoid the js error.
@JohnCoene If you can tell me what option you prefer (or have another one on mind), I can make a pull request with the fix ;)
The text was updated successfully, but these errors were encountered:
When using waiter and an error occurs triggering the
shiny:disconnected
event, no gray screen appears. The app is not responsive anymore, but the lack of a visual hint of disconnection can be frustrating until you realize the app is not responding, especially in complex apps.This can be reproduced clicking the
Generate error
button in the following example:I've tracked the error to this code in
assets/waiter/custom.js
in the latest code in master:Following this, in the
hide_waiter
js function it seems to fail in this step:The last line fails as the dom is already null, as shown in the chromium console:
> waiter.js:124 Uncaught TypeError: Cannot read property 'getElementsByClassName' of null
I can think on two solutions for this:
Remove the event listener in
custom.js
. If the app is disconnected anyways, there is no need of removing the waiter.Add a try-catch to the
hide_waiter
function, to catch this case and avoid the js error.@JohnCoene If you can tell me what option you prefer (or have another one on mind), I can make a pull request with the fix ;)
The text was updated successfully, but these errors were encountered: