Onesignal plugin gets built but not working


I had the cordova onesignal plugin working great with my volt builds from 2019-2021, until this year, where it seems that it’s not working anymore (at least on Android, where I tested it).

Right now, I have this config on config.xml

<plugin name="onesignal-cordova-plugin" spec="3.0.0"/>

The plugin builds well. Log:

Discovered plugin “onesignal-cordova-plugin”. Adding it to the project
No scripts found for hook “before_plugin_add”.
Calling plugman.fetch on plugin “onesignal-cordova-plugin@3.0.0”
Copying plugin “/node_modules/onesignal-cordova-plugin” => “/plugins/onesignal-cordova-plugin”
Calling plugman.install on plugin “/plugins/onesignal-cordova-plugin” for platform "android
Installing “onesignal-cordova-plugin” for android
Finding scripts for “before_plugin_install” hook from plugin onesignal-cordova-plugin on android platform only.
No scripts found for hook “before_plugin_install”.
Install start for “onesignal-cordova-plugin” on android.
Beginning processing of action stack for android project…
Installing Android library: com.onesignal:OneSignal:4.4.2
Installing Android library: build-extras-onesignal.gradle
Action stack processing complete.
Updating build files since android plugin contained
Subproject Path: CordovaLib
Subproject Path: app
Install complete for onesignal-cordova-plugin on android.
Finding scripts for “after_plugin_install” hook from plugin onesignal-cordova-plugin on android platform only.
No scripts found for hook “after_plugin_install”.


  • copy platforms/android/platform_www/plugins/onesignal-cordova-plugin/www/InAppMessage.js platforms/android/app/src/main/assets/www/plugins/onesignal-cordova-plugin/www/InAppMessage.js (updated file)*
  • copy platforms/android/platform_www/plugins/onesignal-cordova-plugin/www/NotificationOpened.js platforms/android/app/src/main/assets/www/plugins/onesignal-cordova-plugin/www/NotificationOpened.js (updated file)*
  • copy platforms/android/platform_www/plugins/onesignal-cordova-plugin/www/NotificationReceived.js platforms/android/app/src/main/assets/www/plugins/onesignal-cordova-plugin/www/NotificationReceived.js (updated file)*
  • copy platforms/android/platform_www/plugins/onesignal-cordova-plugin/www/OneSignalPlugin.js platforms/android/app/src/main/assets/www/plugins/onesignal-cordova-plugin/www/OneSignalPlugin.js (updated file)*
  • copy platforms/android/platform_www/plugins/onesignal-cordova-plugin/www/Subscription.js platforms/android/app/src/main/assets/www/plugins/onesignal-cordova-plugin/www/Subscription.js (updated file)*

Everything seems to work (only alert I get is the device ready warning), however the Onesignal register isn’t triggered, app has no subscribers, and I’m clueless on what to do.

I’ve already changed versions, to no avail. Any pointers or ideas on someone who has recently built such an app recently with this plugin? Thanks a lot.

I’ll answer myself, I fixed it lowering the version to this in the config file.

<plugin name="onesignal-cordova-plugin" spec="2.10.1" source="npm"/>