Error with Ionic 4 running on android, shows blank page

Hello
I’m trying to see a simple example of ionic 4 on my android cell phone.
On the screen emulating the server in the browser works fine, but on the cell phone it shows the blank page and gives two errors

The key “viewport-fit” is not recognized and ignored.
Uncaught SyntaxError: Use of const in strict mode.

My ionic info is
Ionic:

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 (Cordova CLI) : not installed
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)

System:

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

What could be the problem?

Thank you.

1 Like

I have the same :

The key "viewport-fit" is not recognized and ignored.
Uncaught SyntaxError: Unexpected token function

Ionic:

ionic (Ionic CLI) : 4.1.2 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.0.0-beta.7
@angular-devkit/core : 0.7.5
@angular-devkit/schematics : 0.7.5
@angular/cli : 6.1.5
@ionic/ng-toolkit : 1.0.8
@ionic/schematics-angular : 1.0.6

Cordova:

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.1.3, (and 4 other plugins)

System:

Android SDK Tools : 26.1.1 (/Users/gregory/Library/Android/sdk/)
ios-deploy : 1.8.6
NodeJS : v8.12.0 (/usr/local/bin/node)
npm : 6.4.1
OS : macOS Sierra

On android emulator :
I solved my problem (or more found a workaround) by updating emulator Android Target to 7.1.1.
So by updating in Android Studio, into Android Virtual Device Manager the target from 7.0.0 to 7.1.1 (API 25)
It seems that ionic 4 beta is not compatible with lower version…
I found this here & it works for me :
https://github.com/ionic-team/ionic/issues/15426

The blank default template is working now. (no blank screen anymore)

1 Like