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

NSInternalInconsistencyException when building Xcode 9 / Swift 4 project #744

Closed dlo closed 6 years ago

dlo commented 6 years ago

I'm trying to get my tests to pass for one of my OSS projects with Travis CI and ran into the following exception:

$ xctool -scheme QuickTableView-Example -workspace QuickTableView.xcworkspace
[Info] Loading settings for scheme 'QuickTableView-Example' ... (2013 ms)

=== BUILD ===

  xcodebuild build QuickTableView-Example
2017-11-27 19:41:36.675 xctool[14077:533999] *** Assertion failure in BOOL LaunchXcodebuildTaskAndFeedEventsToReporters(NSTask *__strong, NSArray *__strong, NSString *__autoreleasing *, long long *)_block_invoke(), /tmp/xctool-20171031-25148-trrh1c/xctool-0.3.4/Common/XCToolUtil.m:418
2017-11-27 19:41:36.677 xctool[14077:533999] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Got error while trying to deserialize event '=== BUILD TARGET Nimble OF PROJECT Pods WITH CONFIGURATION Debug ===': The data is not in the correct format.'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff449eb2fb __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x00007fff6b35cc76 objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff449f1092 +[NSException raise:format:arguments:] + 98
    3   Foundation                          0x00007fff46b366db -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 165
    4   xctool                              0x0000000104a16373 __LaunchXcodebuildTaskAndFeedEventsToReporters_block_invoke + 790
    5   xctool                              0x0000000104a54758 __ReadOutputsAndFeedOuputLinesToBlockOnQueue_block_invoke + 172
    6   xctool                              0x0000000104a54a79 __ReadOutputsAndFeedOuputLinesToBlockOnQueue_block_invoke.26 + 634
    7   xctool                              0x0000000104a54bde __ReadOutputsAndFeedOuputLinesToBlockOnQueue_block_invoke_2.49 + 182
    8   libdispatch.dylib                   0x00007fff6bf3aaa0 ___dispatch_operation_deliver_data_block_invoke + 110
    9   libdispatch.dylib                   0x00007fff6bf196cd _dispatch_call_block_and_release + 12
    10  libdispatch.dylib                   0x00007fff6bf11e88 _dispatch_client_callout + 8
    11  libdispatch.dylib                   0x00007fff6bf26356 _dispatch_queue_serial_drain + 635
    12  libdispatch.dylib                   0x00007fff6bf19239 _dispatch_queue_invoke + 373
    13  libdispatch.dylib                   0x00007fff6bf261b9 _dispatch_queue_serial_drain + 222
    14  libdispatch.dylib                   0x00007fff6bf19239 _dispatch_queue_invoke + 373
    15  libdispatch.dylib                   0x00007fff6bf27042 _dispatch_root_queue_drain_deferred_wlh + 332
    16  libdispatch.dylib                   0x00007fff6bf2ae1b _dispatch_workloop_worker_thread + 880
    17  libsystem_pthread.dylib             0x00007fff6c1d5033 _pthread_wqthread + 980
    18  libsystem_pthread.dylib             0x00007fff6c1d4c4d start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Abort trap: 6

Repro instructions:

  1. Download/clone QuickTableView
  2. Run xctool -scheme QuickTableView-Example -workspace Example/QuickTableView.xcworkspace
ExtremeMan commented 6 years ago

It should actually fail earlier. Sorry about that. Building with xctool isn't support since Xcode 9. You can only run tests.

dlo commented 6 years ago

Got it, thanks!

revolter commented 6 years ago

For others coming here, that means adding run-tests at the end of the command.