Skip to content
This repository was archived by the owner on May 4, 2022. It is now read-only.
This repository was archived by the owner on May 4, 2022. It is now read-only.

Uncaught SyntaxError in vendor.js when running on Android #658

Open

Description

@ionitron-bot

Original issue by @hebra on 2018-08-04T12:20:02Z

Bug Report

Ionic Info
Run ionic info from a terminal/cmd prompt and paste the output below.

Ionic:

   ionic (Ionic CLI)          : 4.0.3 (/usr/local/lib/node_modules/ionic)
   Ionic Framework            : @ionic/angular 4.0.0-beta.1
   @angular-devkit/core       : 0.7.2
   @angular-devkit/schematics : 0.7.2
   @angular/cli               : 6.1.2
   @ionic/ng-toolkit          : 1.0.2
   @ionic/schematics-angular  : 1.0.3

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : android 7.1.1, ios 4.5.5

System:

   Android SDK Tools : 26.1.1
   ios-deploy        : 2.0.0
   NodeJS            : v10.8.0 (/usr/local/Cellar/node/10.8.0/bin/node)
   npm               : 6.2.0
   OS                : macOS High Sierra
   Xcode             : Xcode 9.4.1 Build version 9F2000

Environment:

   ANDROID_HOME : /Users/heb/Library/Android/sdk

Describe the Bug
Even the simplest myApp Ionic4/Angular6 demo does not proceed past the loading index.html when running on Android (device or emulator). Browser and iOS are fine.

Steps to Reproduce
Steps to reproduce the behavior:
0. Make sure an Android SDK is installed and in the PATH and env variables

  1. Create a test app, e.g. via ionic start myApp tabs --type=angular
  2. Start logcat e.g. from command line via adb logcat
  3. Add the Android platform via ionic cordova platform add android
  4. Run ionic cordova emulate android
  5. App starts but shows a blank white page (which is the index.html)

Related Log
During app start up in the emulator the logcat logs the following error which I think is the root cause for the app not continuing loading.

D/SystemWebChromeClient( 6353): http://localhost:8080/vendor.js: Line 71984 : Uncaught SyntaxError: Use of const in strict mode.
I/chromium( 6353): [INFO:CONSOLE(71984)] "Uncaught SyntaxError: Use of const in strict mode.", source: http://localhost:8080/vendor.js (71984)
D/CordovaWebViewImpl( 6353): onPageFinished(http://localhost:8080/)

Expected Behavior
App should finish starting up.

Additional Context
This error only happens on Android devices and the emulator, but not when starting the app on Android via the Ionic DevApp tool.

Activity

  1. nextbyn commented on Nov 30, 2018

    @nextbyn

    Post your tsconfig.json in my case whas the target value

  2. shaxxx commented on Dec 14, 2018

    @shaxxx

    This is not a Ionic 3 bug.
    Bug is still very much alive in Ionic 4 beta 18. Someone should revert this to original bug and maybe take a look on ionic bot algo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions