Description
I updated to the latest xcode and forgot to accept the eula, when building I was met with
\[ERROR] simctl list failed after 4 tries
, I tried to check my info (appc ti info -t ios) and got the below
2017-09-19T19:52:46.288Z | ERROR | Cannot read property 'forEach' of undefined
2017-09-19T19:52:46.288Z | TRACE | TypeError: Cannot read property 'forEach' of undefined
at /Users/awam/.appcelerator/install/6.2.4/package/node_modules/titanium/lib/commands/info.js:620:22
at /Users/awam/.appcelerator/install/6.2.4/package/node_modules/titanium/node_modules/async/dist/async.js:3853:9
at /Users/awam/.appcelerator/install/6.2.4/package/node_modules/titanium/node_modules/async/dist/async.js:484:16
at iteratorCallback (/Users/awam/.appcelerator/install/6.2.4/package/node_modules/titanium/node_modules/async/dist/async.js:1082:13)
at /Users/awam/.appcelerator/install/6.2.4/package/node_modules/titanium/node_modules/async/dist/async.js:988:16
at /Users/awam/.appcelerator/install/6.2.4/package/node_modules/titanium/node_modules/async/dist/async.js:3850:13
at apply (/Users/awam/.appcelerator/install/6.2.4/package/node_modules/titanium/node_modules/async/dist/async.js:41:25)
at /Users/awam/.appcelerator/install/6.2.4/package/node_modules/titanium/node_modules/async/dist/async.js:76:12
at Section.<anonymous> (/Users/awam/Library/Application Support/Titanium/mobilesdk/osx/6.2.0.GA/iphone/cli/lib/info.js:43:11)
at /Users/awam/Library/Application Support/Titanium/mobilesdk/osx/6.2.0.GA/node_modules/ioslib/index.js:122:12
Logging err from [here](
https://github.com/appcelerator/titanium_mobile/blob/4c4d67515646aa7b26db73013ba306d0dcd19b8d/iphone/cli/lib/info.js#L40) gives the below
Error: simctl list failed after 4 tries
at /Users/awam/Library/Application Support/Titanium/mobilesdk/osx/6.2.0.GA/node_modules/ioslib/lib/simctl.js:220:21
at /Users/awam/Library/Application Support/Titanium/mobilesdk/osx/6.2.0.GA/node_modules/ioslib/node_modules/async/dist/async.js:906:16
at next (/Users/awam/Library/Application Support/Titanium/mobilesdk/osx/6.2.0.GA/node_modules/ioslib/node_modules/async/dist/async.js:5174:18)
at /Users/awam/Library/Application Support/Titanium/mobilesdk/osx/6.2.0.GA/node_modules/ioslib/lib/simctl.js:185:13
at /Users/awam/Library/Application Support/Titanium/mobilesdk/osx/6.2.0.GA/node_modules/ioslib/node_modules/async/dist/async.js:906:16
at next (/Users/awam/Library/Application Support/Titanium/mobilesdk/osx/6.2.0.GA/node_modules/ioslib/node_modules/async/dist/async.js:5174:18)
at /Users/awam/Library/Application Support/Titanium/mobilesdk/osx/6.2.0.GA/node_modules/ioslib/lib/simctl.js:584:13
at ChildProcess.<anonymous> (/Users/awam/Library/Application Support/Titanium/mobilesdk/osx/6.2.0.GA/node_modules/node-appc/lib/subprocess.js:60:3)
/Applications/Xcode.app/Contents/Developer/usr/bin/simctl list --json
dyld: Library not loaded: /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator
Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/simctl
Reason: image not found
Abort trap: 6
Steps to reproduce
Update to xcode 9, do not accept the eula
Run a build appc run -p ios
Run info appc ti info -t ios
Actual
Errors above
Expected
I believe we used to tell people the eula wasn't accepted
I was able to go back to the old behaviour by changing to
if (!xcodeInfo.selectedXcode || !xcodeInfo.selectedXcode.eulaAccepted) {
here https://github.com/appcelerator/ioslib/blob/ea1ac3e29fba551413b9b7ccad9ee3ad69913dff/lib/simulator.js#L174Just in case the above is correct and Barber approved https://github.com/appcelerator/ioslib/pull/67
Ti SDK master PR: https://github.com/appcelerator/titanium_mobile/pull/9457 Ti SDK 6_2_X PR: https://github.com/appcelerator/titanium_mobile/pull/9455 Ti SDK 6_2_1 PR https://github.com/appcelerator/titanium_mobile/pull/9456