Reputation: 31
After upgrade Cordova (from cordova_2.9.js to cordova_4.4.js)
The log will show
deviceready has not fired after 5 seconds. cordova.js
Channel not fired: onCordovaInfoReady cordova.js
Channel not fired: onCordovaConnectionReady cordova.js
For compatibility and not to impact user system, my scenario is:
Native app use cordova_4.4.js
But Web still use cordova_2.9.js
In the scenario, when I trigger native function in web, there is no response
But after tap the home button then callback the app to foreground again, the native function works! So weird!
I've tried many solutions but all failed
Including add/remove platforms, add/remove plugins, add CSP...
Is any suggestions? Thanks
Upvotes: 0
Views: 175
Reputation: 487
I ran in the same problem. I've had an entry in the config.xml of my ionic4 project.
<preference name="Hostname" value="xxx.xxxxxxxx.xx" />
And had forgotten the following line:
<allow-navigation href="http://xxx.xxxxxxxx.xx/*" />
After that everything went as expected. On iOS, however, that does not seem to be a problem. In the case of occurred exclusively on Android.
I hope it helps.
Upvotes: 0