{ "id": "132472", "key": "ALOY-1066", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [ { "id": "15909", "description": "Alloy 1.5.0", "name": "Alloy 1.5.0", "archived": false, "released": true, "releaseDate": "2014-09-29" }, { "id": "15758", "description": "Alloy 1.4.0", "name": "Alloy 1.4.0", "archived": false, "released": true, "releaseDate": "2014-07-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-11-26T22:40:34.000+0000", "created": "2014-07-01T18:11:21.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "qe-3.3.0", "qe-noTestNeeded" ], "versions": [ { "id": "15758", "description": "Alloy 1.4.0", "name": "Alloy 1.4.0", "archived": false, "released": true, "releaseDate": "2014-07-17" } ], "issuelinks": [], "assignee": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "updated": "2014-11-26T22:40:34.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": "13604", "name": "Tooling", "description": "Items related to Alloy tooling and workflow" } ], "description": "h5.Description\r\nAndroid device builds will fail with Android SDK-Tools 23.0.1 installed.\r\nAttached the log file of the error from the CLI.\r\n\r\nh5.Steps To Reproduce\r\n1. Install the Android SDK-Tools 23.0.1 and all the necessary components\r\n2. Create an Alloy project\r\n3. Build to device\r\n\r\nh5.Expected Result\r\nApp should install on device\r\n\r\nh5.Actual Result\r\nBuild throws and errors and fails to install on device\r\n\r\n{code}\r\n[ERROR] Failed to run command \"build\"\r\n[ERROR] TypeError: Cannot call method 'on' of null\r\n at C:\\Users\\Tester\\Documents\\Appcelerator_Studio_Workspace\\alloyAndroidProject\\plugins\\ti.alloy\\hooks\\alloy.js:132:18\r\n{code}\r\n\r\nThis error is happening because the stdio is not inheriting properly from the parent Titanium CLI process. This could be a Node.js issue, but I doubt it.\r\n\r\nh5. Solution\r\n\r\nI think we need to explicitly specify the stdio streams for the spawned process. Inheriting stdio does not appear to be working.\r\n\r\nIn the long term, the Alloy compile command needs to be a first-class CLI hook that does not spawn the Alloy compile command. That will fix this permanently.\r\n\r\n+Extra Information+\r\nThis only occurs on Windows.", "attachment": [ { "id": "49409", "filename": "Android2301Alloy.txt", "author": { "name": "sdowse", "key": "sdowse", "displayName": "Samuel Dowse", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-01T18:11:21.000+0000", "size": 6603, "mimeType": "text/plain" } ], "flagged": false, "summary": "Windows, Android: Alloy build to device fails when spawning Alloy compile command", "creator": { "name": "sdowse", "key": "sdowse", "displayName": "Samuel Dowse", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "sdowse", "key": "sdowse", "displayName": "Samuel Dowse", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Windows 8.1\r\nAppcelerator Studio, build: 3.3.0.201406271159\r\nTitanium SDK, build: 3.3.0.v20140627202512\r\nTitanium CLI, build: 3.3.0-rc4\r\nAlloy: 1.4.0-rc3\r\nAndroid SDK-Tools: 23.0.1\r\nNode.js: 0.10.29", "closedSprints": [ { "id": 147, "state": "closed", "name": "2014 Sprint 13 Alloy", "startDate": "2014-06-23T14:36:08.509Z", "endDate": "2014-07-04T00:00:00.000Z", "completeDate": "2014-07-07T16:06:44.759Z", "originBoardId": 124 } ], "comment": { "comments": [ { "id": "311902", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "PR: https://github.com/appcelerator/alloy/pull/468 \r\n\r\nThe problem is not due to child process not inheriting stdio, but rather that child.stdout and child.stderr aren't valid objects in the case of a compile error. To get error output on Windows, I have to pass in the \\{ stdio: 'inherit' \\} options object and I have to test for the validity of the child properties before listening for the on data events.\r\n\r\nI've tested this fix on Windows using Node 0.10.26 and 0.10.29 as well as on OS X with Node 0.10.28. It works as intended on all.\r\n\r\nIf you're testing with an existing project, you'll have to do {{ti clean}} or copy hooks/alloy.js to /plugins/ti.alloy/hooks/alloy.js.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-07-01T20:57:47.000+0000", "updated": "2014-07-01T20:57:47.000+0000" }, { "id": "311905", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "I need to test with the Android R23 tools before considering this issue resolved.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-07-01T21:03:51.000+0000", "updated": "2014-07-01T21:03:51.000+0000" }, { "id": "312047", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "Tested with Android R23 tools: the PR works as expected. The original issue is unrelated to Android tooling level.", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-07-02T14:20:10.000+0000", "updated": "2014-07-02T14:20:10.000+0000" }, { "id": "312148", "author": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "body": "PR merged to master and 1_4_X branches", "updateAuthor": { "name": "skypanther", "key": "skypanther", "displayName": "Tim Poulsen", "active": true, "timeZone": "America/New_York" }, "created": "2014-07-02T21:02:57.000+0000", "updated": "2014-07-02T21:02:57.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }