[AC-374] iOS 9 build fails to deploy on device
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Cannot Reproduce |
Resolution Date | 2015-11-11T05:08:54.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Appcelerator CLI, Titanium SDK & CLI |
Labels | deploy, device |
Reporter | Zarir Bhesania |
Assignee | Shak Hossain |
Created | 2015-09-21T14:02:58.000+0000 |
Updated | 2015-11-11T05:08:54.000+0000 |
Description
I got the following error when I tried to deploy my app on the device
[INFO] : Processing JavaScript files
[ERROR] : Failed to parse /Users/Documents/Appcelerator_Studio_Workspace/PRJ/Resources/js/About.js
[ERROR] : Unexpected token: eof (undefined) [line 5, column 19564]
TRACE | titanium exited with exit code 1
ERROR | Error: ti run exited with error code 1
at ChildProcess. (/Users/mydrive/.appcelerator/install/5.0.1/package/node_modules/appc-cli-titanium/plugins/run.js:89:66)
at ChildProcess.emit (events.js:117:20)
at Process.ChildProcess._handle.onexit (child_process.js:820:12)
The error on line 5 mentioned is actually a commented line. Its throwing errors on commented lines.
Hello [~zarirbhesania@gmail.com], Can you attach the codes in "About.js" file. Thanks.
I figured that the compiler is not accepting inline comment "//" in the code. Block comments are accepted. Check the below code: function About() { // About View var _aboutGlobalView = Ti.UI.createScrollView({ top : 0, bottom : 0, left : 0, width : platformWidth, right : 0, backgroundColor : TiFonts.FontStyle('whiteFont'), disableBounce : true }); return _aboutGlobalView; }; module.exports = About;
The same issue comes on iOS simulator and when trying to deploy the app on my Nexus 4
Figured out a wierd test case, this error only comes in About.js file in my project. If I remove this file it works fine. If I put it back again it throws an error on the commented line.
Hello [~zarirbhesania@gmail.com], In your code "backgroundColor : TiFonts.FontStyle('whiteFont')" is causing the error. No such thing as "TiFonts" also u can not set background color like this . Thanks.
Hi Amimul, Then why this error comes only on about.js file. If I remove this file the app builds fine. I have other files too using this property. *TiFonts.FontStyle('whiteFont')* is basically calling a common function for white font color. Its a require function call.
Even if I replace this *TiFonts.FontStyle('whiteFont')* with *"#FFFFFF"*, I am still getting a build error.
I am experiencing this in Android too. Any comments that are: // Some Comment Fail. And I have to convert them to /* Some Comment */ Works fine in earlier versions. This bug occurs only in 5.0.x
Hello [~zarirbhesania@gmail.com], How are you adding your module to your project?
Also, your file name should be "About.js". Check if you put all this right. Thanks.