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.

"SyntaxError: Unexpected token (" on Android 7.0.0 (API 24)

See original GitHub issue

I am having an issue with ionic running on Android 7. I am getting the following error message:

localhost/:53 Uncaught SyntaxError: Unexpected token (

Screenshot 2022-04-11 at 14 58 23

Which I figured out should be this line of code: https://github.com/ionic-team/capacitor/blob/1451ec850a9ef73267a032638e73f1fc440647b9/core/native-bridge.ts#L61

Its a fresh tab based project with angular as the framework

This is my environment:

% ionic info
       
       Require stack:
       - /Users/timo/.nvm/versions/node/v16.14.0/lib/node_modules/@ionic/cli/lib/project/index.js
       - /Users/timo/.nvm/versions/node/v16.14.0/lib/node_modules/@ionic/cli/lib/index.js
       - /Users/timo/.nvm/versions/node/v16.14.0/lib/node_modules/@ionic/cli/index.js
       - /Users/timo/.nvm/versions/node/v16.14.0/lib/node_modules/@ionic/cli/bin/ionic

Ionic:

   Ionic CLI                     : 6.18.2 (/Users/timo/.nvm/versions/node/v16.14.0/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 6.0.16
   @angular-devkit/build-angular : 13.2.6
   @angular-devkit/schematics    : 13.2.6
   @angular/cli                  : 13.2.6
   @ionic/angular-toolkit        : 6.1.0

Capacitor:

   Capacitor CLI      : 3.4.3
   @capacitor/android : 3.4.3
   @capacitor/core    : 3.4.3
   @capacitor/ios     : not installed

Utility:

   cordova-res : not installed globally
   native-run  : 1.5.0

System:

   NodeJS : v16.14.0 (/Users/timo/.nvm/versions/node/v16.14.0/bin/node)
   npm    : 8.6.0
   OS     : macOS Monterey
WebView version: 52.0.2743.100

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
trytunacommented, Apr 20, 2022

Shouldn’t Capacitor show this kind of Message? Is there some example code to do something like this?

Don’t get me wrong - I don’t mind implementing this but the reason to use Ionic with Capacitor is so that one don’t have to mess with native code. This seems so essential that it would be a good candidate to be included into Capacitor.

0reactions
ionitron-bot[bot]commented, Nov 10, 2022

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 Capacitor, please create a new issue and ensure the template is fully filled out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unexpected token ? during run ionic 6 application on android ...
File: http://localhost/vendor.js - Line 24288 - Msg: Uncaught SyntaxError: Unexpected token ? when I run the application in the android ...
Read more >
SyntaxError: Unexpected token Y in JSON while Calling REST ...
Visual Builder Studio - Version 21.10.0 to 21.10.0: SyntaxError: Unexpected token Y in JSON while Calling REST API For PO Status Change.
Read more >
Unexpected token =" in "function isNumber(value, ignoreNaN ...
Hello, We've an error in the android version of our application (ios and browser versions are ok): "Uncaught SyntaxError: Unexpected token ...
Read more >
Uncaught SyntaxError: Unexpected token "<" : r/reactjs - Reddit
Are you making an API call when the app loads? I've run into this when it turns out the API server was throwing...
Read more >
Firebase JavaScript SDK Release Notes - Google
Fixed timer issues in the App Check SDK that caused the token to fail to refresh ... Fixed an issue where isSupported() throws...
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