{ "id": "152353", "key": "TIMOB-19799", "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": "16997", "name": "Release 5.2.0", "archived": false, "released": true, "releaseDate": "2016-02-23" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-10-28T15:09:05.000+0000", "created": "2015-10-26T19:16:19.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2016-02-19T22:45:46.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": "10206", "name": "iOS", "description": "iOS Platform" }, { "id": "10207", "name": "Tooling" } ], "description": "Appears that we need some better error checking. I don't have the specific instance to recreate, though the code appears to be vulnerable here:\r\n\r\n /usr/local/bin/node /Users/ingo/.appcelerator/install/5.0.3/package/node_modules/appc-cli-titanium/node_modules/titanium/bin/titanium build -l trace --plugin-paths /Users/ingo/.appcelerator/install/5.0.3/package/node_modules --config-file /var/folders/jf/k0njrhzd5nb9q91mdm4ymr380000gp/T/build-1445886520214.json --no-banner\r\n\r\n{code}\r\n[TRACE] [ioslib] No iOS Simulator UDID specified, searching for best match\r\n[TRACE] [ioslib] Scanning Xcodes: 7.1:7B91b\r\nTypeError: Cannot read property 'sort' of undefined\r\n at /Users/ingo/Library/Application Support/Titanium/mobilesdk/osx/5.1.0.v20151021132025/node_modules/ioslib/lib/simulator.js:604:53\r\n at /Users/ingo/Library/Application Support/Titanium/mobilesdk/osx/5.1.0.v20151021132025/node_modules/ioslib/lib/simulator.js:127:11\r\n at /Users/ingo/Library/Application Support/Titanium/mobilesdk/osx/5.1.0.v20151021132025/node_modules/ioslib/lib/utilities.js:55:9\r\n at process._tickCallback (node.js:355:11)\r\n---------------------------------------------\r\n at magik (/Users/ingo/Library/Application Support/Titanium/mobilesdk/osx/5.1.0.v20151021132025/node_modules/ioslib/lib/utilities.js:40:13)\r\n at detect (/Users/ingo/Library/Application Support/Titanium/mobilesdk/osx/5.1.0.v20151021132025/node_modules/ioslib/lib/simulator.js:123:9)\r\n at /Users/ingo/Library/Application Support/Titanium/mobilesdk/osx/5.1.0.v20151021132025/node_modules/ioslib/lib/simulator.js:426:3\r\n at fireCallbacks (/Users/ingo/Library/Application Support/Titanium/mobilesdk/osx/5.1.0.v20151021132025/node_modules/ioslib/lib/xcode.js:63:5)\r\n at /Users/ingo/Library/Application Support/Titanium/mobilesdk/osx/5.1.0.v20151021132025/node_modules/ioslib/lib/xcode.js:69:11\r\n at /Users/ingo/Library/Application Support/Titanium/mobilesdk/osx/5.1.0.v20151021132025/node_modules/ioslib/lib/utilities.js:55:9\r\n at process._tickCallback (node.js:355:11)\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: ioslib: TypeError: Cannot read property 'sort' of undefined", "creator": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 520, "state": "closed", "name": "2015 Sprint 22 Tooling", "startDate": "2015-10-26T16:54:38.390Z", "endDate": "2015-11-07T02:54:00.000Z", "completeDate": "2015-11-10T23:31:39.740Z", "originBoardId": 121 } ], "comment": { "comments": [ { "id": "367855", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Note:\r\n\r\nTRACE | titanium exited with exit code 1\r\nERROR | Error: ti run exited with error code 1\r\n\r\nThough I had NOT accepted the Xcode 7.1 license agreement at this point. Accepting the license agreement fixed it.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-10-26T19:17:34.000+0000", "updated": "2015-10-26T19:17:34.000+0000" }, { "id": "368041", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "ioslib PR: https://github.com/appcelerator/ioslib/pull/29", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-10-27T23:15:04.000+0000", "updated": "2015-10-27T23:15:04.000+0000" }, { "id": "368119", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Titanium SDK master PR: https://github.com/appcelerator/titanium_mobile/pull/7362", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-10-28T14:54:38.000+0000", "updated": "2015-10-28T14:54:38.000+0000" }, { "id": "368120", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "To test:\r\n\r\n1. Install Xcode 7, launch it, accept the EULA. Build a Titanium app. Everything should work.\r\n2. Delete Xcode 7 (i.e. /Applications/Xcode.app). The simulators installed with Xcode 7 will still exist, but Xcode and the iOS Simulator won't.\r\n3. Install Xcode 7.1, but DO NOT launch it. DO NOT accept the EULA.\r\n4. Build an app and watch it fail.\r\n\r\nWhat's going on here? ioslib is finding the old simulators from Xcode 7 that use the iOS 9 runtime and maybe some older runtimes if you install older simulators.\r\n\r\nWhen you install Xcode 7.1, you will have the iOS Simulator 9.1 runtime. You won't have a iOS 9 runtime (you deleted it). You also haven't launched Xcode 7.1, so it hasn't initialized the new iOS 9.1 Simulators.\r\n\r\nSo ioslib detects Xcode 7.1, iOS SDK 9.1, and iOS Simulator 9.1. When ioslib detect simulators, it shortcuts and trusts the iOS Simulators found when detecting Xcode. When ioslib tries to find a simulator, the Xcode results and Simulator results don't jive and the error in this ticket happens. As simple check fixes it. I have also added additional checks in ioslib's simulator library to make sure the selected Xcode has had the EULA accepted, otherwise it errors out.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2015-10-28T15:08:08.000+0000", "updated": "2015-10-28T15:08:08.000+0000" }, { "id": "370476", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks for the heads up here, I was completely lost when I got this error (appc li 5.0.4, ti sdk 5.0.2). Can confirm that agreeing to the XCode license agreement resolved the issue.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-11-17T03:05:50.000+0000", "updated": "2015-11-17T03:05:50.000+0000" }, { "id": "377415", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed, using:\r\n\r\nMacOS 10.11.3 (15D21)\r\nStudio 4.5.0.201602170821\r\nTi SDK 5.2.0.v20160219124528\r\nAppc NPM 4.2.3-2\r\nAppc CLI 5.2.0-269\r\nAlloy 1.7.33\r\nXcode 7.1 and Xcode 7.2\r\n\r\nAttempting to build without accepting the Xcode EULA results in an error message and failed build. Tested using the provided steps.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-02-19T22:45:46.000+0000", "updated": "2016-02-19T22:45:46.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }