Android Splashcreen crash in production


#1

I’m getting crash reports for the following error on Android:

java.lang.NullPointerException: 
  at org.apache.cordova.splashscreen.SplashScreen$4.run (SplashScreen.java:230)
  at android.app.Activity.runOnUiThread (Activity.java:6050)
  at org.apache.cordova.splashscreen.SplashScreen.removeSplashScreen (SplashScreen.java:220)
  at org.apache.cordova.splashscreen.SplashScreen.access$1000 (SplashScreen.java:50)
  at org.apache.cordova.splashscreen.SplashScreen$5$1.run (SplashScreen.java:337)
  at android.os.Handler.handleCallback (Handler.java:739)
  at android.os.Handler.dispatchMessage (Handler.java:95)
  at android.os.Looper.loop (Looper.java:148)
  at android.app.ActivityThread.main (ActivityThread.java:7331)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1230)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1120)

Here’s my ionic info:


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:

    ios-deploy : 1.9.2 
    Node       : v8.4.0
    npm        : 5.5.1 
    OS         : macOS High Sierra
    Xcode      : Xcode 9.0.1 Build version 9A1004 

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

#2

There is a newer version 6.4.0 available.

Do you have the newest cordova-plugin-splashscreen version installed?

In general you should report this at the Cordova issue tracker if there really is a problem with a Cordova plugin: issues.cordova.io


#3

These are my plugins

> cordova plugin ls
cordova-plugin-add-swift-support 1.7.0 "AddSwiftSupport"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-apprate 1.3.0 "AppRate"
cordova-plugin-device 1.1.6 "Device"
cordova-plugin-dialogs 1.3.4 "Notification"
cordova-plugin-globalization 1.0.8 "Globalization"
cordova-plugin-google-analytics 1.8.3 "Google Universal Analytics Plugin"
cordova-plugin-inappbrowser 1.7.1 "InAppBrowser"
cordova-plugin-ionic 2.0.3 "IonicCordova"
cordova-plugin-ionic-webview 1.1.16 "cordova-plugin-ionic-webview"
cordova-plugin-network-information 1.3.3 "Network Information"
cordova-plugin-screen-orientation 2.0.2 "Screen Orientation"
cordova-plugin-splashscreen 4.1.0 "Splashscreen"
cordova-plugin-statusbar 2.3.0 "StatusBar"
cordova-plugin-whitelist 1.3.2 "Whitelist"
cordova-plugin-x-socialsharing 5.2.1 "SocialSharing"
cordova-sqlite-storage 2.0.4 "Cordova sqlite storage plugin"
es6-promise-plugin 4.1.0 "Promise"
ionic-plugin-keyboard 2.2.1 "Keyboard"
onesignal-cordova-plugin 2.2.2 "OneSignal Push Notifications"