kif-framework / KIF

Keep It Functional - An iOS Functional Testing Framework
Other
6.21k stars 914 forks source link

Xcode11 tapStatusBar caught Exception #1122

Open LWX124 opened 5 years ago

LWX124 commented 5 years ago

caught "NSInternalInconsistencyException", "App called -statusBar or -statusBarWindow on UIApplication: this code must be changed as there's no longer a status bar or status bar window. Use the statusBarManager object on the window scene instead." ( 0 CoreFoundation 0x00007fff23b98bde exceptionPreprocess + 350 1 libobjc.A.dylib 0x00007fff503b5b20 objc_exception_throw + 48 2 CoreFoundation 0x00007fff23b98958 +[NSException raise:format:arguments:] + 88 3 Foundation 0x00007fff255eb6f5 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191 4 UIKitCore 0x00007fff47163f36 -[UIApplication _createStatusBarWithRequestedStyle:orientation:hidden:] + 255 5 UIKitCore 0x00007fff47164407 -[UIApplication statusBarWindow] + 24 6 GreenLight 0x000000011f5eaa1c -[KIFUITestActor tapStatusBar] + 108 7 GreenLight 0x000000011f16db64 -[WBKifHomeTimeLineSub1Tests testFeedRepostToComposer_400216] + 1588 8 CoreFoundation 0x00007fff23b9f95c invoking_ + 140 9 CoreFoundation 0x00007fff23b9cd8f -[NSInvocation invoke] + 287 10 XCTest 0x000000011edbd121 __24-[XCTestCase invokeTest]_block_invoke.208 + 78 11 XCTest 0x000000011ee171e2 -[XCTestCase(Failures) performFailableBlock:testCaseRun:shouldInterruptTest:] + 57 12 XCTest 0x000000011ee17100 -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] + 96 13 XCTest 0x000000011edbcc0a 24-[XCTestCase invokeTest]_block_invoke + 1153 14 XCTest 0x000000011edbc6e2 -[XCTestCase testContextPerformInScope:] + 211 15 XCTest 0x000000011edbc77c -[XCTestCase invokeTest] + 137 16 XCTest 0x000000011edbe4ed 26-[XCTestCase performTest:]_block_invoke_2 + 43 17 XCTest 0x000000011ee171e2 -[XCTestCase(Failures) performFailableBlock:testCaseRun:shouldInterruptTest:] + 57 18 XCTest 0x000000011ee17100 -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] + 96 19 XCTest 0x000000011edbe404 26-[XCTestCase performTest:]_block_invoke.334 + 88 20 XCTest 0x000000011ee2a492 +[XCTContext runInContextForTestCase:block:] + 219 21 XCTest 0x000000011edbdb73 -[XCTestCase performTest:] + 668 22 XCTest 0x000000011ee03077 -[XCTest runTest] + 57 23 XCTest 0x000000011edb814a 27-[XCTestSuite performTest:]_block_invoke + 365 24 XCTest 0x000000011edb7874 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 54 25 XCTest 0x000000011edb7b71 -[XCTestSuite performTest:] + 355 26 XCTest 0x000000011ee03077 -[XCTest runTest] + 57 27 XCTest 0x000000011edb814a __27-[XCTestSuite performTest:]_block_invoke + 365 28 XCTest 0x000000011edb7874 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 54 29 XCTest 0x000000011edb7b71 -[XCTestSuite performTest:] + 355 30 XCTest 0x000000011ee03077 -[XCTest runTest] + 57 31 XCTest 0x000000011edb814a 27-[XCTestSuite performTest:]_block_invoke + 365 32 XCTest 0x000000011edb7874 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 54 33 XCTest 0x000000011edb7b71 -[XCTestSuite performTest:] + 355 34 XCTest 0x000000011ee03077 -[XCTest runTest] + 57 35 XCTest 0x000000011ee3943e 44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke + 171 36 XCTest 0x000000011ee39541 44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke.84 + 118 37 XCTest 0x000000011edd1e83 -[XCTestObservationCenter _observeTestExecutionForBlock:] + 588 38 XCTest 0x000000011ee391fd -[XCTTestRunSession runTestsAndReturnError:] + 623 39 XCTest 0x000000011ed9b6d7 -[XCTestDriver runTestsAndReturnError:] + 456 40 XCTest 0x000000011ee266e4 _XCTestMain + 2484 41 libXCTestBundleInject.dylib 0x000000011ce11be7 copy_helper_block_e8_32s + 0 42 CoreFoundation 0x00007fff23afb8ec CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 12 43 CoreFoundation 0x00007fff23afb058 CFRunLoopDoBlocks + 312 44 CoreFoundation 0x00007fff23af5ee4 __CFRunLoopRun + 1284 45 CoreFoundation 0x00007fff23af56b6 CFRunLoopRunSpecific + 438 46 GraphicsServices 0x00007fff3815cbb0 GSEventRunModal + 65 47 UIKitCore 0x00007fff47162a67 UIApplicationMain + 1621 48 Weibo 0x000000010c8c28e1 main + 65 49 libdyld.dylib 0x00007fff5123bcf5 start + 1 50 ??? 0x0000000000000007 0x0 + 7 )

ps: use Xcode11(11A420a)

JokerMZD commented 1 year ago

@justinseanmartin Any updates about this? This is an issue for iOS 14+ so far. tapStatusBar doesn't work. Do you have some other ways if this method doesn't work?

justinseanmartin commented 1 year ago

We don't rely on this functionality in our apps, so we haven't had a need to fix it. If you'd like to contribute a fix and test for it, we'd be happy to merge it in.