From: Rafal Walczyna Date: Mon, 14 May 2018 09:47:47 +0000 (+0200) Subject: [Common] Extending deviceready timeout to 10 sec X-Git-Tag: submit/tizen/20180514.095841^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b753c72d4c8db7a9843db5dc7208808e679298ec;p=platform%2Fcore%2Fapi%2Fcordova-plugins.git [Common] Extending deviceready timeout to 10 sec Timeout has been extended to 10 seconds, because when device is busy on other tasks then deviceready is not always fired Change-Id: Ibbeef1cfa89fe34834c73b259edea13d10304457 Signed-off-by: Rafal Walczyna --- diff --git a/src/lib/cordova-5.1.1.js b/src/lib/cordova-5.1.1.js index cb58c1d..ec7e2d2 100644 --- a/src/lib/cordova-5.1.1.js +++ b/src/lib/cordova-5.1.1.js @@ -900,11 +900,11 @@ function logUnfiredChannels(arr) { window.setTimeout(function() { if (channel.onDeviceReady.state != 2) { - console.log('deviceready has not fired after 5 seconds.'); + console.log('deviceready has not fired after 10 seconds.'); logUnfiredChannels(platformInitChannelsArray); logUnfiredChannels(channel.deviceReadyChannelsArray); } -}, 5000); +}, 10000); //Replace navigator before any modules are required(), to ensure it happens as soon as possible. //We replace it so that properties that can't be clobbered can instead be overridden.