lookitscook / kiosk

Allows any URL to be loaded as a fullscreen kiosk.
https://kiosk.cook.company
MIT License
310 stars 101 forks source link

Crashes on ChromeBox #13

Closed zekim closed 9 years ago

zekim commented 9 years ago

I am running the software on an ASUS Chromebox and have encountered a minor issue.

When the Chromebox is hooked up to an ethernet connection, everything works fine. However, when the Chromebox runs off of Wi-Fi the Kiosk software crashes at startup.

I believe that the issue is that the software is trying to fetch the webpage before a network connection is available as the Wi-Fi takes longer to startup than ethernet.

Is it possible to add a check for navigator.online before attempting to load the webpage?

Something along these lines: function launch() {

if (navigator.onLine) {
chrome.storage.local.get('url',function(x){ $('#browser').attr('src',x["url"]).get(0).reload(); }); } else { setTimeout(launch,10000); }
}

matt-cook commented 9 years ago

Thanks for the detailed report. I'll post a patch on Friday when I'm back in the office. Merry Christmas.

On Wednesday, December 24, 2014, Michael Zebrowski notifications@github.com wrote:

I am running the software on an ASUS Chromebox and have encountered a minor issue.

When the Chromebox is hooked up to an ethernet connection, everything works fine. However, when the Chromebox runs off of Wi-Fi the Kiosk software crashes at startup.

I believe that the issue is that the software is trying to fetch the webpage before a network connection is available as the Wi-Fi takes longer to startup than ethernet.

Is it possible to add a check for navigator.online before attempting to load the webpage?

Something along these lines: function launch() {

if (navigator.onLine) {

chrome.storage.local.get('url',function(x){ $('#browser').attr('src',x["url"]).get(0).reload(); }); } else { setTimeout(launch,10000); }

}

— Reply to this email directly or view it on GitHub https://github.com/zebradog/kiosk/issues/13.

matt-cook commented 9 years ago

Hi Michael. The only "crash" I was able to reproduce was the page load error show in the webview when it failed to connect to the page. It will now (as of v5.1.2) attempt to reconnect once a second if the webview fails to load. Did this fix the issue for you?