ionic-team / ionic-v3

The repo for Ionic 3.x. For the latest version of Ionic, please see https://github.com/ionic-team/ionic
Other
127 stars 85 forks source link

Installed minified (--prod) APK but gets stuck on Splash screen, unable to load in Chrome Dev Tools #358

Open ionitron-bot[bot] opened 5 years ago

ionitron-bot[bot] commented 5 years ago

Original issue by @bengrah-miller on 2018-05-08T08:14:12Z

Ionic Info Run ionic info from a terminal/cmd prompt and paste the output below.

cli packages: (C:\Users\bengrah\AppData\Roaming\npm\node_modules)

    @ionic/cli-plugin-proxy : 1.5.8
    @ionic/cli-utils        : 1.19.2
    ionic (Ionic CLI)       : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.8
    Cordova Platforms  : none
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    Node              : v8.9.4
    npm               : 5.7.1
    OS                : Windows 10

Environment Variables:

    ANDROID_HOME     : C:\Android\android-sdk
    HTTP_PROXY       : http://webproxy.millerextra.com:8081
    http_proxy       : http://webproxy.millerextra.com:8081
    HTTPS_PROXY      : not set
    https_proxy      : not set
    IONIC_HTTP_PROXY : http://webproxy.millerextra.com:8081
    PROXY            : not set
    proxy            : not set

Misc:

    backend : pro

Describe the Bug I've built an apk file using the ionic cordova build android --prod --release command. I'm able to successfully install the APK on an Android 5.1.1 Samsung Galaxy Tab (Active). When I start the app up, the splash screen appears but nothing else happens. I'm able to install this same APK on other devices and I'm able to get past the splash screen as expected. One other oddity is that when trying to inspect the device via Chrome Dev Tools, I'm able to Inspect the device but the app code / sources / HTML doesn't load. Nothing happens. So I'm not able to see if there are any errors at this point.

Steps to Reproduce Steps to reproduce the behavior:

  1. Create a new prod release apk by running ionic cordova run android --prod --release in your Ionic project
  2. Sign the newly created APK
  3. Install the APK on a device
  4. Tap the app icon to start it up from the app drawer
  5. App should load the Splash screen at this point, but it never gets past this screen.

Related Code If you are able to illustrate the bug with an example, please provide a sample application via an online code collaborator such as StackBlitz, or GitHub.

Expected Behavior Upon starting up the app, the Splash screen should appear for 5 seconds before loading up the main screen.

Additional Context I have attempted to debug this via logcat but there isn't much useful here neither. What follows is a capture of what happens when I tap the app icon to start the app up, to the point where the logging output stops.

I/Timeline(11021): Timeline: Activity_launch_request id:com.mh.sma time:9551847 V/WindowManager( 1087): addAppToken: AppWindowToken{3c03bff5 token=Token{1935492c ActivityRecord{2174e8df u0 com.mh.sma/.MainActivity t60}}} to stack=1 task=60 at 0 V/WindowManager( 1087): Adding window Window{36b591c4 u0 d0 Starting com.mh.sma} at 4 of 13 (after Window{5d813e u0 d0 com.sec.android.app.launcher/com.android.launcher2.Launcher}) I/ActivityManager( 1087): Start proc 25863:com.mh.sma/u0a170 for activity com.mh.sma/.MainActivity D/ActivityManager( 1087): Launching com.mh.sma, updated priority D/StatusBarManagerService( 1087): manageDisableList userId=0 what=0x0 pkg=Window{36b591c4 u0 d0 Starting com.mh.sma} E/Vold ( 320): Failed to find mounted volume for /storage/extSdCard/Android/data/com.mh.sma/files/ W/ContextImpl(25863): Failed to ensure directory: /storage/extSdCard/Android/data/com.mh.sma/files E/Vold ( 320): Failed to find mounted volume for /storage/extSdCard/Android/data/com.mh.sma/cache/ W/ContextImpl(25863): Failed to ensure directory: /storage/extSdCard/Android/data/com.mh.sma/cache E/Vold ( 320): Failed to find mounted volume for /storage/extSdCard/Android/data/com.mh.sma/files/ W/ContextImpl(25863): Failed to ensure directory: /storage/extSdCard/Android/data/com.mh.sma/files E/Vold ( 320): Failed to find mounted volume for /storage/extSdCard/Android/data/com.mh.sma/cache/ W/ContextImpl(25863): Failed to ensure directory: /storage/extSdCard/Android/data/com.mh.sma/cache V/WindowManager( 1087): Adding window Window{1a3aed92 u0 d0 com.mh.sma/com.mh.sma.MainActivity} at 4 of 14 (before Window{36b591c4 u0 d0 Starting com.mh.sma}) D/StatusBarManagerService( 1087): manageDisableList userId=0 what=0x0 pkg=Window{1a3aed92 u0 d0 com.mh.sma/com.mh.sma.MainActivity} V/WindowManager( 1087): Adding window Window{3555b60 u0 d0 com.mh.sma/com.mh.sma.MainActivity} at 4 of 15 (before Window{1a3aed92 u0 d0 com.mh.sma/com.mh.sma.MainActivity}) I/Timeline( 1087): Timeline: Activity_windows_visible id: ActivityRecord{2174e8df u0 com.mh.sma/.MainActivity t60} time:9552746 D/StatusBarManagerService( 1087): manageDisableList userId=0 what=0x0 pkg=Window{1a3aed92 u0 d0 com.mh.sma/com.mh.sma.MainActivity} E/Vold ( 320): Failed to find mounted volume for /storage/extSdCard/Android/data/com.mh.sma/files/ W/ContextImpl(25863): Failed to ensure directory: /storage/extSdCard/Android/data/com.mh.sma/files E/Vold ( 320): Failed to find mounted volume for /storage/extSdCard/Android/data/com.mh.sma/files/ W/ContextImpl(25863): Failed to ensure directory: /storage/extSdCard/Android/data/com.mh.sma/files E/Vold ( 320): Failed to find mounted volume for /storage/extSdCard/Android/data/com.mh.sma/cache/ W/ContextImpl(25863): Failed to ensure directory: /storage/extSdCard/Android/data/com.mh.sma/cache

leolovesmile commented 5 years ago

Is there any workaround for this issue before it is fixed please?

nacho004 commented 5 years ago

I'm dealing with the same issue

nacho004 commented 5 years ago

I replaced --prod --release

for this: --minifycss --optimizejs --minifyjs --release

and works

Provoo commented 4 years ago

I replaced --prod --release

for this: --minifycss --optimizejs --minifyjs --release

and works

Thanks you saved my life