javascript - deviceready not fired after 5 seconds Cordova - Stack Overflow

I get this console messagedeviceready has not fired after 5 seconds.Channel not fired: onPluginsReady

I get this console message

deviceready has not fired after 5 seconds.

Channel not fired: onPluginsReady

Channel not fired: onCordovaReady

when I use the following ionic code snippet.

ionic.Platform.ready(function(){
    // will execute when device is ready, or immediately if the device is already ready.
    // some code here. I am making calls to sqlite cordova plugin
});

The control never goes inside the ionic.Platform.ready function. Funny thing is that my code works on android devices but don't work on iOS devices.

I have tried doing a lot of stuff so far. I have tried following the troubleshooting given in this link. /

The following is my configuration

Cordova version 5.3.1

Ionic version 1.6.4

I get this console message

deviceready has not fired after 5 seconds.

Channel not fired: onPluginsReady

Channel not fired: onCordovaReady

when I use the following ionic code snippet.

ionic.Platform.ready(function(){
    // will execute when device is ready, or immediately if the device is already ready.
    // some code here. I am making calls to sqlite cordova plugin
});

The control never goes inside the ionic.Platform.ready function. Funny thing is that my code works on android devices but don't work on iOS devices.

I have tried doing a lot of stuff so far. I have tried following the troubleshooting given in this link. http://ngcordova./docs/mon-issues/

The following is my configuration

Cordova version 5.3.1

Ionic version 1.6.4

Share Improve this question edited Jun 20, 2020 at 9:12 CommunityBot 11 silver badge asked Sep 18, 2015 at 18:52 grane2212grane2212 7741 gold badge10 silver badges30 bronze badges
Add a ment  | 

4 Answers 4

Reset to default 1

window.cordova.plugins.Keyboard was causing some issues as it is deprecated as of Cordova version 3.0. Now you need to use window.cordova.require() syntax to access the plugins.

Also removing and adding the ios platform helped.The package.json gets messed up sometimes.

Try adding this if not already included..

http-equiv="Content-Security-Policy"

To meta tag in your index.html file. It should look like..

<meta http-equiv="Content-Security-Policy".......>

I had same issue on iOS .Spent almost 3 to 4 days .Finally any of these two workarounds worked for me

1.add < meta http-equiv="Content-Security-Policy".......> to index.html

2.downgrade platform to 4.0.0 (cordova platform update [email protected]

@grane2212, You did not post any code, so it is difficult to debug this. Please post your index.html file, if this does not answer your question.

You may be loading your javascript support file from a CDN or the web. DO NOT DO THIS.
Load all *.js files locally.

Let me know, if this helps.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742328196a4423175.html

相关推荐

  • javascript - deviceready not fired after 5 seconds Cordova - Stack Overflow

    I get this console messagedeviceready has not fired after 5 seconds.Channel not fired: onPluginsReady

    14小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信