Skip to content

Xcode 11.4 beta (11N111s) XCTestCase does not have internalImplementation  #13949

@bottotl

Description

@bottotl

The problem

Xcode 11.4 beta (11N111s) XCTestCase does not have internalImplementation

it will crash at runtime
(_XCTestCaseImplementation *)[FBXCTestCaseImplementationFailureHoldingProxy proxyWithXCTestCaseImplementation:self.internalImplementation];

I use objc runtime log all method of XCTestCase, did no have internalImplementation found

  unsigned int count = 0;
  Method *list = class_copyMethodList(XCTestCase.class, &count);
  for (unsigned int i = 0; i < count; i++) {
    struct objc_method_description *des = method_getDescription(list[i]);
    SEL sel = des->name;
    NSLog(@"%@", NSStringFromSelector(sel));
  }
2020-02-17 12:07:01.478802+0800 WebDriverAgentRunner-Runner[68633:654356] waitForExpectations:timeout:
2020-02-17 12:07:01.478897+0800 WebDriverAgentRunner-Runner[68633:654356] startActivityWithTitle:block:
2020-02-17 12:07:01.478966+0800 WebDriverAgentRunner-Runner[68633:654356] addUIInterruptionMonitorWithDescription:handler:
2020-02-17 12:07:01.479037+0800 WebDriverAgentRunner-Runner[68633:654356] removeUIInterruptionMonitor:
2020-02-17 12:07:01.479148+0800 WebDriverAgentRunner-Runner[68633:654356] _currentWaiter
2020-02-17 12:07:01.479227+0800 WebDriverAgentRunner-Runner[68633:654356] _expectations
2020-02-17 12:07:01.479288+0800 WebDriverAgentRunner-Runner[68633:654356] set_currentWaiter:
2020-02-17 12:07:01.479401+0800 WebDriverAgentRunner-Runner[68633:654356] waitForExpectations:timeout:enforceOrder:
2020-02-17 12:07:01.479546+0800 WebDriverAgentRunner-Runner[68633:654356] _resetExpectations
2020-02-17 12:07:01.479624+0800 WebDriverAgentRunner-Runner[68633:654356] _dequeueFailures
2020-02-17 12:07:01.479687+0800 WebDriverAgentRunner-Runner[68633:654356] _resetExpectationsInArray:
2020-02-17 12:07:01.479755+0800 WebDriverAgentRunner-Runner[68633:654356] _addExpectation:
2020-02-17 12:07:01.479820+0800 WebDriverAgentRunner-Runner[68633:654356] expectationForNotification:object:notificationCenter:handler:
2020-02-17 12:07:01.479929+0800 WebDriverAgentRunner-Runner[68633:654356] _symbolicationRecordForTestCodeInAddressStack:
2020-02-17 12:07:01.480033+0800 WebDriverAgentRunner-Runner[68633:654356] _enqueueFailureWithDescription:inFile:atLine:expected:interruptTest:breakWhenDequeued:
2020-02-17 12:07:01.480131+0800 WebDriverAgentRunner-Runner[68633:654356] keyValueObservingExpectationForObject:keyPath:expectedValue:
2020-02-17 12:07:01.480234+0800 WebDriverAgentRunner-Runner[68633:654356] keyValueObservingExpectationForObject:keyPath:handler:
2020-02-17 12:07:01.480338+0800 WebDriverAgentRunner-Runner[68633:654356] expectationForNotification:object:handler:
2020-02-17 12:07:01.480428+0800 WebDriverAgentRunner-Runner[68633:654356] expectationForPredicate:evaluatedWithObject:handler:
2020-02-17 12:07:01.480524+0800 WebDriverAgentRunner-Runner[68633:654356] waiter:didTimeoutWithUnfulfilledExpectations:
2020-02-17 12:07:01.480647+0800 WebDriverAgentRunner-Runner[68633:654356] waiter:fulfillmentDidViolateOrderingConstraintsForExpectation:requiredExpectation:
2020-02-17 12:07:01.480723+0800 WebDriverAgentRunner-Runner[68633:654356] waiter:didFulfillInvertedExpectation:
2020-02-17 12:07:01.480826+0800 WebDriverAgentRunner-Runner[68633:654356] nestedWaiter:wasInterruptedByTimedOutWaiter:
2020-02-17 12:07:01.480910+0800 WebDriverAgentRunner-Runner[68633:654356] _expectationForDarwinNotification:
2020-02-17 12:07:01.481017+0800 WebDriverAgentRunner-Runner[68633:654356] _expectationForDistributedNotification:object:handler:
2020-02-17 12:07:01.481147+0800 WebDriverAgentRunner-Runner[68633:654356] _recordValues:forPerformanceMetricID:name:unitsOfMeasurement:baselineName:baselineAverage:maxPercentRegression:maxPercentRelativeStandardDeviation:maxRegression:maxStandardDeviation:file:line:
2020-02-17 12:07:01.481342+0800 WebDriverAgentRunner-Runner[68633:654356] activityAggregateStatistics
2020-02-17 12:07:01.481452+0800 WebDriverAgentRunner-Runner[68633:654356] defaultExecutionOrderCompare:
2020-02-17 12:07:01.481586+0800 WebDriverAgentRunner-Runner[68633:654356] _requiredTestRunBaseClass
2020-02-17 12:07:01.481649+0800 WebDriverAgentRunner-Runner[68633:654356] performTest:
2020-02-17 12:07:01.481751+0800 WebDriverAgentRunner-Runner[68633:654356] setContinueAfterFailure:
2020-02-17 12:07:01.481848+0800 WebDriverAgentRunner-Runner[68633:654356] languageAgnosticTestMethodName
2020-02-17 12:07:01.481958+0800 WebDriverAgentRunner-Runner[68633:654356] runLoopNestingCount
2020-02-17 12:07:01.482108+0800 WebDriverAgentRunner-Runner[68633:654356] setShouldHaltWhenReceivesControl:
2020-02-17 12:07:01.482272+0800 WebDriverAgentRunner-Runner[68633:654356] _recordFailureWithDescription:inFile:atLine:expected:
2020-02-17 12:07:01.482362+0800 WebDriverAgentRunner-Runner[68633:654356] startActivityWithTitle:type:block:
2020-02-17 12:07:01.482439+0800 WebDriverAgentRunner-Runner[68633:654356] set_signpostID:
2020-02-17 12:07:01.482504+0800 WebDriverAgentRunner-Runner[68633:654356] registerDefaultMetrics
2020-02-17 12:07:01.482633+0800 WebDriverAgentRunner-Runner[68633:654356] _performSetUpSequenceWithSelector:
2020-02-17 12:07:01.482756+0800 WebDriverAgentRunner-Runner[68633:654356] skippedTestContext
2020-02-17 12:07:01.482913+0800 WebDriverAgentRunner-Runner[68633:654356] _needsErrorHandling
2020-02-17 12:07:01.483036+0800 WebDriverAgentRunner-Runner[68633:654356] _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:
2020-02-17 12:07:01.483157+0800 WebDriverAgentRunner-Runner[68633:654356] _dequeueAndReportBackgroundAttachments
2020-02-17 12:07:01.483399+0800 WebDriverAgentRunner-Runner[68633:654356] _recordFailureForCaughtError:usingContextFromIssue:
2020-02-17 12:07:01.483555+0800 WebDriverAgentRunner-Runner[68633:654356] setSkippedTestContext:
2020-02-17 12:07:01.483721+0800 WebDriverAgentRunner-Runner[68633:654356] _reportFailuresForUnwaitedExpectations
2020-02-17 12:07:01.483857+0800 WebDriverAgentRunner-Runner[68633:654356] testCaseRun
2020-02-17 12:07:01.483921+0800 WebDriverAgentRunner-Runner[68633:654356] _recordSkipWithContext:
2020-02-17 12:07:01.484026+0800 WebDriverAgentRunner-Runner[68633:654356] _performTearDownSequenceWithSelector:
2020-02-17 12:07:01.484137+0800 WebDriverAgentRunner-Runner[68633:654356] _recordFailure:
2020-02-17 12:07:01.484247+0800 WebDriverAgentRunner-Runner[68633:654356] primaryThread
2020-02-17 12:07:01.484326+0800 WebDriverAgentRunner-Runner[68633:654356] filePathForNestedFailure
2020-02-17 12:07:01.484432+0800 WebDriverAgentRunner-Runner[68633:654356] setFilePathForNestedFailure:
2020-02-17 12:07:01.484518+0800 WebDriverAgentRunner-Runner[68633:654356] setLineNumberForNestedFailure:
2020-02-17 12:07:01.484623+0800 WebDriverAgentRunner-Runner[68633:654356] setPrimaryThread:
2020-02-17 12:07:01.484723+0800 WebDriverAgentRunner-Runner[68633:654356] setTestCaseRun:
2020-02-17 12:07:01.484798+0800 WebDriverAgentRunner-Runner[68633:654356] setRunLoopNestingCount:
2020-02-17 12:07:01.484898+0800 WebDriverAgentRunner-Runner[68633:654356] shouldHaltWhenReceivesControl
2020-02-17 12:07:01.485020+0800 WebDriverAgentRunner-Runner[68633:654356] _interruptTest
2020-02-17 12:07:01.485122+0800 WebDriverAgentRunner-Runner[68633:654356] invokeTest
2020-02-17 12:07:01.485255+0800 WebDriverAgentRunner-Runner[68633:654356] setActivityAggregateStatistics:
2020-02-17 12:07:01.485375+0800 WebDriverAgentRunner-Runner[68633:654356] _perfMetricsForID
2020-02-17 12:07:01.485469+0800 WebDriverAgentRunner-Runner[68633:654356] set_perfMetricsForID:
2020-02-17 12:07:01.485573+0800 WebDriverAgentRunner-Runner[68633:654356] setUpTestWithSelector:
2020-02-17 12:07:01.485687+0800 WebDriverAgentRunner-Runner[68633:654356] _runTeardownBlocks
2020-02-17 12:07:01.485763+0800 WebDriverAgentRunner-Runner[68633:654356] _stopTimeoutTimer
2020-02-17 12:07:01.485862+0800 WebDriverAgentRunner-Runner[68633:654356] tearDownTestWithSelector:
2020-02-17 12:07:01.485968+0800 WebDriverAgentRunner-Runner[68633:654356] _teardownBlocks
2020-02-17 12:07:01.486053+0800 WebDriverAgentRunner-Runner[68633:654356] setHasDequeuedTeardownBlocks:
2020-02-17 12:07:01.486151+0800 WebDriverAgentRunner-Runner[68633:654356] _dequeueTeardownBlocks
2020-02-17 12:07:01.486244+0800 WebDriverAgentRunner-Runner[68633:654356] hasDequeuedTeardownBlocks
2020-02-17 12:07:01.486333+0800 WebDriverAgentRunner-Runner[68633:654356] addTeardownBlock:
2020-02-17 12:07:01.486448+0800 WebDriverAgentRunner-Runner[68633:654356] _logMemoryGraphData:withTitle:
2020-02-17 12:07:01.486514+0800 WebDriverAgentRunner-Runner[68633:654356] _instrument
2020-02-17 12:07:01.486613+0800 WebDriverAgentRunner-Runner[68633:654356] set_didStartMeasuring:
2020-02-17 12:07:01.486724+0800 WebDriverAgentRunner-Runner[68633:654356] _isMeasuringMetrics
2020-02-17 12:07:01.486799+0800 WebDriverAgentRunner-Runner[68633:654356] _didStartMeasuring
2020-02-17 12:07:01.486900+0800 WebDriverAgentRunner-Runner[68633:654356] _activePerformanceMetricIDs
2020-02-17 12:07:01.486989+0800 WebDriverAgentRunner-Runner[68633:654356] set_startWallClockTime:
2020-02-17 12:07:01.487120+0800 WebDriverAgentRunner-Runner[68633:654356] set_startUserTime:
2020-02-17 12:07:01.487254+0800 WebDriverAgentRunner-Runner[68633:654356] set_startSystemTime:
2020-02-17 12:07:01.487387+0800 WebDriverAgentRunner-Runner[68633:654356] set_didStopMeasuring:
2020-02-17 12:07:01.487475+0800 WebDriverAgentRunner-Runner[68633:654356] _didStopMeasuring
2020-02-17 12:07:01.487582+0800 WebDriverAgentRunner-Runner[68633:654356] _startWallClockTime
2020-02-17 12:07:01.487700+0800 WebDriverAgentRunner-Runner[68633:654356] _startUserTime
2020-02-17 12:07:01.487771+0800 WebDriverAgentRunner-Runner[68633:654356] _startSystemTime
2020-02-17 12:07:01.487888+0800 WebDriverAgentRunner-Runner[68633:654356] measureMetrics:automaticallyStartMeasuring:forBlock:
2020-02-17 12:07:01.487996+0800 WebDriverAgentRunner-Runner[68633:654356] measureWithMetrics:options:block:
2020-02-17 12:07:01.488139+0800 WebDriverAgentRunner-Runner[68633:654356] _didMeasureMetrics
2020-02-17 12:07:01.488227+0800 WebDriverAgentRunner-Runner[68633:654356] set_instrument:
2020-02-17 12:07:01.488362+0800 WebDriverAgentRunner-Runner[68633:654356] registerMetricID:name:unitString:
2020-02-17 12:07:01.488493+0800 WebDriverAgentRunner-Runner[68633:654356] reportMeasurements:forMetricID:reportFailures:
2020-02-17 12:07:01.488638+0800 WebDriverAgentRunner-Runner[68633:654356] set_didMeasureMetrics:
2020-02-17 12:07:01.488776+0800 WebDriverAgentRunner-Runner[68633:654356] _symbolicationRecordForAddress:
2020-02-17 12:07:01.488925+0800 WebDriverAgentRunner-Runner[68633:654356] reportMetric:reportFailures:
2020-02-17 12:07:01.489014+0800 WebDriverAgentRunner-Runner[68633:654356] baselinesDictionaryForTest
2020-02-17 12:07:01.489135+0800 WebDriverAgentRunner-Runner[68633:654356] set_isMeasuringMetrics:
2020-02-17 12:07:01.489208+0800 WebDriverAgentRunner-Runner[68633:654356] set_activePerformanceMetricIDs:
2020-02-17 12:07:01.489297+0800 WebDriverAgentRunner-Runner[68633:654356] set_measuringIteration:
2020-02-17 12:07:01.489450+0800 WebDriverAgentRunner-Runner[68633:654356] startMeasuring
2020-02-17 12:07:01.489650+0800 WebDriverAgentRunner-Runner[68633:654356] stopMeasuring
2020-02-17 12:07:01.489831+0800 WebDriverAgentRunner-Runner[68633:654356] _measuringIteration
2020-02-17 12:07:01.490000+0800 WebDriverAgentRunner-Runner[68633:654356] activityRecordStackDepth
2020-02-17 12:07:01.490134+0800 WebDriverAgentRunner-Runner[68633:654356] setExecutionTimeAllowance:
2020-02-17 12:07:01.490332+0800 WebDriverAgentRunner-Runner[68633:654356] executionTimeAllowance
2020-02-17 12:07:01.490619+0800 WebDriverAgentRunner-Runner[68633:654356] nameForLegacyLogging
2020-02-17 12:07:01.490923+0800 WebDriverAgentRunner-Runner[68633:654356] _effectiveExecutionTimeAllowance
2020-02-17 12:07:01.491035+0800 WebDriverAgentRunner-Runner[68633:654356] set_timeoutSource:
2020-02-17 12:07:01.491100+0800 WebDriverAgentRunner-Runner[68633:654356] _exceededExecutionTimeAllowance
2020-02-17 12:07:01.491195+0800 WebDriverAgentRunner-Runner[68633:654356] _preciseTimeoutsEnabled
2020-02-17 12:07:01.491297+0800 WebDriverAgentRunner-Runner[68633:654356] _reportFailuresAtFile:line:forTestAssertionsInScope:
2020-02-17 12:07:01.491395+0800 WebDriverAgentRunner-Runner[68633:654356] _purgeTeardownBlocks
2020-02-17 12:07:01.491517+0800 WebDriverAgentRunner-Runner[68633:654356] _addTeardownBlock:
2020-02-17 12:07:01.491626+0800 WebDriverAgentRunner-Runner[68633:654356] beforeTestIteration:selector:
2020-02-17 12:07:01.491746+0800 WebDriverAgentRunner-Runner[68633:654356] afterTestIteration:selector:
2020-02-17 12:07:01.491875+0800 WebDriverAgentRunner-Runner[68633:654356] numberOfTestIterationsForTestWithSelector:
2020-02-17 12:07:01.491961+0800 WebDriverAgentRunner-Runner[68633:654356] _logMemoryGraphDataFromFilePath:withTitle:
2020-02-17 12:07:01.492066+0800 WebDriverAgentRunner-Runner[68633:654356] measureWithMetrics:block:
2020-02-17 12:07:01.492200+0800 WebDriverAgentRunner-Runner[68633:654356] registerMetricID:name:unit:
2020-02-17 12:07:01.492268+0800 WebDriverAgentRunner-Runner[68633:654356] _logAndReportPerformanceMetrics:perfMetricResultsForIDs:withBaselinesForTest:defaultBaselinesForPerfMetricID:
2020-02-17 12:07:01.492396+0800 WebDriverAgentRunner-Runner[68633:654356] _logAndReportPerformanceMetrics:perfMetricResultsForIDs:withBaselinesForTest:
2020-02-17 12:07:01.492521+0800 WebDriverAgentRunner-Runner[68633:654356] recordActivityWithFormat:
2020-02-17 12:07:01.492643+0800 WebDriverAgentRunner-Runner[68633:654356] runActivityNamed:inScope:
2020-02-17 12:07:01.492741+0800 WebDriverAgentRunner-Runner[68633:654356] setMaxDurationInMinutes:
2020-02-17 12:07:01.492836+0800 WebDriverAgentRunner-Runner[68633:654356] maxDurationInMinutes
2020-02-17 12:07:01.492953+0800 WebDriverAgentRunner-Runner[68633:654356] set_expectations:
2020-02-17 12:07:01.493097+0800 WebDriverAgentRunner-Runner[68633:654356] set_preciseTimeoutsEnabled:
2020-02-17 12:07:01.493169+0800 WebDriverAgentRunner-Runner[68633:654356] continueAfterFailure
2020-02-17 12:07:01.493274+0800 WebDriverAgentRunner-Runner[68633:654356] lineNumberForNestedFailure
2020-02-17 12:07:01.493379+0800 WebDriverAgentRunner-Runner[68633:654356] shouldSetShouldHaltWhenReceivesControl
2020-02-17 12:07:01.493468+0800 WebDriverAgentRunner-Runner[68633:654356] setShouldSetShouldHaltWhenReceivesControl:
2020-02-17 12:07:01.493555+0800 WebDriverAgentRunner-Runner[68633:654356] shouldIgnoreSubsequentFailures
2020-02-17 12:07:01.493654+0800 WebDriverAgentRunner-Runner[68633:654356] setShouldIgnoreSubsequentFailures:
2020-02-17 12:07:01.493747+0800 WebDriverAgentRunner-Runner[68633:654356] hasAttemptedToCaptureScreenshotOnFailure
2020-02-17 12:07:01.493842+0800 WebDriverAgentRunner-Runner[68633:654356] setHasAttemptedToCaptureScreenshotOnFailure:
2020-02-17 12:07:01.493935+0800 WebDriverAgentRunner-Runner[68633:654356] _recordActivityWithFailure:
2020-02-17 12:07:01.494053+0800 WebDriverAgentRunner-Runner[68633:654356] isEqual:
2020-02-17 12:07:01.494119+0800 WebDriverAgentRunner-Runner[68633:654356] description
2020-02-17 12:07:01.494216+0800 WebDriverAgentRunner-Runner[68633:654356] .cxx_destruct
2020-02-17 12:07:01.494306+0800 WebDriverAgentRunner-Runner[68633:654356] dealloc
2020-02-17 12:07:01.494410+0800 WebDriverAgentRunner-Runner[68633:654356] init
2020-02-17 12:07:01.494519+0800 WebDriverAgentRunner-Runner[68633:654356] name
2020-02-17 12:07:01.494592+0800 WebDriverAgentRunner-Runner[68633:654356] bundle
2020-02-17 12:07:01.494683+0800 WebDriverAgentRunner-Runner[68633:654356] _identifier
2020-02-17 12:07:01.494771+0800 WebDriverAgentRunner-Runner[68633:654356] _startTimeoutTimer
2020-02-17 12:07:01.494896+0800 WebDriverAgentRunner-Runner[68633:654356] _timeoutSource
2020-02-17 12:07:01.495026+0800 WebDriverAgentRunner-Runner[68633:654356] _resetTimer
2020-02-17 12:07:01.495146+0800 WebDriverAgentRunner-Runner[68633:654356] addAttachment:
2020-02-17 12:07:01.495235+0800 WebDriverAgentRunner-Runner[68633:654356] initWithInvocation:
2020-02-17 12:07:01.495342+0800 WebDriverAgentRunner-Runner[68633:654356] invocation
2020-02-17 12:07:01.495458+0800 WebDriverAgentRunner-Runner[68633:654356] _signpostID
2020-02-17 12:07:01.495560+0800 WebDriverAgentRunner-Runner[68633:654356] attachmentManager
2020-02-17 12:07:01.495694+0800 WebDriverAgentRunner-Runner[68633:654356] failureRecords
2020-02-17 12:07:01.495804+0800 WebDriverAgentRunner-Runner[68633:654356] initWithSelector:
2020-02-17 12:07:01.495906+0800 WebDriverAgentRunner-Runner[68633:654356] testCaseCount
2020-02-17 12:07:01.496005+0800 WebDriverAgentRunner-Runner[68633:654356] recordFailureWithDescription:inFile:atLine:expected:
2020-02-17 12:07:01.496106+0800 WebDriverAgentRunner-Runner[68633:654356] testRunClass
2020-02-17 12:07:01.496214+0800 WebDriverAgentRunner-Runner[68633:654356] expectationWithDescription:
2020-02-17 12:07:01.496290+0800 WebDriverAgentRunner-Runner[68633:654356] waitForExpectationsWithTimeout:handler:
2020-02-17 12:07:01.496411+0800 WebDriverAgentRunner-Runner[68633:654356] setAttachmentManager:
2020-02-17 12:07:01.496539+0800 WebDriverAgentRunner-Runner[68633:654356] measureBlock:
2020-02-17 12:07:01.496657+0800 WebDriverAgentRunner-Runner[68633:654356] measureWithOptions:block:
2020-02-17 12:07:01.496730+0800 WebDriverAgentRunner-Runner[68633:654356] setInvocation:

Activity

mykola-mokhnach

mykola-mokhnach commented on Feb 17, 2020

@mykola-mokhnach
Collaborator

Could you please try if the fix appium/WebDriverAgent#286 works for you?

bottotl

bottotl commented on Feb 17, 2020

@bottotl
Author

Could you please try if the fix appium/WebDriverAgent#286 works for you?

Assertion Failure: :0: failed: caught "NSUnknownKeyException", "[<UITestingUITests 0x283524a50> valueForUndefinedKey:]: this class is not key value coding-compliant for the key internalImplementation."
(
0 CoreFoundation 0x00000001c54769a4 + 252
1 libobjc.A.dylib 0x00000001c464f9f8 objc_exception_throw + 56
2 CoreFoundation 0x00000001c5393e10 + 0
3 Foundation 0x00000001c5e5f8fc + 248
4 Foundation 0x00000001c5dd3e1c + 260
5 WebDriverAgentLib 0x0000000106de07e8 -[FBFailureProofTestCase setUp] + 132
6 XCTest 0x000000010465f4a4 __48-[XCTestCase _performSetUpSequenceWithSelector:]_block_invoke_2 + 492
7 XCTest 0x00000001046b4440 +[XCTestCase(Failures) performFailableBlock:testCase:testCaseRun:shouldInterruptTest:] + 84
8 XCTest 0x00000001046b4344 -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] + 132
9 XCTest 0x000000010465f298 __48-[XCTestCase _performSetUpSequenceWithSelector:]_block_invoke + 116
10 XCTest 0x00000001046c6018 -[XCTContext _runActivityNamed:type:block:] + 248
11 XCTest 0x0000000104667c9c -[XCTestCase startActivityWithTitle:type:block:] + 200
12 XCTest 0x0000000104667e4c -[XCTestCase startActivityWithTitle:block:] + 72
13 XCTest 0x000000010465f214 -[XCTestCase _performSetUpSequenceWithSelector:] + 108
14 XCTest 0x000000010465d584 -[XCTestCase invokeTest] + 728
15 XCTest 0x000000010465f0d4 __26-[XCTestCase performTest:]_block_invoke_2 + 44
16 XCTest 0x00000001046b4440 +[XCTestCase(Failures) performFailableBlock:testCase:testCaseRun:shouldInterruptTest:] + 84
17 XCTest 0x00000001046b4344 -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] + 132
18 XCTest 0x000000010465f00c __26-[XCTestCase performTest:]_block_invoke.366 + 96
19 XCTest 0x00000001046c6728 +[XCTContext runInContextForTestCase:block:] + 212
20 XCTest 0x000000010465e8f8 -[XCTestCase performTest:] + 540
21 XCTest 0x00000001046a1f74 -[XCTest runTest] + 60
22 XCTest 0x0000000104658de4 __27-[XCTestSuite performTest:]_block_invoke + 268
23 XCTest 0x0000000104658674 __59-[XCTestSuite _performProtectedSectionForTest:testSection:]_block_invoke + 40
24 XCTest 0x00000001046c6728 +[XCTContext runInContextForTestCase:block:] + 212
25 XCTest 0x000000010465861c -[XCTestSuite _performProtectedSectionForTest:testSection:] + 156
26 XCTest 0x000000010465896c -[XCTestSuite performTest:] + 320
27 XCTest 0x00000001046a1f74 -[XCTest runTest] + 60
28 XCTest 0x0000000104658de4 __27-[XCTestSuite performTest:]_block_invoke + 268
29 XCTest 0x0000000104658674 __59-[XCTestSuite _performProtectedSectionForTest:testSection:]_block_invoke + 40
30 XCTest 0x00000001046c6728 +[XCTContext runInContextForTestCase:block:] + 212
31 XCTest 0x000000010465861c -[XCTestSuite _performProtectedSectionForTest:testSection:] + 156
32 XCTest 0x000000010465896c -[XCTestSuite performTest:] + 320
33 XCTest 0x00000001046a1f74 -[XCTest runTest] + 60
34 XCTest 0x0000000104658de4 __27-[XCTestSuite performTest:]_block_invoke + 268
35 XCTest 0x0000000104658674 __59-[XCTestSuite _performProtectedSectionForTest:testSection:]_block_invoke + 40
36 XCTest 0x00000001046c6728 +[XCTContext runInContextForTestCase:block:] + 212
37 XCTest 0x000000010465861c -[XCTestSuite _performProtectedSectionForTest:testSection:] + 156
38 XCTest 0x000000010465896c -[XCTestSuite performTest:] + 320
39 XCTest 0x00000001046a1f74 -[XCTest runTest] + 60
40 XCTest 0x00000001046d88bc __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke + 176
41 XCTest 0x00000001046d89bc __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke.100 + 108
42 XCTest 0x0000000104672b70 -[XCTestObservationCenter _observeTestExecutionForBlock:] + 588
43 XCTest 0x00000001046d8654 -[XCTTestRunSession runTestsAndReturnError:] + 592
44 XCTest 0x000000010463d450 -[XCTestDriver runTestsAndReturnError:] + 428
45 XCTest 0x00000001046c26c0 _XCTestMain + 2396
46 WebDriverAgentRunner-Runner 0x000000010425b818 -[_XCTRunnerAppDelegate applicationWillResignActive:] + 0
47 WebDriverAgentRunner-Runner 0x000000010425b720 _XCTRunnerRunTests + 0
48 CoreFoundation 0x00000001c5408578 + 20
49 CoreFoundation 0x00000001c5407e7c + 272
50 CoreFoundation 0x00000001c5402ee0 + 1024
51 CoreFoundation 0x00000001c54027c0 CFRunLoopRunSpecific + 436
52 GraphicsServices 0x00000001c760379c GSEventRunModal + 104
53 UIKitCore 0x00000001f1f01c38 UIApplicationMain + 212
54 WebDriverAgentRunner-Runner 0x000000010425b9e4 main + 192
55 libdyld.dylib 0x00000001c4ec68e0 + 4
)

mykola-mokhnach

mykola-mokhnach commented on Feb 17, 2020

@mykola-mokhnach
Collaborator

Thanks, how about now?

bottotl

bottotl commented on Feb 17, 2020

@bottotl
Author

Thanks, how about now?

I tried appium/WebDriverAgent#286 .
this code cause crash also

[self valueForKey:@"internalImplementation"]

Assertion Failure: :0: failed: caught "NSUnknownKeyException", "[<UITestingUITests 0x283524a50> valueForUndefinedKey:]: this class is not key value coding-compliant for the key internalImplementation."

I use following code, it will not crash at runtime
but I got Test Case '-[UITestingUITests testRunner]' failed

//  if (nil != [self valueForKey:@"internalImplementation"]) {
//    self.internalImplementation =
//      (_XCTestCaseImplementation *)[FBXCTestCaseImplementationFailureHoldingProxy
//                                    proxyWithXCTestCaseImplementation:self.internalImplementation];
//  } else {
    // https://github.com/appium/appium/issues/13949
    self.shouldSetShouldHaltWhenReceivesControl = @NO;
    self.shouldHaltWhenReceivesControl = @NO;
//  }
mykola-mokhnach

mykola-mokhnach commented on Feb 17, 2020

@mykola-mokhnach
Collaborator

I did change that KVO verification to [self respondsToSelector:@selector(internalImplementation)]. Could you please try with that change?

mykola-mokhnach

mykola-mokhnach commented on Feb 17, 2020

@mykola-mokhnach
Collaborator

but I got Test Case '-[UITestingUITests testRunner]' failed

was it supposed to fail? what is the expected result?

bottotl

bottotl commented on Feb 17, 2020

@bottotl
Author

but I got Test Case '-[UITestingUITests testRunner]' failed

was it supposed to fail? what is the expected result?

[FBWebServer startServing] will be fail.(Unexpected test interruption without any failures reported)
WX20200217-180305@2x

if it not response internalImplementation, self.internalImplementation will be nil.As I know this instance can not be nil.

mykola-mokhnach

mykola-mokhnach commented on Feb 17, 2020

@mykola-mokhnach
Collaborator

Strange, I don't observe such problem...
@KazuCocoa Does the recent change work for you?

bottotl

bottotl commented on Feb 17, 2020

@bottotl
Author

Strange, I don't observe such problem...
@KazuCocoa Does the recent change work for you?

I think Apple may delete some private property like internalImplementation in 11.4- iOS 13.4 sdk. Is that mean after 13.4, wda can no longer be used?

KazuCocoa

KazuCocoa commented on Feb 17, 2020

@KazuCocoa
Member

With e358ecf8190994dd7ba7d54d451288400e052879 , the WDA ran on iOS 13.4 simulator without #13949 (comment) error. The version was 11n111s.

I only tried /source endpoint though.
What endpoint did you call when the error happened?

Definitely Apple added/removed many APIs, but I could not find removed APIs which were used in WDA except for internalImplementation

bottotl

bottotl commented on Feb 17, 2020

@bottotl
Author

I use 11.4 beta (11N111s) too, with 14f5f7be61e287724615a026129267a10bb1e5a6 , the WDA ran on iOS 13.4 iphone 11 simulator. Stil get Test Case '-[UITestingUITests testRunner]' failed
error

KazuCocoa

KazuCocoa commented on Feb 17, 2020

@KazuCocoa
Member

The hash is appium/WDA master.
Mykola's recommendation is the latest appium/WebDriverAgent#286 's change. The hash should be e358ecf8190994dd7ba7d54d451288400e052879

bottotl

bottotl commented on Feb 17, 2020

@bottotl
Author

it's so strange... i copy code from e358ecf8190994dd7ba7d54d451288400e052879 got error above. Checkout e358ecf8190994dd7ba7d54d451288400e052879 works fine for me.
thanks!

nimaiwalsh

nimaiwalsh commented on Mar 30, 2020

@nimaiwalsh

Also had this issue when upgrading to Xcode 11.4. Here are the steps to fix:

  1. Clone the updated WebDriverAgent repo to your computer: https://github.com/appium/WebDriverAgent
  2. Open Appium’s WebDriverAgent folder appium-webdriveragent
  3. Copy WebDriverAgent contents from step 1 into your Appiums appium-webdriveragent folder and replace all
  4. Open the WebDriverAgent project in Xcode, and resign the project.
  5. Rebuild WDA onto your iPhone
imurchie

imurchie commented on Mar 31, 2020

@imurchie
Contributor

Copying should not be necessary. You can provide the path to the clones repository in the bootstrapPath capability.

jianghuihon

jianghuihon commented on Jun 21, 2024

@jianghuihon

您可以尝试一下修复appium/WebDriverAgent#286是否有效吗?

I have verified that although it does not crash, my device system is iOS10.0.2, which reminds MJPEG server cannot start because the current iOS version is not supported, If I want to support this version of the system, what branch of node should I retrieve it on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    XCUITestregarding xcuitest driver

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @imurchie@KazuCocoa@mykola-mokhnach@bottotl@nimaiwalsh

        Issue actions

          Xcode 11.4 beta (11N111s) XCTestCase does not have internalImplementation · Issue #13949 · appium/appium