facebookarchive / xctool

An extension for Apple's xcodebuild that makes it easier to test iOS and macOS apps.
Apache License 2.0
6.91k stars 738 forks source link

Crash due to SDK not found after upgrade to Xcode 8.3.3 #731

Closed zayhero-zz closed 7 years ago

zayhero-zz commented 7 years ago

After upgrade to Xcode 8.3.3, I am getting error when running tests with xctool. The error is

2017-06-20 14:36:20.951 xctool[24373:344717] *** Assertion failure in -[SimulatorInfo sdkInfoForSimulatedSdk], /Users/nekto/Projects/xctool/xctool/xctool/SimulatorWrapper/SimulatorInfo.m:277
2017-06-20 14:36:20.953 xctool[24373:344717] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unable to find SDK for platform iphonesimulator and sdk version 10.3.1. Available roots: (
    "iphonesimulator10.3",
    "appletvsimulator10.2",
    "watchsimulator3.2"
)'

This looks like xctool is trying to get iphonesimulator10.3.1 which I don't have on my machine. Is there any way I can set the SDK to iphonesimulator10.3 or get around the problem?

I try passing -sdk iphonesimulator10.3 into the command line but doesn't work.

zayhero-zz commented 7 years ago

@ExtremeMan Could you suggest what should I do to get around this error? Thanks!

ExtremeMan commented 7 years ago

Can you share your full command? Do you use -destination option?

zayhero-zz commented 7 years ago

@ExtremeMan I am running xctool from buck test, here is the full command and the output

brian_zhang ~/apps (master) $ /Users/brian_zhang/apps/buck-out/gen/third_party/ios/xctool/xctool#unzip-xctool/unzipped/bin/xctool -reporter json-stream -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=latest' run-tests -logicTest /Users/brian_zhang/apps/buck-out/gen/ios/Tests/ModelTests#apple-test-bundle,dwarf,no-include-frameworks,no-linkermap/ModelTests.xctest -DBUCK=ture
{"scheme":null,"workspace":null,"timestamp":1498151293.642019,"event":"begin-action","project":null,"name":"run-tests"}
{"message":"Collecting info for testables...","timestamp":1498151293.642222,"level":"Info","event":"begin-status"}
2017-06-22 10:08:13.643 xctool[75931:1514633] *** Assertion failure in -[SimulatorInfo sdkInfoForSimulatedSdk], /Users/nekto/Projects/xctool/xctool/xctool/SimulatorWrapper/SimulatorInfo.m:277
2017-06-22 10:08:13.643 xctool[75931:1514633] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unable to find SDK for platform iphonesimulator and sdk version 10.3.1. Available roots: (
    "iphonesimulator10.3",
    "appletvsimulator10.2",
    "watchsimulator3.2"
)'
*** First throw call stack:
(
  0   CoreFoundation                      0x00007fff94ce62cb __exceptionPreprocess + 171
  1   libobjc.A.dylib                     0x00007fffa9af148d objc_exception_throw + 48
  2   CoreFoundation                      0x00007fff94ceb042 +[NSException raise:format:arguments:] + 98
  3   Foundation                          0x00007fff96733c80 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
  4   xctool                              0x000000010697eb3e -[SimulatorInfo sdkInfoForSimulatedSdk] + 765
  5   xctool                              0x000000010697eb9e -[SimulatorInfo simulatedRuntime] + 34
  6   xctool                              0x000000010697ec58 -[SimulatorInfo simulatedDevice] + 76
  7   xctool                              0x000000010695b7e7 CreateTaskForSimulatorExecutable + 266
  8   xctool                              0x000000010699f56a -[OCUnitIOSLogicTestQueryRunner createTaskForQuery] + 519
  9   xctool                              0x0000000106967f5c -[OCUnitTestQueryRunner runQueryWithError:] + 374
  10  xctool                              0x000000010699bbac +[TestableExecutionInfo queryTestCasesWithSimulatorInfo:error:] + 407
  11  xctool                              0x000000010699b0af +[TestableExecutionInfo infoForTestable:buildSettings:simulatorInfo:] + 294
  12  xctool                              0x000000010696f145 __56-[RunTestsAction runTestables:options:xcodeSubjectInfo:]_block_invoke + 857
  13  libdispatch.dylib                   0x00007fffaa3a9524 _dispatch_call_block_and_release + 12
  14  libdispatch.dylib                   0x00007fffaa3a08fc _dispatch_client_callout + 8
  15  libdispatch.dylib                   0x00007fffaa3b66f1 _dispatch_queue_serial_drain + 209
  16  libdispatch.dylib                   0x00007fffaa3a9306 _dispatch_queue_invoke + 1046
  17  libdispatch.dylib                   0x00007fffaa3af020 _dispatch_queue_override_invoke + 369
  18  libdispatch.dylib                   0x00007fffaa3a26b5 _dispatch_root_queue_drain + 476
  19  libdispatch.dylib                   0x00007fffaa3a248c _dispatch_worker_thread3 + 99
  20  libsystem_pthread.dylib             0x00007fffaa5ef5a2 _pthread_wqthread + 1299
  21  libsystem_pthread.dylib             0x00007fffaa5ef07d start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6
ExtremeMan commented 7 years ago

Can you try with name=iPhone 6s in destination?

Example of a working command:

xctool -sdk iphonesimulator -destination 'name=iPhone 6s,OS=latest' run-tests -parallelize -bucketBy class -logicTestBucketSize 1 -testTimeout 60 -appTest AppTests.xctest:App.app/App -reporter plain
zayhero-zz commented 7 years ago

Hmm.. I still getting the same error:

brian_zhang ~/airlab/repos/apps (master) $ /Users/brian_zhang/airlab/repos/apps/buck-out/gen/third_party/ios/xctool/xctool#unzip-xctool/unzipped/bin/xctool  -sdk iphonesimulator -destination 'name=iPhone 6s,OS=latest' run-tests -parallelize -logicTest /Users/brian_zhang/airlab/repos/apps/buck-out/gen/ios/Tests/ModelTests#apple-test-bundle,dwarf,no-include-frameworks,no-linkermap/ModelTests.xctest

2017-06-22 10:36:24.272 xctool[76949:1553424] *** Assertion failure in -[SimulatorInfo sdkInfoForSimulatedSdk], /Users/nekto/Projects/xctool/xctool/xctool/SimulatorWrapper/SimulatorInfo.m:277
=== RUN-TESTS ===

  [Info] Collecting info for testables...2017-06-22 10:36:24.273 xctool[76949:1553424] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unable to find SDK for platform iphonesimulator and sdk version 10.3.1. Available roots: (
    "iphonesimulator10.3",
    "appletvsimulator10.2",
    "watchsimulator3.2"
)'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff94ce62cb __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x00007fffa9af148d objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff94ceb042 +[NSException raise:format:arguments:] + 98
    3   Foundation                          0x00007fff96733c80 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
    4   xctool                              0x000000010e3cfb3e -[SimulatorInfo sdkInfoForSimulatedSdk] + 765
    5   xctool                              0x000000010e3cfb9e -[SimulatorInfo simulatedRuntime] + 34
    6   xctool                              0x000000010e3cfc58 -[SimulatorInfo simulatedDevice] + 76
    7   xctool                              0x000000010e3ac7e7 CreateTaskForSimulatorExecutable + 266
    8   xctool                              0x000000010e3f056a -[OCUnitIOSLogicTestQueryRunner createTaskForQuery] + 519
    9   xctool                              0x000000010e3b8f5c -[OCUnitTestQueryRunner runQueryWithError:] + 374
    10  xctool                              0x000000010e3ecbac +[TestableExecutionInfo queryTestCasesWithSimulatorInfo:error:] + 407
    11  xctool                              0x000000010e3ec0af +[TestableExecutionInfo infoForTestable:buildSettings:simulatorInfo:] + 294
    12  xctool                              0x000000010e3c0145 __56-[RunTestsAction runTestables:options:xcodeSubjectInfo:]_block_invoke + 857
    13  libdispatch.dylib                   0x00007fffaa3a9524 _dispatch_call_block_and_release + 12
    14  libdispatch.dylib                   0x00007fffaa3a08fc _dispatch_client_callout + 8
    15  libdispatch.dylib                   0x00007fffaa3b5a77 _dispatch_continuation_pop + 630
    16  libdispatch.dylib                   0x00007fffaa3acdce _dispatch_async_redirect_invoke + 734
    17  libdispatch.dylib                   0x00007fffaa3a26b5 _dispatch_root_queue_drain + 476
    18  libdispatch.dylib                   0x00007fffaa3a248c _dispatch_worker_thread3 + 99
    19  libsystem_pthread.dylib             0x00007fffaa5ef5a2 _pthread_wqthread + 1299
    20  libsystem_pthread.dylib             0x00007fffaa5ef07d start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Abort trap: 6

Also, I try to change destination to -destination 'platform=iPhone 6s,OS=10.3', but getting an other error

2017-06-22 10:32:54.473 xctool[76895:1545909] *** Assertion failure in -[SimulatorInfo sdkInfoForSimulatedSdk], /Users/nekto/Projects/xctool/xctool/xctool/SimulatorWrapper/SimulatorInfo.m:277
2017-06-22 10:32:54.473 xctool[76895:1545909] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unable to find SDK for platform iphonesimulator and sdk version 10.3.1. Available roots: (
    "iphonesimulator10.3",
    "appletvsimulator10.2",
    "watchsimulator3.2"
)'
ExtremeMan commented 7 years ago

That's weird. What is the output of xcrun simctl list?

zayhero-zz commented 7 years ago

Here is the output, I suspect my Xcode SDK is not setup correctly, but unfortunately I haven't figure out why yet :(

brian_zhang ~/airlab/repos/apps (brian__fix_buck_binary) $ xcrun simctl list
== Device Types ==
iPhone 4s (com.apple.CoreSimulator.SimDeviceType.iPhone-4s)
iPhone 5 (com.apple.CoreSimulator.SimDeviceType.iPhone-5)
iPhone 5s (com.apple.CoreSimulator.SimDeviceType.iPhone-5s)
iPhone 6 (com.apple.CoreSimulator.SimDeviceType.iPhone-6)
iPhone 6 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus)
iPhone 6s (com.apple.CoreSimulator.SimDeviceType.iPhone-6s)
iPhone 6s Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus)
iPhone 7 (com.apple.CoreSimulator.SimDeviceType.iPhone-7)
iPhone 7 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-7-Plus)
iPhone SE (com.apple.CoreSimulator.SimDeviceType.iPhone-SE)
iPad 2 (com.apple.CoreSimulator.SimDeviceType.iPad-2)
iPad Retina (com.apple.CoreSimulator.SimDeviceType.iPad-Retina)
iPad Air (com.apple.CoreSimulator.SimDeviceType.iPad-Air)
iPad Air 2 (com.apple.CoreSimulator.SimDeviceType.iPad-Air-2)
iPad (5th generation) (com.apple.CoreSimulator.SimDeviceType.iPad--5th-generation-)
iPad Pro (9.7-inch) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro--9-7-inch-)
iPad Pro (12.9-inch) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro)
iPad Pro (12.9-inch) (2nd generation) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro--12-9-inch---2nd-generation-)
iPad Pro (10.5-inch) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro--10-5-inch-)
Apple TV 1080p (com.apple.CoreSimulator.SimDeviceType.Apple-TV-1080p)
Apple Watch - 38mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-38mm)
Apple Watch - 42mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-42mm)
Apple Watch Series 2 - 38mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-38mm)
Apple Watch Series 2 - 42mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-42mm)
== Runtimes ==
iOS 10.3 (10.3.1 - 14E8301) (com.apple.CoreSimulator.SimRuntime.iOS-10-3)
tvOS 10.2 (10.2 - 14W260) (com.apple.CoreSimulator.SimRuntime.tvOS-10-2)
watchOS 3.2 (3.2 - 14V243) (com.apple.CoreSimulator.SimRuntime.watchOS-3-2)
== Devices ==
-- iOS 10.3 --
    iPhone 5 (DA08F665-0EB6-4617-A871-70DAFEAA7D55) (Shutdown)
    iPhone 5s (1C44F26C-5CE0-447D-87E7-A22A5CA790D9) (Shutdown)
    iPhone 6 (25FCF877-1CB3-4FB1-B5F0-E77B23691EAF) (Shutdown)
    iPhone 6 Plus (A9882CB8-6696-41B6-89E8-37C3827813CE) (Shutdown)
    iPhone 6s (B393995F-7ACE-4E73-AD9A-B0C2BE501C1C) (Shutdown)
    iPhone 6s Plus (75D02448-EF60-4920-AA5B-849336481807) (Shutdown)
    iPhone 7 (404606B1-EAC0-42D6-98CF-B643B7622329) (Shutdown)
    iPhone 7 Plus (47CA8221-AA81-45A2-92AF-4BF9F8DF4EED) (Shutdown)
    iPhone SE (ABF721B9-243E-469E-8171-BDD35E30BD2E) (Shutdown)
    iPad Air (3A2B05CA-0D75-4233-BEFF-B4C4BD060356) (Shutdown)
    iPad Air 2 (FB858418-F833-4D75-9325-0563C1C91B65) (Shutdown)
    iPad (5th generation) (A4CC8247-6BB7-4690-94F0-2DB84D17C446) (Shutdown)
    iPad Pro (9.7 inch) (72B48FAA-ABF0-44B7-A997-B80A8190B8FA) (Shutdown)
    iPad Pro (12.9 inch) (8D93C4F2-2A0D-43D6-88A4-A8F78395271C) (Shutdown)
    iPad Pro (12.9-inch) (2nd generation) (28B1B5C2-1B2A-42BB-969A-E3268E765ED3) (Shutdown)
    iPad Pro (10.5-inch) (2E386004-B682-460E-A520-833F967C583A) (Shutdown)
-- tvOS 10.2 --
    Apple TV 1080p (B2DB509A-FFF3-44BD-9582-2A5B71A620B0) (Shutdown)
-- watchOS 3.2 --
    Apple Watch - 38mm (00B99F85-A047-4F16-ADB9-9AE9E69BE4E3) (Shutdown)
    Apple Watch - 42mm (86D08EC4-B0CC-423D-B565-53E8518AD3FF) (Shutdown)
    Apple Watch Series 2 - 38mm (EB72EAAF-0D4D-4094-9C36-7EB50D70DA40) (Shutdown)
    Apple Watch Series 2 - 42mm (9F9439F9-20B4-4D69-843B-43A36DB43554) (Shutdown)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.iOS-10-0 --
    iPhone 5 (E0DDE06E-0B44-4DA7-8BA2-D975034DBAD8) (Shutdown) (unavailable, runtime profile not found)
    iPhone 5s (46056B87-AA83-49E5-86B3-C0F3DA5307C3) (Shutdown) (unavailable, runtime profile not found)
    iPhone 6 (3D860853-F907-448B-B9EA-B5C5A0884DD4) (Shutdown) (unavailable, runtime profile not found)
    iPhone 6 Plus (572436CC-A089-4708-87C5-FC80F28F82BF) (Shutdown) (unavailable, runtime profile not found)
    iPhone 6s (6A647764-4637-4E1F-951C-3EB06D462D58) (Shutdown) (unavailable, runtime profile not found)
    iPhone 6s Plus (30A4D170-6B5C-456C-B58D-42C76B6B6AB9) (Shutdown) (unavailable, runtime profile not found)
    iPhone 7 (B4A01922-4953-4FFA-8C0B-293ADB8460B4) (Shutdown) (unavailable, runtime profile not found)
    iPhone 7 Plus (8E0548A4-4807-453C-8E02-0B487C7D6F41) (Shutdown) (unavailable, runtime profile not found)
    iPhone SE (85D70616-6C58-4B11-B07A-FD1F407CDDB2) (Shutdown) (unavailable, runtime profile not found)
    iPad Retina (90FF3446-7FF9-4DCA-9468-F671D62CE19F) (Shutdown) (unavailable, runtime profile not found)
    iPad Air (A83BE0BF-834F-4BFF-AE35-2A2475713D91) (Shutdown) (unavailable, runtime profile not found)
    iPad Air 2 (9CF4BDA8-767E-4F67-A6A5-0995DB3D8FC0) (Shutdown) (unavailable, runtime profile not found)
    iPad Pro (9.7 inch) (EF270036-748D-4471-A713-C29E2DD10CC8) (Shutdown) (unavailable, runtime profile not found)
    iPad Pro (12.9 inch) (6FD7407E-F980-4EF7-96EC-F89DD82BE0E2) (Shutdown) (unavailable, runtime profile not found)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.iOS-10-1 --
    iPhone 5 (40897D98-B4D7-439B-B1C6-4510B76853D8) (Shutdown) (unavailable, runtime profile not found)
    iPhone 5s (800F24D3-E118-4357-B5BF-598AD9BB9C1B) (Shutdown) (unavailable, runtime profile not found)
    iPhone 6 (57D0C15B-7FE5-4EA0-9107-F9D766705DF0) (Shutdown) (unavailable, runtime profile not found)
    iPhone 6 Plus (A314ADB9-45AD-44A1-9571-AE01DF363445) (Shutdown) (unavailable, runtime profile not found)
    iPhone 6s (3EA092F7-7F28-42CE-95F6-D7BA8D8DC82A) (Shutdown) (unavailable, runtime profile not found)
    iPhone 6s Plus (446BF3B0-EC2E-45BA-8603-BD13004D97F4) (Shutdown) (unavailable, runtime profile not found)
    iPhone 7 (3835F193-3C44-43F6-8A82-1BEEB59FB848) (Creating) (unavailable, runtime profile not found)
    iPhone 7 Plus (3CC016A1-1F0F-43C6-B2C7-F8A283EFD279) (Creating) (unavailable, runtime profile not found)
    iPhone SE (CE64DC4A-4EA2-4E00-A2D1-B80BAFF68A7F) (Shutdown) (unavailable, runtime profile not found)
    iPad Retina (E628072B-E778-4C25-A9A5-62C1EDEC5C35) (Shutdown) (unavailable, runtime profile not found)
    iPad Air (926B9B29-77A5-4FBD-A31D-6199A24A60CA) (Shutdown) (unavailable, runtime profile not found)
    iPad Air 2 (8DD577BB-94C7-4716-99F0-F4A2D30C657E) (Shutdown) (unavailable, runtime profile not found)
    iPad Pro (9.7 inch) (8655D89D-611B-419E-A6F7-90294EF70415) (Shutdown) (unavailable, runtime profile not found)
    iPad Pro (12.9 inch) (810C1307-1091-478B-87C4-A83D2D7D6515) (Shutdown) (unavailable, runtime profile not found)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.iOS-10-2 --
    iPhone 5 (5E5F6B3D-22EC-4946-8A09-1BEF6930F340) (Shutdown) (unavailable, runtime profile not found)
    iPhone 5s (738B15C4-5B66-4FF8-A3EF-8F26433B07DB) (Shutdown) (unavailable, runtime profile not found)
    iPhone 6 (275FF7E3-8487-428D-BAEB-60B8EDFBF5E1) (Shutdown) (unavailable, runtime profile not found)
    iPhone 6 Plus (F1FD3361-813B-45D8-9C55-796D5638446A) (Shutdown) (unavailable, runtime profile not found)
    iPhone 6s (33E7042A-61F5-4CD5-BEF6-EE8F84D59874) (Shutdown) (unavailable, runtime profile not found)
    iPhone 6s Plus (40095A93-CB49-4FE4-B275-C469C925A1C5) (Shutdown) (unavailable, runtime profile not found)
    iPhone 7 (67932439-AFDC-4AD9-83D9-2C47E71ED2AF) (Shutdown) (unavailable, runtime profile not found)
    iPhone 7 Plus (9FB79A29-CF51-4ADE-B0DE-5AF3E4AA7BB6) (Shutdown) (unavailable, runtime profile not found)
    iPhone SE (BE983365-1FA5-4C78-8B05-6955A7002093) (Shutdown) (unavailable, runtime profile not found)
    iPad Retina (42E5AE38-6AFC-4749-A206-B23C5D2BCBE4) (Shutdown) (unavailable, runtime profile not found)
    iPad Air (6FE1861A-6A64-4FAF-A90D-F0A685DF7F59) (Shutdown) (unavailable, runtime profile not found)
    iPad Air 2 (24F621DF-5CD2-40F7-92FD-302EC14D1589) (Shutdown) (unavailable, runtime profile not found)
    iPad Pro (9.7 inch) (5CB6E55E-EE3C-446F-A3B2-AC864A6AEEDC) (Shutdown) (unavailable, runtime profile not found)
    iPad Pro (12.9 inch) (F7028B1D-0FA8-4863-8C28-DAA294CB7CFD) (Shutdown) (unavailable, runtime profile not found)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.tvOS-10-0 --
    Apple TV 1080p (E4862CC9-C667-4EA3-807C-FB3BF831945B) (Shutdown) (unavailable, runtime profile not found)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.tvOS-10-1 --
    Apple TV 1080p (5E054DF5-B93D-422B-896E-4246E32E8EB0) (Shutdown) (unavailable, runtime profile not found)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.watchOS-3-0 --
    Apple Watch - 38mm (03B229C5-3E27-45DC-A44F-9CB5C1057BAC) (Shutdown) (unavailable, runtime profile not found)
    Apple Watch - 42mm (FFA5E223-2681-4AAB-87D3-325EF91ACF97) (Shutdown) (unavailable, runtime profile not found)
    Apple Watch Series 2 - 38mm (B2EF09DA-E8DA-4CEA-8DE1-40418796FD0E) (Shutdown) (unavailable, runtime profile not found)
    Apple Watch Series 2 - 42mm (C896E3FB-55CF-4316-BE84-6AC3E802980D) (Shutdown) (unavailable, runtime profile not found)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.watchOS-3-1 --
    Apple Watch - 38mm (F7E6E592-CFBC-4F07-9934-6DA080D996B5) (Shutdown) (unavailable, runtime profile not found)
    Apple Watch - 42mm (8AC96EF7-2BF8-4667-B345-93A42D400DE1) (Shutdown) (unavailable, runtime profile not found)
    Apple Watch Series 2 - 38mm (1C9B3AF8-8243-4BD1-A81F-FF6DB508E195) (Shutdown) (unavailable, runtime profile not found)
    Apple Watch Series 2 - 42mm (4A0EF66B-56D1-4AB5-A7E0-3A24DB090C7C) (Shutdown) (unavailable, runtime profile not found)
== Device Pairs ==
10AD3AA2-BDDE-47DE-9A8D-D0E39087E66E (active, disconnected)
    Watch: Apple Watch - 38mm (00B99F85-A047-4F16-ADB9-9AE9E69BE4E3) (Shutdown)
    Phone: iPhone 6s (B393995F-7ACE-4E73-AD9A-B0C2BE501C1C) (Shutdown)
DBCB92E1-B20B-4972-B92A-8EB8700CE891 (active, disconnected)
    Watch: Apple Watch - 42mm (86D08EC4-B0CC-423D-B565-53E8518AD3FF) (Shutdown)
    Phone: iPhone 6s Plus (75D02448-EF60-4920-AA5B-849336481807) (Shutdown)
A9B7923F-56CC-46BD-BD48-4E02C8F1E746 (active, disconnected)
    Watch: Apple Watch Series 2 - 38mm (EB72EAAF-0D4D-4094-9C36-7EB50D70DA40) (Shutdown)
    Phone: iPhone 7 (404606B1-EAC0-42D6-98CF-B643B7622329) (Shutdown)
CB440BCA-4AE1-49BA-B3D5-7424FFE3C17B (active, disconnected)
    Watch: Apple Watch Series 2 - 42mm (9F9439F9-20B4-4D69-843B-43A36DB43554) (Shutdown)
    Phone: iPhone 7 Plus (47CA8221-AA81-45A2-92AF-4BF9F8DF4EED) (Shutdown)
9392F337-B1EF-4492-A301-CD5EA3F539D0 (unavailable)
    Watch: Apple Watch Series 2 - 38mm (B2EF09DA-E8DA-4CEA-8DE1-40418796FD0E) (Shutdown)
    Phone: iPhone 7 (B4A01922-4953-4FFA-8C0B-293ADB8460B4) (Shutdown)
938B37FF-5D2E-4CF8-96DA-2CCE0BA46D21 (unavailable)
    Watch: Apple Watch Series 2 - 42mm (C896E3FB-55CF-4316-BE84-6AC3E802980D) (Shutdown)
    Phone: iPhone 7 Plus (8E0548A4-4807-453C-8E02-0B487C7D6F41) (Shutdown)
334C60BA-5B95-41FB-97B3-50DF28B02F19 (unavailable)
    Watch: Apple Watch Series 2 - 38mm (1C9B3AF8-8243-4BD1-A81F-FF6DB508E195) (Shutdown)
    Phone: iPhone 7 (67932439-AFDC-4AD9-83D9-2C47E71ED2AF) (Shutdown)
552BE65F-34CA-4008-9EF3-82FD90FA1DA4 (unavailable)
    Watch: Apple Watch Series 2 - 42mm (4A0EF66B-56D1-4AB5-A7E0-3A24DB090C7C) (Shutdown)
    Phone: iPhone 7 Plus (9FB79A29-CF51-4ADE-B0DE-5AF3E4AA7BB6) (Shutdown)
ExtremeMan commented 7 years ago

Yeah, looks like no devices are available. Go to Xcode -> Devices and try creating new.

ProfessaA commented 7 years ago

@ExtremeMan I'm also running into this crash and I do have the appropriate devices available.

It looks like there's a mismatch between the -[SimRuntime versionString], which includes the patch version (10.3.1), and the Version entry in the iPhoneSimulator sdk's SDKSettings.plist file, which is just the major and minor version (10.3). I don't recall how it was before but maybe Xcode 8.3.3 changed the behavior of -[SimRuntime versionString] to include the patch version as well.

Does this seem like a legitimate bug? I've made local changes to drop the patch version extracted from -[SimRuntime versionString] and everything works. Should I open a PR?

ExtremeMan commented 7 years ago

I am happy to review your PR!

ProfessaA commented 7 years ago

I put a PR up at https://github.com/facebook/xctool/pull/733. thanks for taking a look!