TruckMovers / cordova-plugin-remote-injection

DEPRECATED: Cordova plugin to allow a remote site to interact with cordova's javascript APIs when loaded within a cordova app.
Apache License 2.0
91 stars 95 forks source link

deviceready has not fired after 5 seconds. #10

Closed shman2000 closed 8 years ago

shman2000 commented 8 years ago

I'm having those erros:

deviceready has not fired after 5 seconds. Channel not fired: onCordovaConnectionReady Channel not fired: onFileSystemPathsReady

than when I try to use navigator.camera it doesn't turn on camera at all.

Also, let's say there is page loaded later on with inappbrowser, is there a way to inject cordova.js into that page as well?

bradleyjames commented 8 years ago

It's been a while since I've had to debug issues so I'm going to be rusty.

IIRC this would happen if there was a JS error either during loading of plugins or in the JS specified in CRIInjectFirstFiles. To track it down I'd start with a new project, see if the JS injected, and then introduce the other plugins one by one.

Also, let's say there is page loaded later on with inappbrowser, is there a way to inject cordova.js into that page as well?

I don't believe so. I haven't tried but by design the inappbrowser it doesn't have access to Cordova APIs.

From the inappbrowser doc:

The InAppBrowser window behaves like a standard web browser, and can't access Cordova APIs. For this reason, the InAppBrowser is recommended if you need to load third-party (untrusted) content, instead of loading that into the main Cordova webview.

bradleyjames commented 8 years ago

Resolving for now. If you have more to follow up feel free to reopen.