Reputation: 197
When running my Ionic 3
application on my Android (6.0.1) device, the app is stuck on Cordova
splash screen, although I can use it through Chrome WebView (and it works just fine).
To make it even weirder the problem does not appear the first time I run the app after installing it, only after I close it and run it again (back button or swipe from task list).
Of course there is no error in the Chrome WebView
console. I also tried to run:
navigator.splashscreen.hide();
in the console it does not work.
Digging more
What I realized also is that any preference I set in config.xml
regarding the splash screen is ignored when the problem happens.
For example on first run:
<preference name="ShowSplashScreenSpinner" value="false" />
does work properly, there is no spinner and the splash screen hides after some time. If I run:
navigator.splashscreen.show();
in the console the splash screen shows again, and .hide()
does hide it.
On subsequent runs the spinner shows regardless of the preference. Also even weirder:
navigator.splashscreen.show();
does show the splash screen without spinner (on top of the existing one I guess), and .hide()
goes back to the splash screen with spinner.
What I tried so far without success:
npm install -g cordova@latest
npm install -g ionic@latest
npm install
againcordova platform rm android && cordova platform add android
npm install
againCordova
and package.json
(and removed node_modules & platform folders), but the splash screen of death still shows!Here is my environment:
cli packages:
@ionic/cli-utils : 1.13.1
ionic (Ionic CLI) : 3.13.2
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.0.0
Cordova Platforms : none
Ionic Framework : ionic-angular 3.7.1
System:
Android SDK Tools : 26.1.1
Node : v7.2.0
npm : 5.5.1
OS : Windows 10
And my package.json and config.xml if it helps.
Any ideas?
Upvotes: 1
Views: 831
Reputation: 197
After starting from a new project, copying my src/
folder, carefully installing all plugins and testing the app I found out that the issue was caused by Ionic Pro
plugin.
The following fixed it:
ionic cordova plugin rm cordova-plugin-ionic --save
Upvotes: 1