Blank page when trying Ionic V4


ionic (Ionic CLI) : 4.0.1
Ionic Framework : @ionic/angular 4.0.0-beta.0
@angular-devkit/core : 0.7.0-rc.3
@angular-devkit/schematics : 0.7.0-rc.3
@angular/cli : 6.0.8
@ionic/ng-toolkit : 1.0.0
@ionic/schematics-angular : 1.0.1


cordova (Cordova CLI) : 7.1.0
Cordova Platforms : android 6.3.0


Android SDK Tools : 25.2.5
NodeJS : v8.11.3
npm : 5.10.0
OS : macOS High Sierra
Xcode : Xcode 9.4.1 Build version 9F2000


ionic serve…
works fine.

ionic cordova run android…
build without no errors…

But only a blank page on screen.

Using devtools to track, find following:

Navigated to file:///android_asset/www/index.html
index.html:9 The key “viewport-fit” is not recognized and ignored.
index.html:22 GET file:///runtime.js net::ERR_FILE_NOT_FOUND
index.html:22 GET file:///polyfills.js net::ERR_FILE_NOT_FOUND
index.html:22 GET file:///styles.js net::ERR_FILE_NOT_FOUND
index.html:22 GET file:///cordova.js net::ERR_FILE_NOT_FOUND
index.html:22 GET file:///vendor.js net::ERR_FILE_NOT_FOUND
index.html:22 GET file:///main.js net::ERR_FILE_NOT_FOUND
/assets/icon/favicon.png:1 GET file:///assets/icon/favicon.png net::ERR_FILE_NOT_FOUND

Found a <base href="/" /> in the index.html, which seems to guide the relative url can’t be resolved.

Next test:

ionic cordova run android -l

Still a blank page there, but this time the devtools errors changed as:

The key “viewport-fit” is not recognized and ignored.
vendor.js:65004 Uncaught SyntaxError: Unexpected token function

only Android?

if yes, it has been reported

1 Like

Yep, I only test android 6 and 7, all failed to work.

Found the solution:

  • cordova-android must be >6.4.0, yours is 6.3.0(just like mine was)
  • ionic webview must be >2.0.0.beta.2

cordova 6.4.0 works.


I have


ionic (Ionic CLI) : 4.1.0 (C:\testionic4\node_modules\ionic)
Ionic Framework : @ionic/angular 4.0.0-beta.3
@angular-devkit/core : 0.7.4
@angular-devkit/schematics : 0.7.4
@angular/cli : 6.1.4
@ionic/ng-toolkit : 1.0.6
@ionic/schematics-angular : 1.0.5


cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.2, cordova-plugin-ionic-webview 2.0.3, (and 3 other plugins)


NodeJS : v8.11.4 (C:\Program Files\nodejs\node.exe)
npm : 5.6.0
OS : Windows 10

In my package.json the ionic webview is “^2.0.3”
In browser work fine, but when deploy in Android show blank page and show the following error:

The key “viewport-fit” is not recognized and ignored
Could not find cordova.js script tag. Plugin loading may fail.
Uncaught SyntaxError: Use of const in strict mode.

I have tried to see solutions but it does not work.
Could you please help me?

Thank you.

i have

  • cordova-android@7.1.1
  • cordova-plugin-ionic-webview@2.1.0

the problem is still there on Android 6, Andoird 7.0.0 devices

Can you solve it? I have cordova-android@7.1.1 but not cordova-plugin-ionic-webview.

Just update android webview in playstore

Just update android webview in playstore