Ionic Pro, Deploy: Unhandled Promise rejection: callback.success.apply is not a function

We’ve been running into this issue for a short while and we believe it’s causing the splashScreen.hide(); in the app.component to not run when a debug APK is built for android (and in any case it’s concerning and clogging up our console)

The error as it appears in our log is as follows

Error in Success callbackId: IonicDeploy103963325 : TypeError: callback.success.apply is not a function


[4:37] 
Unhandled Promise rejection: callback.success.apply is not a function ; Zone: <root> ; Task: Promise.then ; Value: TypeError: callback.success.apply is not a function
   at Object.callbackFromNative (cordova.js:293)
   at processMessage (cordova.js:1119)
   at processMessages (cordova.js:1142)
   at t.invoke (polyfills.js:3)
   at r.run (polyfills.js:3)
   at polyfills.js:3
   at t.invokeTask (polyfills.js:3)
   at r.runTask (polyfills.js:3)
   at o (polyfills.js:3)
   at <anonymous> TypeError: callback.success.apply is not a function
   at Object.callbackFromNative (file:///android_asset/www/cordova.js:293:58)
   at processMessage (file:///android_asset/www/cordova.js:1119:17)
   at processMessages (file:///android_asset/www/cordova.js:1142:9)
   at t.invoke (file:///android_asset/www/build/polyfills.js:3:14356)
   at r.run (file:///android_asset/www/build/polyfills.js:3:9523)
   at file:///android_asset/www/build/polyfills.js:3:19622
   at t.invokeTask (file:///android_asset/www/build/polyfills.js:3:15040)
   at r.runTask (file:///android_asset/www/build/polyfills.js:3:10214)
   at o (file:///android_asset/www/build/polyfills.js:3:7274)
   at <anonymous>

Our ionic info is as follows

cli packages: (/Users/JD/WebstormProjects/skatespot-showcase/node_modules)

@ionic/cli-utils  : 1.9.2
ionic (Ionic CLI) : 3.9.2

global packages:

Cordova CLI : 6.5.0 

local packages:

@ionic/app-scripts : 2.1.4
Cordova Platforms  : android 6.1.2 browser 4.1.0 ios 4.5.2
Ionic Framework    : ionic-angular 3.7.1

System:

Android SDK Tools : 25.2.5
Node              : v6.11.0
npm               : 5.4.2 
OS                : macOS Sierra
Xcode             : Xcode 8.3.2 Build version 8E2002
1 Like

All old and should be updated.

Ionic Deploy is part of Ionic Pro:

Ionic Pro is a hosted and closed source service, so there is not much we, the community, can help you with, sorry. Check these:

You can - and should - contact support at http://ionicframework.com/support#support

Hey.
we are seeing the same issue. did anyone managed to solve this?

Hi, Same problem here. Did you manage to fix this ?

Post your ionic info output and make sure that all of it are current versions. Otherwise the only response will be to update these.

So I downgraded from cordova-plugin-ionic from v2 to 1.1.9 and the exception went away. The issue appears to be in the cordova plugin, at some point it is calling the deploy init success callback incorrectly.

I’ll stick with 1.1.9 until I see a change deployed that indicates this is fixed.

You should report this here then:

Maybe also the changelog helps: https://github.com/ionic-team/cordova-plugin-ionic/blob/master/CHANGELOG.md#200