question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:9
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
netsesame2commented, Aug 17, 2018

Confirm above issues.

2reactions
ugurozturkcommented, Aug 25, 2018

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
Read more comments on GitHub >

github_iconTop Results From Across the Web

[Ionic v4-beta.3] Ionic v4 won't work with older Android System ...
Ionic v4 won't work with older Android System WebViews. ... We are currently testing and developing with Ionic v4 on devices with older...
Read more >
ionic splashscreen gives ERR_CONNECTION_REFUSED on ...
ionic splashscreen gives ERR_CONNECTION_REFUSED on older android ... It runs fine on another device, running Android 8.0.0. What could cause this ...
Read more >
Why current Ionic apps don't work with Android 4.x any more
The Android webview now uses a local webserver at localhost:8080 to show your app instead of requesting the files directly from the file...
Read more >
Here's how to fix those mysterious Android WebView crashes
Find Android System WebView in the list and tap it. (If you can't see the app, check the three-dot menu and tap "show...
Read more >
Chapter 4 Testing your app - Ionic Framework
There are four ways to test your app as you develop: in a desktop WebKit browser, in the iOS or Android simulator, in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found