3
votes

I'm starting to get in desperation mode, I've updated my Ionic CLI and now I can't test my project. It just hangs on the splash screen. It doesn't throw any errors, just hangs.

Has anybody experienced something like this before?

Ionic:

Ionic CLI : 5.0.2 (/Users/wd/.nvm/versions/node/v8.14.0/lib/node_modules/ionic) Ionic Framework : @ionic/angular 4.1.0 @angular-devkit/build-angular : 0.13.8 @angular-devkit/schematics : 7.2.4 @angular/cli : 7.3.8 @ionic/angular-toolkit : 1.4.1

Cordova:

Cordova CLI : 8.1.2 ([email protected]) Cordova Platforms : android 7.1.4, browser 5.0.4, ios 4.5.5 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 5 other plugins)

Utility:

cordova-res : 0.3.0 native-run : 0.2.4

System:

ios-deploy : 1.9.4 ios-sim : 8.0.1 NodeJS : v8.14.0 (/Users/wd/.nvm/versions/node/v8.14.0/bin/node) npm : 6.9.0 OS : macOS Mojave Xcode : Xcode 10.2.1 Build version 10E1001

3

3 Answers

0
votes

Have you tried remote debugging?

Connect your phone via usb then use:

ionic cordova run android

Wait for it to load up then open up your Chrome browser and go to:

chrome://inspect/#devices

Find the device in the list, click inspect and you can see if anything is output to the console.log.

Have you done the correct update process?

If that doesn't help, please also double check you followed the correct update process. It's not just the stardard one to go from v4 to v5:

https://github.com/ionic-team/ionic-cli/blob/develop/packages/ionic/CHANGELOG.md#lollipop-upgrading-from-cli-4

They say:

Upgrading from CLI 4 Make sure you have NodeJS 8+ installed. We recommend the latest LTS version.

Install the cordova-res and native-run utilities.

npm i -g cordova-res native-run

For Angular projects, make sure you have the latest @ionic/angular-toolkit installed.

npm i @ionic/angular-toolkit@latest
0
votes

I also had a similar issue, not with cordova though, but capacitor.

What happened to be the actual issue is that since ionic-cli v5+, the live reload server is always hosted on localhost by default. And not the external url. Somehow there was a problem with the app getting linked to this external url.

Anyways, try running your cordova app using the following command

ionic cordova run android --livereload --address=0.0.0.0

This will spin up the server like it used to previously, both on the localhost as well as the external url, and link it to your live deploy as well.

See this update documentation for more info https://ionicframework.com/docs/cli/commands/cordova-run

0
votes

I had a similar problem after updating the cordova-plugin-ionic-webview plugin. The app was stuck on splash screen without any error.

For me the solution was to update all the @ionic-native/... packages:

ex: npm i @ionic-native/firebase@latest --save

ionic info:

Ionic:

Ionic CLI : 5.2.1 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.6 @ionic/app-scripts : 3.2.3

Capacitor:

Capacitor CLI : 1.0.0 @capacitor/core : 1.0.0

Cordova:

Cordova CLI : 9.0.0 ([email protected]) Cordova Platforms : ios 5.0.1 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 10 other plugins)

Utility:

cordova-res : not installed native-run : 0.2.7

System:

ios-deploy : 1.9.4 ios-sim : 8.0.1 NodeJS : v10.16.0 (/usr/local/bin/node) npm : 6.9.0 OS : macOS Mojave Xcode : Xcode 10.2 Build version 10E125