A javascript fix if you ever have dashboards get "stuck" on the loading screen

One of the most annoying bugs I've found in Hubitats dashboards - it sometimes will get stuck on "Loading Variables" or some other part of the loading screen (which should not exist!) on my wall tablets. I run Fully Kiosk Browser and I was able to find a fix. In Fully Kiosk settings go to advanced web settings and add the following javascript:

//The code below reloads the tablet page if it gets stuck on the dashboard loading animation
// Wait for 2 seconds (200 milliseconds)
setTimeout(function() {
// Check if the loader element is still on the screen
var loader = document.querySelector('.loader');

if (loader) {
    // If the loader is present, reload the page
    console.log("Loader is still present, reloading the page...");
    location.reload();
} else {
    console.log("Loader not found, no reload necessary.");
}

}, 2000); // 2000 milliseconds = 2 seconds

1 Like

I have only had this on the odd occasion when I'm too quick to refresh the screen on a reboot.
Nice to know there is a fix. :slight_smile:
My issue is just the reload itself.
I have all the flags set on the Fire and even the reload timer on the Samsungs but I still have them stuck on old info, especially the FIre tablets.
The Fire are the worst with the keyboard bug hiding the popup all the time.
If I want to add or change the reload time the keyboard is usually gone and I have to find the fix each time.
I wish Fully would consistently see the hub is gone and just reload when the URL is available again.
Probably my fault not enabling enough option, or, too many. :wink: