All my apps work fine in GenyMotion but are blank after the splash screen on Android Phone

After the splash screen, I’m just getting “emptiness”. That’s the only way I can describe it. It works fine in GenyMotion. Even a basic, pristine starter app doesn’t wok. The same apps loaded fine a month or two ago. Any thoughts on how to fix it or the best way to debug while running the device?

ionic 1.3.19
cordova 4.3.0
HTC Desire 510 (Android 4.4.2)

  • Are you using Crosswalk? If so, Can you check on Developer Tools if there is any error?
  • Could you do ìonic run android -lcs and share what is logged?

Hi. Ok. I just ran “ìonic run android -lcs” and below are the last few lines in my terminal. Again, I see the splash. Then just a blank black screen.

debug:

“BUILD SUCCESSFUL
Total time: 7 seconds
Built the following apk(s):
/www/starter/platforms/android/ant-build/MainActivity-debug.apk
Using apk: /www/starter/platforms/android/ant-build/MainActivity-debug.apk
Installing app on device…
Launching application…
LAUNCH SUCCESS
cordova process is exiting”

Uhm…

have you tried turning it off and on again? :stuck_out_tongue:

  • Check in platforms/android/assets/www and see if all the files are there.
  • Try removing the app from the phone. Run the app with and without livereload.
  • Unplug and plug your phone. Run the app with and without livereload…
  • As last resource use Crosswalk.

I have tried many times to check if I get any blank or black screen but nothing. I just updated ionic and the same result: it works.

ionic info

OS: Mac OS X Yosemite
Node Version: v0.12.0
Cordova CLI: 4.2.0
Ionic CLI Version: 1.3.19
Xcode version: Xcode 6.1.1 Build version 6A2008a
ios-sim version: 3.1.1
ios-deploy version: 1.4.0

I have tried turning everything off several times. No change.
I downgraded Cordova from 4.3 to 4.2. Removed then rebuilt the platform, and that at least got me back to the previous mysterious “Webpage not available” browser error I was getting. It looks like it’s trying to take me to the destination in the src value that is set in the platforms config.xml file here:

<content original-src=“index.html” src=“http://192.168.56.1:8101”/>

So, I manually changed that line to: <content src=“index.html”/>
Then re-ran it, and now we’re back to the same blank, black page. I double checked the config file, and the content tag that I’d changed magically changed itself back to what it was before I changed it.

I looked in the platforms/android/assets/www and there are a lot of goodies there. But I’m not sure what all should be there to say if it is or not. I did however notice that the default device and keyboard plugins are there, but console is not. Shouldn’t that be there too? Again this is a pristine starter app.

I’m completely confused now. I haven’t heard of Crosswalk but I guess I should look into that now.

Edited to make tag-friendly:

OS: Mac OS X Yosemite
Node Version: v0.12.0
Cordova CLI: 4.3.0
Ionic CLI Version: 1.3.19
Xcode version: 6.2 (6C131e)
ios-sim version: 3.1.1
ios-deploy version: 1.4.0

Remove everything in the index.html and just put a hello world. :stuck_out_tongue: Let’s see if that works.

And try to run

adb logcat

To see what happens when the app is launched.

The reason your config.xml is changing is because you are running with the device livereload flag -l which is configured to hit ionics livereload server in config.xml…

If you can run fine without livereload, but it doesn’t work WITH livereload, them chances are its a CORS issue.

Are you making any cross domain requests in your app, or any requests to hosts other than localhost?

Good news and bad news. I removed the -l flag, as per djett’s suggestion, and it worked great! So thanks for that tip. However there’s still the livereload issue. Running adb logcat, as per joseadrian’s suggestion, I noticed the following timeout error. I found a related fix in <preference name=“loadUrlTimeoutValue” value=“60000” /> but it didn’t fix it and the error remains.

djett, I’m just testing this with a fresh, untouched ionic starter app for now. So, it wouldn’t be a CORS issue, right?

I/ConfigService( 1435): onDestroy
I/ActivityManager( 1047): Waited long enough for: ServiceRecord{428e4230 u0 com.amazon.venezia/.notification.NotificationService}
I/ActivityManager( 1047): Waited long enough for: ServiceRecord{428db558 u0 com.amazon.mShop.android/com.amazon.venezia.notification.NotificationService}
E/CordovaWebView( 5979): CordovaWebView: TIMEOUT ERROR!

any news about this error with livereload?

LAUNCH SUCCESS
cordova process is exiting

I have the same problem even with the default starter project.

When I load an older project it still works fine, this means maybe it is a problem in the new cordova cli?

1 Like

Sadly, I could never get the live reload working. I back burnered that, as it’s not essential, but would definitely like to know for the future.

1 Like

Hey Dano2,

Did you get this working? I’m having the same problem here :frowning:

did you install the cordova-plugin-whitelist? maybe it’s necessary to access the external data while in livereload

Hello, Any update on this? I am having similar issue. Running app in emulator without livereload works fine.

Any update on this? I am also facing the same issue - livereload does not work in emulator and if I use livereload then I am not able to get data from external server.

4 years later, is this still supposed to be an issue? I’ve tried every permutation of the above suggestions and can’t get ‘ionic cordova run android --livereload’ work – it gives me a white screen after the splash screen on genymotion. I am almost certain it’s some sort of ip-address issue. I tried --address=0.0.0.0. --external, running genymotion in bridged mode, etc etc. Everything runs fine on live-reload mode with a physical device, even android’s regular emulator (although the latter is unusably slow).

I’m running version 3.0.4 of genymotion, on ubuntu 18.04. Ionic info below:

Ionic:

   Ionic CLI                     : 5.4.12 (/home/ganjanaut/npm/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.11.7
   @angular-devkit/build-angular : 0.801.3
   @angular-devkit/schematics    : 8.1.3
   @angular/cli                  : 8.1.3
   @ionic/angular-toolkit        : 2.1.1

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.1.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 4 other plugins)

Utility:

   cordova-res : not installed
   native-run  : 0.3.0

System:

   Android SDK Tools : 26.1.1 (/home/ganjanaut/Android/Sdk)
   NodeJS            : v10.18.0 (/usr/bin/node)
   npm               : 6.9.0
   OS                : Linux 4.15