Cordova 3.5 deviceready event does not fire after 5 seconds

I recently updated my cordova app from cordova v2.9 to version 3.5.0. After adding the plugins from the command line, I imported the eclipse app to check on the Android device. But, when I launch the application, I see the logcat message below:

07-08 11:24:03.359: I/Web Console(1500): deviceready has not fired after 5 seconds. at file:///android_asset/www/cordova/cordova.js:1154

07-08 11:24:03.359: D/CordovaLog(1500): file:///android_asset/www/cordova/cordova.js: Line 1147 : Channel not fired: onFileSystemPathsReady

07-08 11:24:03.359: I/Web Console(1500): Channel not fired: onFileSystemPathsReady at file:///android_asset/www/cordova/cordova.js:1147

According to the document prepared for the Cordova Device , I had to snap inside . He did not fire. Also tried linking it out according to some answers to SO. Not lucky yet. Can someone help me? devicereadydocument.ready()document.ready()

Associating events with the finished device

function cordovaInit() {
    document.addEventListener('deviceready', initApp, false);
}

I call cordovaInit()from the onload()body element as shown below:

<body onload="cordovaInit()">

deviceready , Nullpointer :

07-08 18:58:40.750: W/System.err(6670): java.lang.NullPointerException
07-08 18:58:40.750: W/System.err(6670):     at org.apache.cordova.file.LocalFilesystem.filesystemPathForURL(LocalFilesystem.java:67)
07-08 18:58:40.750: W/System.err(6670):     at org.apache.cordova.file.LocalFilesystem.getFileForLocalURL(LocalFilesystem.java:189)
07-08 18:58:40.750: W/System.err(6670):     at org.apache.cordova.file.FileUtils.getFile(FileUtils.java:749)
07-08 18:58:40.760: W/System.err(6670):     at org.apache.cordova.file.FileUtils.access$5(FileUtils.java:742)
07-08 18:58:40.760: W/System.err(6670):     at org.apache.cordova.file.FileUtils$16.run(FileUtils.java:397)
07-08 18:58:40.760: W/System.err(6670):     at org.apache.cordova.file.FileUtils$23.run(FileUtils.java:525)
07-08 18:58:40.760: W/System.err(6670):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
07-08 18:58:40.760: W/System.err(6670):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
07-08 18:58:40.760: W/System.err(6670):     at java.lang.Thread.run(Thread.java:856)
+4
4

. / File (org.apache.cordova.file)   . OnFileSystemReady - .

+2

- , SD-

, , , , , p >

0

, cordova.file( , ), , v4

0

, cordova 4.0.0 , , (org.apache.cordova.network-information)

: plugins/ ( , platforms ). , , . , chrome://inspect/#devices , , , 5 .

: cordova plugin remove org.apache.cordova.network-information cordova plugin add org.apache.cordova.network-information

0

Source: https://habr.com/ru/post/1543618/


All Articles