Ionic 4 + angular 6 starters fail to run on real device

Hello, I’m trying to build a project using ionic 4 + angular 6 bu I can’t get it working so I’ve started from ‘the basics’ and even the ionic starters fail to run on real android device.

I’ve instaled the latest ionic cli and run

ionic start test tabs --type=angular
cd test
ionic serve

Ionic serve works (at least with the starter), but when when I try to run it on real device ionic cordova run android i only get a blank screen after the loading splash, and with chrome dev tools It seems that it fails to load every file (runtime.js, polyfill.js, cordova.js…)

My current ionic info

Ionic:
   ionic (Ionic CLI)          : 4.0.0-rc.9 (/usr/lib/node_modules/ionic)
   Ionic Framework            : @ionic/angular 4.0.0-alpha.7
   @angular-devkit/core       : 0.7.0-rc.0
   @angular-devkit/schematics : 0.7.0-rc.0
   @angular/cli               : 6.0.8
   @ionic/ng-toolkit          : 1.0.0-rc.9
   @ionic/schematics-angular  : 1.0.0-rc.9

Cordova:
   cordova (Cordova CLI) : 7.0.1
   Cordova Platforms     : android 6.2.3

System:
   Android SDK Tools : 26.1.1
   NodeJS            : v8.11.3 (/usr/bin/node)
   npm               : 5.6.0
   OS                : Linux 4.4

I don’t know what else to check, tried remove & add platform, delete node & plugins folders and install again, update @ionic-native packages to beta.13 (current starters use beta.12)

Any ideas? Any updated guides for ionic 4?

Thanks

1 Like

I believe that ionic-webkit needs to be updated. I encountered an issue with the iOS sim that sounds like the same issue you are having.

Thanks for your reply, I assume you mean wkwebview or the cordova-plugin-ionic-webview (which i’ve also updated to latest 1.2.1 version) but no luck. Same problem and blank screen on android device.

I know Ionic 4 is still a work in progress, but it’s very frustrating when you can’t get even a ‘hello world’, the starters are receiving updates but I still get same problem :frowning:

I thought that maybe I’m missing some global package or have some misconfiguration, so I’ve also tried with beevelop/ionic:rc docker image but I’ve got same result.

For v4 on iOS, cordova-plugin-ionic-webview beta version is a must I think. I could confirm I was able to run an Ionic v4 on iOS with it (I will publish a demo repo later today or tomorrow)

Android I didn’t tried unfortunately

Here you go, this Ionic v4 demo should work on iOS devices too according my tests: A Ionic demo app from v3 to v4

Thanks @reedrichards

I’ve tried updating cordova-plugin-ionic-webview in the starter project to 2.0.0-beta.2 and still get the blank page after the loading splash screen. (at least on android device, haven’t tested on ios yet)

But now I’ve tried your demo project and that one is working, so I’ll check for differences in package versions and see if I can find who’s the ‘guilty’ :stuck_out_tongue:

Also (in case it can help someone else) I’ve just found the updated ionic docs which I haven’t seen before, so I’ll take a look in case I’m missing some piece.

1 Like

Cool to hear my demo is working :wink:

I’m curious about the “why” your app doesn’t work on devices, I hope that by comparing you will find the problem, looking forward to hear about that

Sweet for the doc, didn’t knew it neither. I gonna add it to my README, cool :thumbsup: