In Ionic tried calling OneSignal.startInit, but the OneSignal plugin is not installed

Thanks for reply, but i have tried this one

And what was the result?

Are you testing on iOS or Android?
Did you try removing the platform ad re-add it again?

i’m testing on both, many times i uninstalled platform and added platform, its giving an error
EXCEPTION: plugin_not_installed

I’m getting the same error after build for iOS. I build, then install on my test iPad and the console reports:

Native: tried calling OneSignal.startInit, but the OneSignal plugin is not installed.
Install the OneSignal plugin: 'ionic plugin add onesignal-cordova-plugin'
TypeError: this.oneSignal.startInit('APPIDSANITIZED', 'GOOGLEPROJECTSANITIZED').endInit is not a function. (In 'this.oneSignal.startInit('APPIDSANITIZED', 'GOOGLEPROJECTSANITIZED').endInit()', 'this.oneSignal.startInit('APPIDSANITIZED', 'GOOGLEPROJECTSANITIZED').endInit' is undefined) — main.js:82860

(I pulled out my app ID and project number for security…)

Here’s ionic info:

global packages:

    @ionic/cli-plugin-proxy : 1.3.0
    @ionic/cli-utils        : 1.3.0
    Cordova CLI             : 7.0.1
    Ionic CLI               : 3.3.0

local packages:

    @ionic/app-scripts              : 1.3.7
    @ionic/cli-plugin-cordova       : 1.3.0
    @ionic/cli-plugin-ionic-angular : 1.3.0
    Cordova Platforms               : android 6.2.3 ios 4.4.0
    Ionic Framework                 : ionic-angular 3.3.0

System:

    Node       : v6.10.0
    OS         : macOS Sierra
    Xcode      : Xcode 8.3.2 Build version 8E2002
    ios-deploy : 1.9.1
    ios-sim    : 5.0.13

The plugin works great on an Android build of the same project; device gets registered and I can receive push notifications.

I’ve uninstalled and reinstalled the plugin several times and removed/re-added the iOS platform to my project. All the plugin files are there, and like I mentioned, it builds fine for Android; not sure what to check for why iOS is reporting the plugin isn’t installed.

@ionic/app-scripts”: “^1.3.7”,
"@ionic/cli-plugin-cordova": “1.0.0-rc.2”,
"@ionic/cli-plugin-ionic-angular": “1.0.0-rc.2”,
“typescript”: “2.0.9”

please update typscript.

Thanks.

Done.

npm install -g typescript
/usr/local/bin/tsc -> /usr/local/lib/node_modules/typescript/bin/tsc
/usr/local/bin/tsserver -> /usr/local/lib/node_modules/typescript/bin/tsserver
/usr/local/lib
└── typescript@2.3.4

Removed and added iOS platform back to project, ran clean build, same result.

Native: tried calling OneSignal.startInit, but the OneSignal plugin is not installed.

please remove platform, update @ionic/app-scripts, add platform and install your onesignal inside platform also

I have the same issue and I am on the latest app scripts - 1.3.7. Removing and adding the platform back did not solve the problem. Anybody managed to find a solution?

if using phonegap, is your plugin formatted like this in your project’s config.xml?
<gap:plugin name="onesignal-cordova-plugin" spec="^2.1.1" source="npm" />

You have to have an apple developer account and an APNS Certificate through the Apple Dev Portal to use any plugins that access notifications (I think)

Did you find out how to solve this issue?

Hey i am facing same error!!! Did you find out solution of this problem??

Thanks in advance

HI, have you solved the issue? I’m facing same. Please kindly help me…

Try to use these versions:
npm i onesignal-cordova-plugin@2.11.3
npm i @ionic-native/onesignal@5.31.1

10 Likes

Thanks @MatheusEli, this worked!

Hi i am facing the same issue,Any help would be appreciated

@awaisdev install the versions in @MatheusEli 's post, for me worked

I was having the same problem. Using the versions MatheusEli suggested solved it.

If this isn’t working for you, try to do cordova plugin ls & make sure it shows the correct oneSignal plugin version. Mine wasn’t, so i had to remove the old version then install the new one.

Thanks @MatheusEli , this worked for me also.

1 Like