Activity cannot be used after its scope has completed

Originator:kerr.miller
Number:rdar://35318981 Date Originated:November 2 2017
Status:Open | Dupe (31962643) Resolved:
Product:Developer Tools Product Version:
Classification: Reproducible:
 
Summary:
When running tests via XCUITest on occasion, although fairly regularly, we receive an error from XCTest with the exception: 'NSInternalInconsisntencyException' and the message 'Activity cannot be used after its scope has completed'. This only seems to happen when running more than one test, and when in the `setUp` method of the test class we are launching the app.

Steps to Reproduce:
Run a UI test suite with a set of tests.

Expected Results:
The tests run and pass

Actual Results:
The app never finishes launching completely, so the test fails when trying to find the first element in the the test execution.

Version/Build:
Xcode 9, iPhone 8 simulator, but happens on other simulators as well.

Comments

Same with us. This is a real bummer for us and most of our tests on CI fail with this error.

Still reproducing on xCode 9.1. This bug is the real bummer for us.

By evsyuchenya at Nov. 13, 2017, 5:37 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!