Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Deviceready has not fired after 5 seconds

After update Cordova to v6.4.0 and Android platform to 6.0.0, my app don't work any more. I'm getting this:

deviceready has not fired after 5 seconds. cordova.js:1223
Channel not fired: onCordovaInfoReady cordova.js:1216
Channel not fired: onCordovaConnectionReady cordova.js:1216

I tried to remove all plugins and add it one by one. I found that is a problem with cordova-plugin-device and cordova-plugin-network-information. All my plugins are up to date

like image 375
Sebastián Rojas Avatar asked Nov 01 '16 01:11

Sebastián Rojas


3 Answers

If you happen to be running the Crosswalk plugin in your app I just confirmed that uninstalling it and reinstalling via;

cordova plugin add https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview

Gets rid of

deviceready has not fired after 5 seconds. cordova.js:1223 Channel not fired: onCordovaInfoReady cordova.js:1216 Channel not fired: onCordovaConnectionReady cordova.js:1216

You can see the issue at Crosswalk's Jira issue listing here.

https://crosswalk-project.org/jira/browse/XWALK-7422

like image 66
Brad W Avatar answered Nov 16 '22 13:11

Brad W


This should be fixed in cordova-android 6.1.0. It has not been added to the npm-registry yet, so you can use it by placing this to your config.xml:

<engine name="android" spec="https://github.com/apache/cordova-android.git#6.1.0"/>

like image 4
DJ_HOEK Avatar answered Nov 16 '22 13:11

DJ_HOEK


Solution:

put the call "cordova.js" to the last line in the page.

<script type="text/javascript" src="cordova.js"></script>
</body>
</html>

Greeting...

like image 5
Gabriel Alberto Avatar answered Nov 16 '22 12:11

Gabriel Alberto