Platform ready and native plugins

I am using Ionic 3. Most of the native plugins do not work, I get ‘plugin not installed’ when i run on a test device. If i wrap it in ‘platform.ready’, the platform is never ready. For example, FCM, unique-device-id, one-signal, and just about every other native plugin I have tried. Looks like I will have to give up on Ionic and go to React-Native. Has anybody gotten this to work?

Hey…

Maybe you have to share more infos, before someone can help you.

if you say mostly relative things like:

Most of the native plugins do not work

then maybe you have a general environment problem.

maybe you can provide some more information like:

$ ionic info

The Ionic CLI provides you a lot of commands to manage your plugIns and checking the health of your ionic-project. Did you try it?

regards,
Oliver

~/projects/test1$ ionic info

cli packages: (/home/eliot/projects/test1/node_modules)

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

@ionic/app-scripts : 2.1.4
Cordova Platforms  : android 6.3.0
Ionic Framework    : ionic-angular 3.6.1

System:

Android SDK Tools : 26.1.1
Node              : v8.5.0
npm               : 2.15.12
OS                : Linux 4.4

Environment Variables:

ANDROID_HOME : /home/eliot/Android/Sdk

Misc:

backend : pro

Your npm is really really old. I’d upgrade that as first priority.

At some points your config looks older than mine

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

@ionic/app-scripts : 3.1.2
Cordova Platforms  : android 6.3.0 ios 4.5.4
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 26.1.1
ios-deploy        : 1.9.2
Node              : v8.9.1
npm               : 5.6.0
OS                : macOS High Sierra
Xcode             : Xcode 9.2 Build version 9C40b

Environment Variables:

ANDROID_HOME : /Users/oliver/Library/Android/sdk

Misc:

backend : pro

Please update first your environment and then try to remove your plugIns complete with Ionic CLI and install it again

is this issue resolved ? I have been facing the same issue and platform is never ready on android device.
After creating empty app i just added native plugin for contacts. I follow the same steps as mentioned on ionic form.
On DevApp i saw below Logs.
I reinstalled the all plugins, remove/add platform but still it is not working.

I am using MI mobile for testing which is on Angular version 6.0.1.

i think there is some issue with configuration but i am not sure what!!
Can you please help me? I have been trying from last 3 days. :frowning:


Logs

deviceready has not fired after 5 seconds.
Channel not fired: onDOMContentLoaded
Angular is running in the development mode. Call enableProdMode() to enable the production mode.
Ionic Native: deviceready did not fire within 5000ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.

ionic info

cli packages:

@ionic/cli-utils  : 1.19.1
ionic (Ionic CLI) : 3.19.1

global packages:

cordova (Cordova CLI) : 8.0.0

local packages:

@ionic/app-scripts : 3.1.8
Cordova Platforms  : android 7.0.0
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 26.0.2
Node              : v6.9.4
npm               : 3.10.10
OS                : Windows 10

Environment Variables:

ANDROID_HOME : C:\Users\anujdixi\AppData\Local\Android\sdk

Misc:

backend : legacy

ionic cordova platform add android
cordova platform add android --save
Using cordova-fetch for cordova-android@~7.0.0

Adding android project…
Creating Cordova project for the Android platform:

    Path: platforms\android
    Package: io.ionic.starter
    Name: contacts
    Activity: MainActivity
    Android target: android-26

From Config.xml







No, I never made any progress, never got it to work. I updated everything, made no difference.

I see this error while running on Simulator like DevApp. but when i deploy my app on Mobile (android) it is working fine. Although plugin is taking time(1-2 min) to come up but it is working.
I am testing Native cordova contacts plugin.

command which i use ; ionic cordova run android --prod