Ionic-framework: [Ionic v4-beta.3] Ionic v4 won't work with older Android System WebViews

Created on 17 Aug 2018  路  5Comments  路  Source: ionic-team/ionic-framework

Bug Report

Ionic Info

Ionic:

   ionic (Ionic CLI)          : 4.1.0 (/usr/lib/node_modules/ionic)
   Ionic Framework            : @ionic/angular 4.0.0-beta.3
   @angular-devkit/core       : 0.7.3
   @angular-devkit/schematics : 0.7.3
   @angular/cli               : 6.1.3
   @ionic/ng-toolkit          : 1.0.6
   @ionic/schematics-angular  : 1.0.4

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

System:

   Android SDK Tools : 26.0.1
   NodeJS            : v10.8.0 (/usr/bin/node)
   npm               : 6.3.0
   OS                : Linux 4.4

Environment:

   ANDROID_HOME : /opt/android

Describe the Bug
Ionic v4 won't work with older Android System WebViews.

Additional Context

We are currently testing and developing with Ionic v4 on devices with older web views.

One of them is a Android N (7.1.2) device without any Google Mobile Services (GMS). So we have to use the standard Android System WebView (version 52.0.2743.100). When running the _Ionic Blank Starter_ build with _Cordova_ we are getting following result:

Uncaught SyntaxError: Unexpected token function vendor.js:65052

image

Unfortunately the manufacturer of the device says we can't upgrade to more recent version.

The other device is an Android L (5.1.1) which is also shipped without GMS. Here we have an Android System WebView version of 55.0.2883.91 with following result:

image

The app is successfully loaded, but the icon in the button on the top right is not shown.

<ion-header>
  <ion-toolbar>
    <ion-title>
      Ionic Blank
    </ion-title>
    <ion-buttons slot="end">
      <ion-button>
        <ion-icon slot="icon-only" name="person"></ion-icon>
      </ion-button>
    </ion-buttons>
  </ion-toolbar>
</ion-header>

<ion-content padding>
  The world is your oyster.
  <p>If you get lost, the <a target="_blank" href="https://ionicframework.com/docs">docs</a> will be your guide.</p>
</ion-content>

Everything works while runinng on a more recent webview version (68.0.3440.91):

image

Maybe the problem is related to this issue #15191?

triage

Most helpful comment

Confirm above issues.

All 5 comments

Confirm above issues.

Just created new project and i had the same issue

Uncaught SyntaxError: Unexpected token function

Ionic:

   ionic (Ionic CLI)          : 4.1.1 (C:\Users\taran\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework            : @ionic/angular 4.0.0-beta.3
   @angular-devkit/core       : 0.7.5
   @angular-devkit/schematics : 0.7.5
   @angular/cli               : 6.1.5
   @ionic/ng-toolkit          : 1.0.7
   @ionic/schematics-angular  : 1.0.5

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : android 7.0.0
   Cordova Plugins       : not available

System:

   Android SDK Tools : 26.1.1 (C:\Users\taran\AppData\Local\Android\Sdk)
   NodeJS            : v10.9.0 (C:\Program Files\nodejs\node.exe)
   npm               : 6.2.0
   OS                : Windows 10

ASW Android System Webview 52.0.2743.100 neither runs. Is there going to be a solution for old ASW?

Related to #15438

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vswarte picture vswarte  路  3Comments

gio82 picture gio82  路  3Comments

MrBokeh picture MrBokeh  路  3Comments

fdnhkj picture fdnhkj  路  3Comments

GeorgeAnanthSoosai picture GeorgeAnanthSoosai  路  3Comments