Hello,
I’m testing my Ionic 2 app on three different devices but I have three different behaviours:
Moto G2 (Android 6.0): The app works flawlessly
LG Nexus 5 (Android 6.0.1): I have this error: “Uncaught SyntaxError: missing ) after argument list”
Samsung S3 Neo (Android 4.4.2): I have this error: “Uncaught SyntaxError: Use of const in strict mode.”
Is there a way to debug effectively? Because I just see the error message in the debug console, but it doesn’t mention any line number or file.
How can I solve these problems?
There are two issues that I can see there:
I have Ionic CLI Version: 2.0.0-beta.32 (try upgrading your beta.25) and in the other hand there’s stuff in Ionic CLI that doesn’t work nicely with Node 6, so I suggest to downgrade it to Node 5.12.0 and try again
You gotta check the Exception trace of those error messages then, because that missing ) Syntax error should be seen on any device… are you using typescript or your project is still JS/ES6? TS would help to debug that easily.
How can I see the Exceptions trace?
I can confirm that I see the error missing ) only with Nexus 5.
I’m using typescript but I don’t know how to debug the code.
Sometimes when I change something in the code I have this error: Failed to load resource: net::ERR_FILE_NOT_FOUND (file:///android_asset/www/build/js/app.bundle.js)
Is there a way to understand where is the error?
This means that there was an error while compiling your typescript. Probably in the initial run. Then there is no app.bundle.js generated, therefore the fail to load error. When this happens after the initial load the app.bundle will not be created as well but the old one is still there. But as already mentioned not on the first compile after ionic serve / emulate / run.
With ionic run android --device -l -s -c command I always have this error: Error getting IPv4 address: TypeError: String.prototype.small called on null or undefined (CLI v2.0.0-beta.25)
Moreover I would try to upgrade CLI version but I don’t understand how to do it.
Hi… is there a solution for that? is ionic2 still not supported by node6 ? I’m having the error on console: Uncaught SyntaxError: Use of const in strict mode.
This is for a android 4.2.2
Cordova CLI: You have been opted out of telemetry. To change this, run: cordova telemetry on.
6.3.1
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
ios-deploy version: 1.4.0
ios-sim version: 3.1.1
OS: Mac OS X El Capitan
Node Version: v6.3.1
Xcode version: Xcode 7.3.1 Build version 7D1014 ```