{ "id": "170322", "key": "DAEMON-144", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12519", "key": "DAEMON", "name": "Appcelerator Daemon" }, "fixVersions": [ { "id": "18407", "description": "", "name": "Appc Daemon 1.0.0", "archived": false, "released": true, "releaseDate": "2017-12-05" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-11-17T15:58:28.000+0000", "created": "2017-11-15T11:52:48.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [ { "id": "18407", "description": "", "name": "Appc Daemon 1.0.0", "archived": false, "released": true, "releaseDate": "2017-12-05" } ], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2017-11-17T15:58:28.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "15624", "name": "appcd-plugin-ios" }, { "id": "15052", "name": "ioslib", "description": "Library for iOS related functions" } ], "description": "h5.Description\r\n\r\nI have two Xcodes on my machine one at /Applications and the other at /Users/eharris/Desktop/Xcode.app/Contents/Developer, pointing xcode-select at the version in Desktop causes the daemon to become unstable (spawning process multiple times, freezes etc)\r\n\r\nh5.Steps to repro\r\n\r\nRun {{sudo xcode-select -s }}, then {{appcd start && appcd exec /ios/latest/info}}", "attachment": [ { "id": "63607", "filename": "dump.txt", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2017-11-15T21:15:04.000+0000", "size": 61036, "mimeType": "text/plain" }, { "id": "63606", "filename": "output.txt", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2017-11-15T21:15:01.000+0000", "size": 463351, "mimeType": "text/plain" } ], "flagged": false, "summary": "iOS Plugin: Pointing xcode-select to a different xcode install causes the daemon to become unstable", "creator": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "subtasks": [], "reporter": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "environment": null, "closedSprints": [ { "id": 969, "state": "closed", "name": "2017 Sprint 23 Tooling", "startDate": "2017-11-05T16:36:50.292Z", "endDate": "2017-11-19T16:36:00.000Z", "completeDate": "2017-11-20T18:58:45.002Z", "originBoardId": 219 } ], "comment": { "comments": [ { "id": "430736", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~cbarber] Attached dump.txt which is an appc dump, and output which is an appcd logcat during reproducing this", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2017-11-15T21:15:38.000+0000", "updated": "2017-11-15T21:15:38.000+0000" }, { "id": "430768", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Adding some more information for fun.\r\n\r\nI have 3 xcodes on my system \r\n\r\n- 8.3.2:8E2002 located in Desktop/Xcode8.3.2\r\n- 8.3.3:8E3004b located in Applications/Xcode (Daemon will always find this, so it is our constant variable)\r\n- 9.0.1:9A1004 located in Desktop/Xcode\r\n\r\nIf I set xcode-select to 9.0.1:9A1004 then I get this problem. If I set xcode-select to 8.3.2:8E2002 then this doesn't happen, trying to download some more 9.X xcodes to test\r\n\r\nEdit:\r\n\r\n-Download 9.1:9B55, setting xcode-select to that causes no issues.- Ignore, xcode eulas...\r\nAwaiting my xcode beta 9.2 beta to unzip\r\n\r\n\r\nIt looks like this issue lies with having an xcode 8 and 9 install detected at the same time. The code below (run with {{node test.js && diff before2 after2}} shows that the xcode 8 instance is modified when it is passed into the getSimulators call\r\n{code}\r\nconst ioslib = require('./dist');\r\nconst fs = require('fs');\r\n\r\nconst xcode = new ioslib.xcode.Xcode('/Users/eharris/Downloads/Xcode-beta.app/Contents/Developer/');\r\nconst xcode2 = new ioslib.xcode.Xcode('/Applications/Xcode.app/');\r\n\r\nfs.writeFile('before1', JSON.stringify(xcode, null, 2), () => { });\r\nfs.writeFile('before2', JSON.stringify(xcode2, null, 2), () => { });\r\n// 8.3.2 /Users/eharris/Desktop/Xcode8.3.2/Contents/Developer/\r\n// 8.3.3:8E3004b /Applications/Xcode.app/\r\n// 9.0.1:9A1004 /Users/eharris/Desktop/Xcode/Contents/Developer/\r\n// 9.1:9B55 /Users/eharris/Downloads/Xcode.app/Contents/Developer/\r\n// 9.2:9C34b /Users/eharris/Downloads/Xcode-beta.app/Contents/Developer/\r\nioslib.simulator.getSimulators({ '9.2:9C34b': xcode, '8.3.3:8E3004b': xcode2 })\r\n\t.then(foo => {\r\n\t\tfs.writeFile('after1', JSON.stringify(xcode, null, 2), () => { });\r\n\t\tfs.writeFile('after2', JSON.stringify(xcode2, null, 2), () => { });\r\n\t\t// console.log(foo);\r\n\t\treturn ioslib.simulator.getSimulators({ '9.2:9C34b': xcode, '8.3.3:8E3004b': xcode2 })\r\n\t\t\t.then(foo => {\r\n\t\t\t\tconsole.log(foo);\r\n\t\t\t});\r\n\t})\r\n{code}", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2017-11-16T01:00:29.000+0000", "updated": "2017-11-16T01:54:23.000+0000" }, { "id": "430778", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "[~cbarber] I was able to stop this issue with the following commit https://github.com/ewanharris/ioslib/commit/5c7a8e105677b904bee25643d098aad9f73c9953 which really just proves what we knew and is disguising the real bug where the xcode 8 instance is being modified", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2017-11-16T02:05:02.000+0000", "updated": "2017-11-16T02:05:02.000+0000" }, { "id": "430916", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Latest changes to ioslib and appc-daemon fix this issue for me. Would like to test a successful cli build before closing out", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2017-11-17T15:12:49.000+0000", "updated": "2017-11-17T15:12:49.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }