{ "id": "169701", "key": "TIMOB-25232", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "18414", "description": "", "name": "Release 6.2.0", "archived": false, "released": true, "releaseDate": "2017-09-13" }, { "id": "19919", "name": "windowslib 0.5.5", "archived": false, "released": true, "releaseDate": "2017-09-07" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-09-07T17:35:09.000+0000", "created": "2017-09-06T18:35:44.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [ { "id": "19915", "name": "windowslib 0.5.4", "archived": false, "released": true, "releaseDate": "2017-08-23" } ], "issuelinks": [], "assignee": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2018-08-06T17:49:35.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" }, { "id": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "When building for Android on Windows ({{appc run}}), the build crashes with the attached error. Same occurs for all other appc commands, e.g. {{appc ti info}}, so we are unable to get the environment. Logging out and in also didn't resolve the issue.\r\n\r\nEDIT: The Ti CLI was outdated, after updating it to 5.0.14, the Appc-CLI to 6.2.3 and the SDK to 6.1.2, the new error is:\r\n{code}\r\n\\\r\nC:\\Users\\7strel\\AppData\\Roaming\\Titanium\\mobilesdk\\win32\\6.1.2.GA\\node_modules\\windowslib\\lib\\visualstudio.js:65\r\n next(null, JSON.parse(out));\r\n ^\r\nSyntaxError: Unexpected end of JSON input\r\n at Object.parse (native)\r\n at ChildProcess. (C:\\Users\\7strel\\AppData\\Roaming\\Titanium\\mobilesdk\\win32\\6.1.2.GA\\node_modules\\windowslib\\lib\\visualstudio.js:65:20)\r\n at emitTwo (events.js:106:13)\r\n at ChildProcess.emit (events.js:191:7)\r\n at maybeClose (internal/child_process.js:877:16)\r\n at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)\r\n---------------------------------------------\r\n at runVS2017Tool (C:\\Users\\7strel\\AppData\\Roaming\\Titanium\\mobilesdk\\win32\\6.1.2.GA\\node_modules\\windowslib\\lib\\visualstudio.js:53:8)\r\n at detectVS2017Installations (C:\\Users\\7strel\\AppData\\Roaming\\Titanium\\mobilesdk\\win32\\6.1.2.GA\\node_modules\\windowslib\\lib\\visualstudio.js:105:2)\r\n at detectInstallations (C:\\Users\\7strel\\AppData\\Roaming\\Titanium\\mobilesdk\\win32\\6.1.2.GA\\node_modules\\windowslib\\lib\\visualstudio.js:146:2)\r\n at C:\\Users\\7strel\\AppData\\Roaming\\Titanium\\mobilesdk\\win32\\6.1.2.GA\\node_modules\\windowslib\\lib\\visualstudio.js:94:3\r\n at C:\\Users\\7strel\\AppData\\Roaming\\Titanium\\mobilesdk\\win32\\6.1.2.GA\\node_modules\\windowslib\\lib\\utilities.js:49:3\r\n at _combinedTickCallback (internal/process/next_tick.js:67:7)\r\n at process._tickCallback (internal/process/next_tick.js:98:9)\r\n---------------------------------------------\r\n at magik (C:\\Users\\7strel\\AppData\\Roaming\\Titanium\\mobilesdk\\win32\\6.1.2.GA\\node_modules\\windowslib\\lib\\utilities.js:34:10)\r\n at Object.detect (C:\\Users\\7strel\\AppData\\Roaming\\Titanium\\mobilesdk\\win32\\6.1.2.GA\\node_modules\\windowslib\\lib\\visualstudio.js:88:9)\r\n at C:\\Users\\7strel\\AppData\\Roaming\\Titanium\\mobilesdk\\win32\\6.1.2.GA\\node_modules\\windowslib\\index.js:80:8\r\n at C:\\Users\\7strel\\AppData\\Roaming\\Titanium\\mobilesdk\\win32\\6.1.2.GA\\node_modules\\windowslib\\node_modules\\async\\lib\\async.js:181:20\r\n at Object.async.forEachOf.async.eachOf (C:\\Users\\7strel\\AppData\\Roaming\\Titanium\\mobilesdk\\win32\\6.1.2.GA\\node_modules\\windowslib\\node_modules\\async\\lib\\async.js:233:13)\r\n at Object.async.forEach.async.each (C:\\Users\\7strel\\AppData\\Roaming\\Titanium\\mobilesdk\\win32\\6.1.2.GA\\node_modules\\windowslib\\node_modules\\async\\lib\\async.js:209:22)\r\n at C:\\Users\\7strel\\AppData\\Roaming\\Titanium\\mobilesdk\\win32\\6.1.2.GA\\node_modules\\windowslib\\index.js:79:9\r\n at C:\\Users\\7strel\\AppData\\Roaming\\Titanium\\mobilesdk\\win32\\6.1.2.GA\\node_modules\\windowslib\\lib\\utilities.js:49:3\r\n---------------------------------------------\r\n at magik (C:\\Users\\7strel\\AppData\\Roaming\\Titanium\\mobilesdk\\win32\\6.1.2.GA\\node_modules\\windowslib\\lib\\utilities.js:34:10)\r\n at Object.detect (C:\\Users\\7strel\\AppData\\Roaming\\Titanium\\mobilesdk\\win32\\6.1.2.GA\\node_modules\\windowslib\\index.js:58:9)\r\n at Section.exports.detect (C:\\Users\\7strel\\AppData\\Roaming\\Titanium\\mobilesdk\\win32\\6.1.2.GA\\windows\\cli\\lib\\info.js:26:13)\r\n at C:\\Users\\7strel\\AppData\\Roaming\\npm\\node_modules\\titanium\\lib\\commands\\info.js:604:13\r\n at C:\\Users\\7strel\\AppData\\Roaming\\npm\\node_modules\\titanium\\node_modules\\async\\dist\\async.js:3845:9\r\n at eachOfArrayLike (C:\\Users\\7strel\\AppData\\Roaming\\npm\\node_modules\\titanium\\node_modules\\async\\dist\\async.js:1089:9)\r\n at eachOf (C:\\Users\\7strel\\AppData\\Roaming\\npm\\node_modules\\titanium\\node_modules\\async\\dist\\async.js:1139:5)\r\n at _parallel (C:\\Users\\7strel\\AppData\\Roaming\\npm\\node_modules\\titanium\\node_modules\\async\\dist\\async.js:3844:5)\r\n at Object.parallelLimit [as parallel] (C:\\Users\\7strel\\AppData\\Roaming\\npm\\node_modules\\titanium\\node_modules\\async\\dist\\async.js:3924:3)\r\n{code}", "attachment": [ { "id": "63193", "filename": "Unknown.png", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-09-06T18:35:36.000+0000", "size": 145817, "mimeType": "image/png" } ], "flagged": false, "summary": "Windows: CLI fails when running any appc commands", "creator": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [ { "id": "427647", "author": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "body": "Looks like {{ti info}} blows up for the developer, probably development environment setup issue.\r\nThat said, appc should be more resilient.", "updateAuthor": { "name": "fmiao", "key": "fmiao", "displayName": "Feon Sua Xin Miao", "active": true, "timeZone": "America/Vancouver" }, "created": "2017-09-06T18:59:31.000+0000", "updated": "2017-09-06T18:59:31.000+0000" }, { "id": "427667", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "windowslib 0.5.5: https://github.com/appcelerator/windowslib/pull/79\r\n\r\nWe also need to push this changes to {{titanium_mobile}} in order to close this ticket.", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-09-07T02:20:58.000+0000", "updated": "2017-09-07T02:20:58.000+0000" }, { "id": "427688", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Merged the windowslib PR, waiting for it to build and publish before updating titanium_mobile...", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-09-07T15:52:37.000+0000", "updated": "2017-09-07T15:52:37.000+0000" }, { "id": "427694", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "Merged PR, updated titanium_mobile to use windowslib 0.5.5", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-09-07T17:35:09.000+0000", "updated": "2017-09-07T17:35:09.000+0000" }, { "id": "427696", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Does this really fix the issue? The developer needed to execute the VS-related setup.exe manually which resolved the issue for him. Asking different: Is the JSON.parse supposed to throw in a non-error case?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-09-07T18:27:59.000+0000", "updated": "2017-09-07T18:27:59.000+0000" }, { "id": "427705", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~hknoechel] I was not able to reproduce this issue but I believe my fix works for this particular issue (the {{SyntaxError: Unexpected end of JSON input}}). \r\n\r\n{code}\r\nJSON.parse('{');\r\n{code}\r\n\r\n{code}\r\ntry {\r\n JSON.parse('{');\r\n} catch (E) {\r\n console.log('yeah');\r\n}\r\n{code}\r\n\r\nIt was originally thrown because Visual Studio 2017 detection tool returns unexpected output for some reason, but windowslib should not error out even in this case.\r\n", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-09-07T23:10:10.000+0000", "updated": "2017-09-07T23:10:10.000+0000" }, { "id": "440232", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:49:35.000+0000", "updated": "2018-08-06T17:49:35.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }