Titanium JIRA Archive
Appcelerator Community (AC)

[AC-374] iOS 9 build fails to deploy on device

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionCannot Reproduce
Resolution Date2015-11-11T05:08:54.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAppcelerator CLI, Titanium SDK & CLI
Labelsdeploy, device
ReporterZarir Bhesania
AssigneeShak Hossain
Created2015-09-21T14:02:58.000+0000
Updated2015-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.

Comments

  1. Amimul Hossain 2015-09-22

    Hello [~zarirbhesania@gmail.com], Can you attach the codes in "About.js" file. Thanks.
  2. Zarir Bhesania 2015-09-22

    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;
  3. Zarir Bhesania 2015-09-22

    The same issue comes on iOS simulator and when trying to deploy the app on my Nexus 4
  4. Zarir Bhesania 2015-09-25

    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.
  5. Amimul Hossain 2015-09-28

    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.
  6. Zarir Bhesania 2015-09-28

    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.
  7. Zarir Bhesania 2015-09-28

    Even if I replace this *TiFonts.FontStyle('whiteFont')* with *"#FFFFFF"*, I am still getting a build error.
  8. Ken Rucker 2015-09-30

    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
  9. Sharif AbuDarda 2015-11-09

    Hello [~zarirbhesania@gmail.com], How are you adding your module to your project?
       var ex = require('About');
       var data = new ex();
       
    Also, your file name should be "About.js". Check if you put all this right. Thanks.

JSON Source