cordova-plugin-ionic-webview icon indicating copy to clipboard operation
cordova-plugin-ionic-webview copied to clipboard

[Android] deviceready has not fired after 5 seconds.

Open ptorrent opened this issue 3 years ago • 7 comments

Hi there,

I'm using phonegap, When I start the app with "cordova-pluign-ionic-webview", i got this error:

deviceready has not fired after 5 seconds.

Step to reproduce:

  1. Create a new Cordova project
  2. cordova plugin add cordova-plugin-ionic-webview@latest

I start the app. All files are loaded (I guess that means that the plugin works ?) but device ready is not firing..

D/SystemWebChromeClient: http://localhost/cordova.js: Line 1233 : deviceready has not fired after 5 seconds. I/chromium: [INFO:CONSOLE(1233)] "deviceready has not fired after 5 seconds.", source: http://localhost/cordova.js (1233) D/SystemWebChromeClient: http://localhost/cordova.js: Line 1226 : Channel not fired: onCordovaInfoReady I/chromium: [INFO:CONSOLE(1226)] "Channel not fired: onCordovaInfoReady", source: http://localhost/cordova.js (1226) D/SystemWebChromeClient: http://localhost/cordova.js: Line 1226 : Channel not fired: onFileSystemPathsReady I/chromium: [INFO:CONSOLE(1226)] "Channel not fired: onFileSystemPathsReady", source: http://localhost/cordova.js (1226) D/SystemWebChromeClient: http://localhost/cordova.js: Line 1226 : Channel not fired: onCordovaConnectionReady I/chromium: [INFO:CONSOLE(1226)] "Channel not fired: onCordovaConnectionReady", source: http://localhost/cordova.js (1226)

I've this error in the console (maybe the cause ?) : E/CordovaBridge: gap_init called from restricted origin: http://localhost/

If I remove the plugin, everything works well. Any ideas ?

Thanks for your support !

ptorrent avatar Jul 24 '20 07:07 ptorrent

I have the same question。

fishOfLake avatar Oct 08 '20 15:10 fishOfLake

+1

bbialas avatar Dec 17 '20 08:12 bbialas

+1. Anybody have any ideas on this or find a resolution?

MMRandy avatar Jan 14 '21 14:01 MMRandy

I had the same problem today. Make sure you whitelisted ur hostname and i think sheme as well. So if u defined it like this:

<preference name="Scheme" value="app" />
<preference name="Hostname" value="localhost" />

Also set

<allow-navigation href="http://app/*"/>
<allow-navigation href="https://app/*"/>
<allow-navigation href="http://localhost/*"/>
<allow-navigation href="https://localhost/*"/>

judevian avatar Feb 02 '21 00:02 judevian

@judevian's suggestion works for me!

kartneb avatar Sep 03 '21 13:09 kartneb

I am getting the same issue and none of the solutions above work. Makes this plugin completely un-usable

traianrusu1 avatar Oct 21 '21 21:10 traianrusu1

Update your cordova-android.

I fixed this when updated to cordova android 10.1.0 cordova platform remove android cordova platform add [email protected]

tomek-em avatar Nov 09 '21 14:11 tomek-em