Deploying apk to device problems - white screen of death and slow upload

  1. When installing signed apk - white screen of death.
  2. When installing regularly apk with debug - slow start of app.

2.WIth this definition running on the device -

 {
            "name": "Run Android on device",
            "type": "cordova",
            "request": "launch",
            "platform": "android",
            "target": "device",
            "port": 9222,
            "sourceMaps": true,
            "cwd": "${workspaceRoot}",
            "ionicLiveReload": false,
            "devServerTimeout": 120000
        },

Slow upload but running on the device.
Meaning all the port forwarding is working.
How can I speed up the start?

  1. What i have done :

signed as described here - How to automatically sign android applications with the Ionic CLI

ionic cordova build android --prod --release --info --stacktrace --debug

building me a signed apk of 4mb.great. small.

I moved it manually to the device and installed , after removing the previous apk. Otherwise won;t install.

It is installed, stares and only shows white screen.
How can I see why , debug ,verbose?

Doesn’t show activity in chrome://inspect/#devices

My package.json

{
  "name": "",
  "version": "0.0.1",
  "author": "",
  "homepage": "",
  "private": true,
  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/common": "4.1.3",
    "@angular/compiler": "4.1.3",
    "@angular/compiler-cli": "4.1.3",
    "@angular/core": "4.1.3",
    "@angular/forms": "4.1.3",
    "@angular/http": "4.1.3",
    "@angular/platform-browser": "4.1.3",
    "@angular/platform-browser-dynamic": "4.1.3",
    "@ionic-native/camera": "^4.3.2",
    "@ionic-native/core": "4.3.2",
    "@ionic-native/device": "^4.0.0",
    "@ionic-native/diagnostic": "^4.3.2",
    "@ionic-native/geolocation": "^4.3.3",
    "@ionic-native/google-maps": "3.12.1",
    "@ionic-native/in-app-browser": "^4.3.2",
    "@ionic-native/native-storage": "^4.0.0",
    "@ionic-native/network": "^4.2.1",
    "@ionic-native/splash-screen": "4.3.2",
    "@ionic-native/status-bar": "4.3.2",
    "@ionic/cloud-angular": "^0.12.0",
    "@ionic/storage": "2.0.1",
    "@ngx-translate/core": "6.0.1",
    "@ngx-translate/http-loader": "0.0.3",
    "@types/google-maps": "^3.2.0",
    "chart.js": "^2.7.1",
    "copyfiles": "^1.2.0",
    "cordova-android": "^6.4.0",
    "cordova-browser": "^4.1.0",
    "cordova-plugin-compat": "^1.1.0",
    "cordova-plugin-console": "^1.0.5",
    "cordova-plugin-device": "^1.1.4",
    "cordova-plugin-facebook4": "^1.9.1",
    "cordova-plugin-geolocation": "^2.4.3",
    "cordova-plugin-googlemaps": "^2.1.1",
    "cordova-plugin-inappbrowser": "^1.7.1",
    "cordova-plugin-nativestorage": "^2.2.2",
    "cordova-plugin-network-information": "^1.3.3",
    "cordova-plugin-splashscreen": "^4.1.0",
    "cordova-plugin-statusbar": "^2.2.2",
    "cordova-plugin-whitelist": "^1.3.2",
    "cordova-windows": "^5.0.0",
    "cordova.plugins.diagnostic": "^3.7.1",
    "font-awesome": "^4.7.0",
    "ionic-angular": "3.4.2",
    "ionic-native": "^2.9.0",
    "ionic-plugin-keyboard": "^2.2.1",
    "ionicons": "3.0.0",
    "node-sass": "4.3.0",
    "rxjs": "5.4.0",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.12"
  },
  "devDependencies": {
    "@ionic/app-scripts": "^3.1.2",
    "@types/googlemaps": "^3.26.20",
    "ionic": "3.19.0",
    "typescript": "2.3.3"
  },
  "description": "",
  "cordova": {
    "plugins": {
      "cordova-plugin-console": {},
      "cordova-plugin-device": {},
      "cordova-plugin-statusbar": {},
      "ionic-plugin-keyboard": {},
      "cordova-plugin-facebook4": {
        "APP_ID": "",
        "APP_NAME": ""
      },
      "cordova-plugin-nativestorage": {},
      "cordova-plugin-inappbrowser": {},
      "cordova-plugin-geolocation": {
        "GEOLOCATION_USAGE_DESCRIPTION": "..."
      },
      "cordova-plugin-network-information": {},
      "cordova-plugin-whitelist": {},
      "cordova.plugins.diagnostic": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-googlemaps": {
        "API_KEY_FOR_ANDROID": "",
        "API_KEY_FOR_IOS": ""
      }
    },
    "platforms": [
      "browser"
    ]
  },
  "config": {
    "ionic_bundler": "webpack",
    "ionic_source_map": "source-map",
    "ionic_copy": "./scripts/copy-custom-libs.js"
  }
}

my config.xml

<?xml version='1.0' encoding='utf-8'?>
<widget id="com...." version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>...</name>
    <description>...</description>
    <author email="..." href="...">...</author>
    <content src="index.html" />
    <access origin="*" />
    <access launch-external="yes" origin="tel:*" />
    <allow-navigation href="*" />
    <allow-navigation href="http://*/*" />
    <allow-navigation href="https://*/*" />
    <allow-navigation href="data:*" />
    <allow-intent href="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <preference name="webviewbounce" value="false" />
    <preference name="UIWebViewBounce" value="false" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="android-minSdkVersion" value="16" />
    <preference name="BackupWebStorage" value="none" />
    <preference name="SplashMaintainAspectRatio" value="true" />
    <preference name="FadeSplashScreenDuration" value="1000" />
    <preference name="SplashShowOnlyFirstTime" value="false" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="1000" />
    <preference name="loadUrlTimeoutValue" value="90000" />
    <hook src="hooks/copy-fonts.js" type="after_prepare" />
    <platform name="android">
        <preference name="ShowSplashScreenSpinner" value="true" />
        <allow-intent href="market:*" />
        <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
        <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
        <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
        <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
        <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
        <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
        <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
        <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
        <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
        <splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
        <splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
        <splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
        <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
        <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
        <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
        <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
        <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
        <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <icon height="57" src="resources/ios/icon/icon.png" width="57" />
        <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
        <icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
        <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
        <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
        <icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
        <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
        <icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
        <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
        <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
        <icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
        <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
        <icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
        <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
        <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
        <icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
        <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
        <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
        <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
        <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
        <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
        <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
        <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
        <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
        <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
        <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
        <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
        <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
        <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
        <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
    </platform>
    <allow-navigation href=".." />
    <allow-navigation href="..." />
    <engine name="browser" spec="^4.1.0" />
    <plugin name="cordova-plugin-console" spec="^1.0.5" />
    <plugin name="cordova-plugin-device" spec="^1.1.4" />
    <plugin name="cordova-plugin-statusbar" spec="^2.2.2" />
    <plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
    <plugin name="cordova-plugin-facebook4" spec="^1.9.1">
        <variable name="APP_ID" value="" />
        <variable name="APP_NAME" value="" />
    </plugin>
    <plugin name="cordova-plugin-nativestorage" spec="^2.2.2" />
    <plugin name="cordova-plugin-inappbrowser" spec="^1.7.1" />
    <plugin name="cordova-plugin-geolocation" spec="^2.4.3">
        <variable name="GEOLOCATION_USAGE_DESCRIPTION" value="" />
    </plugin>
    <plugin name="cordova-plugin-network-information" spec="^1.3.3" />
    <plugin name="cordova-plugin-whitelist" spec="^1.3.2" />
    <plugin name="cordova.plugins.diagnostic" spec="^3.7.1" />
    <plugin name="cordova-plugin-splashscreen" spec="^4.1.0" />
    <plugin name="cordova-plugin-googlemaps" spec="^2.1.1">
        <variable name="API_KEY_FOR_ANDROID" value="" />
        <variable name="API_KEY_FOR_IOS" value="" />
    </plugin>
</widget>
cli packages: (C:\Users\2bher\WebstormProjects\ionic3-angular4_2\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.2.3 browser 4.1.0 windows 5.0.0
    Ionic Framework    : ionic-angular 3.4.2

System:

    Android SDK Tools : 26.1.1
    Node              : v6.11.4
    npm               : 3.10.10
    OS                : Windows 10

Environment Variables:

    ANDROID_HOME : C:\Users\2bher\AppData\Local\Android\sdk

Misc:

    backend : pro

well now it stack in every environment…
so nerve wrecking…

your ionic dependencies looks inconsistence with core

1 Like

what do you mean? can you give an example you reffer to ?

mmhow should i solve it?

what i have done to solve it was to inspect through the chrome://inspect at device go to index.html and see the mistakes at the console of dev tools.
image

had an error about diagnostic
just removed it . don’t need it for now.

still have speed issue but at least not white death.

That’s what left installed.

PS C:\Users\2bher\WebstormProjects\ionic3-angular4_2> ionic cordova plugin list
√ Creating .\www directory for you - done!
> cordova plugin ls
cordova-plugin-add-swift-support 1.7.0 "AddSwiftSupport"
cordova-plugin-camera 3.0.1-dev "Camera"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-console 1.0.5 "Console"
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-facebook4 1.9.1 "Facebook Connect"
cordova-plugin-geolocation 2.4.3 "Geolocation"
cordova-plugin-googlemaps 2.1.1 "cordova-plugin-googlemaps"
cordova-plugin-ionic 2.0.3 "IonicCordova"
cordova-plugin-splashscreen 4.1.0 "Splashscreen"
cordova-plugin-statusbar 2.2.2 "StatusBar"
cordova-plugin-whitelist 1.3.2 "Whitelist"
ionic-plugin-keyboard 2.2.1 "Keyboard"

Don’t know what else I can remove to speed up.

@ionic-native/device": “^4.0.0”, “@ionic-native/native-storage”: “^4.0.0”,
, “@ionic-native/google-maps”: “3.12.1”,
and few others are quite older compare to core version