NativeScript / NativeScript/plugins

[@nativescript/detox] Tests Crash after updating to XCode 14

Offen
#484 0 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
TypeScript
Sterne
206
Forks
123
Ø Merge
2 T. 1 Std.
Gemergte PRs (30 T.)
1

Beschreibung

Description: After updating to XCode 14.3 and macOS 13.3.1 running iOS tests using detox seems to crash when attempting to close and open a new instance of the app between test suites when using await device.launchApp with param newInstance:true.

I'll try to add more details on this as I find it and post it here. Thank you!

System Info:

XCode: 14.3
macOS:  13.3.1
iOS Simulator: iPhone 11
Simulator iOS version: 14.2 (also tried on 16.4)
@nativescript/detox: 1.0.1
@nativescript/core: 8.5.1
@nativescript/types: 8.5.0
@nativescript/ios: 8.5.1
@nativescript/android: 8.5.0

Error Info:

09:58:30.342 detox[55115] ERROR: [WS_ERROR] The app has crashed, see the details below:

Signal 6 was raised
(
        0   Detox                               0x0000000108e25c15 +[NSThread(DetoxUtils) dtx_demangledCallStackSymbols] + 37
        1   Detox                               0x0000000108e28670 __DTXHandleCrash + 464
        2   Detox                               0x0000000108e28db1 __DTXHandleSignal + 59
        3   libsystem_platform.dylib            0x00007fff5e73d5ed _sigtramp + 29
        4   ???                                 0x0000000000000001 0x0 + 1
        5   libsystem_c.dylib                   0x00007fff200fab94 abort + 120
        6   libc++abi.dylib                     0x00007fff2024f818 abort_message + 231
        7   libc++abi.dylib                     0x00007fff20240e65 demangling_terminate_handler() + 242
        8   libobjc.A.dylib                     0x00007fff201780d9 _objc_terminate() + 104
        9   Sentry                              0x000000010a65008e CPPExceptionTerminate() + 2302
        10  Detox                               0x0000000108e293fc __dtx_terminate() + 499
        11  libc++abi.dylib                     0x00007fff2024ec47 std::__terminate(void (*)()) + 8
        12  libc++abi.dylib                     0x00007fff2024ebe9 std::terminate() + 41
        13  NativeScript                        0x000000010900c605 std::__1::unique_ptr<tns::Runtime, std::__1::default_delete<tns::Runtime> >::reset(tns::Runtime*) + 25
        14  libsystem_c.dylib                   0x00007fff200d9b15 __cxa_finalize_ranges + 316
        15  libsystem_c.dylib                   0x00007fff200d9e4f exit + 46
        16  UIKitCore                           0x00007fff2467fdc0 -[UIApplication terminateWithSuccess] + 0
        17  UIKitCore                           0x00007fff23ca4d75 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke_2.184 + 225
        18  UIKitCore                           0x00007fff23acd8ed -[UIScene _enqueuePostSettingsUpdateResponseBlock:inPhase:] + 272
        19  UIKitCore                           0x00007fff23ca4928 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke_2 + 1491
        20  UIKitCore                           0x00007fff2423120a _UIScenePerformActionsWithLifecycleActionMask + 88
        21  UIKitCore                           0x00007fff23ca42ca __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 198
        22  UIKitCore                           0x00007fff23ca3d8e -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 474
        23  UIKitCore                           0x00007fff23ca40fb -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 819
        24  UIKitCore                           0x00007fff23ca3ae5 -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:] + 225
        25  UIKitCore                           0x00007fff246765a9 -[UIApplication workspaceShouldExit:withTransitionContext:] + 169
        26  FrontBoardServices                  0x00007fff25a7b187 -[FBSUIApplicationWorkspaceShim workspaceShouldExit:withTransitionContext:] + 79
        27  FrontBoardServices                  0x00007fff25aa61d6 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke_2 + 76
        28  FrontBoardServices                  0x00007fff25a8bad5 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 209
        29  FrontBoardServices                  0x00007fff25aa6175 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke + 106
        30  libdispatch.dylib                   0x00007fff20106508 _dispatch_client_callout + 8
        31  libdispatch.dylib                   0x00007fff20109052 _dispatch_block_invoke_direct + 281
        32  FrontBoardServices                  0x00007fff25acc7a5 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
        33  FrontBoardServices                  0x00007fff25acc48b -[FBSSerialQueue _targetQueue_performNextIfPossible] + 433
        34  FrontBoardServices                  0x00007fff25acc950 -[FBSSerialQueue _performNextFromRunLoopSource] + 22
        35  CoreFoundation                      0x00007fff2038c37a __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
        36  CoreFoundation                      0x00007fff2038c272 __CFRunLoopDoSource0 + 180
        37  CoreFoundation                      0x00007fff2038b754 __CFRunLoopDoSources0 + 248
        38  CoreFoundation                      0x00007fff20385f1f __CFRunLoopRun + 878
        39  CoreFoundation                      0x00007fff203856c6 CFRunLoopRunSpecific + 567
        40  GraphicsServices                    0x00007fff2b76adb3 GSEventRunModal + 139
        41  UIKitCore                           0x00007fff24675187 -[UIApplication _run] + 912
        42  UIKitCore                           0x00007fff2467a038 UIApplicationMain + 101
        43  NativeScript                        0x0000000109020fbd ffi_call_unix64 + 85
        44  ???                                 0x00007ff7b813fe59 0x0 + 140701921967705
)
09:58:39.565 detox[55115] ERROR: [WS_ERROR] The app has crashed, see the details below:

C++ exception of type “std::__1::system_error” was thrown
(
        0   Detox                               0x000000010bfc7c15 +[NSThread(DetoxUtils) dtx_demangledCallStackSymbols] + 37
        1   Detox                               0x000000010bfca869 __DTXHandleCrash + 969
        2   Detox                               0x000000010bfcb3ed __dtx_terminate() + 484
        3   libc++abi.dylib                     0x00007fff2024ec47 std::__terminate(void (*)()) + 8
        4   libc++abi.dylib                     0x00007fff2024ebe9 std::terminate() + 41
        5   NativeScript                        0x000000010c1ae605 std::__1::unique_ptr<tns::Runtime, std::__1::default_delete<tns::Runtime> >::reset(tns::Runtime*) + 25
        6   libsystem_c.dylib                   0x00007fff200d9b15 __cxa_finalize_ranges + 316
        7   libsystem_c.dylib                   0x00007fff200d9e4f exit + 46
        8   UIKitCore                           0x00007fff2467fdc0 -[UIApplication terminateWithSuccess] + 0
        9   UIKitCore                           0x00007fff23ca4d75 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke_2.184 + 225
        10  UIKitCore                           0x00007fff23acd8ed -[UIScene _enqueuePostSettingsUpdateResponseBlock:inPhase:] + 272
        11  UIKitCore                           0x00007fff23ca4928 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke_2 + 1491
        12  UIKitCore                           0x00007fff2423120a _UIScenePerformActionsWithLifecycleActionMask + 88
        13  UIKitCore                           0x00007fff23ca42ca __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 198
        14  UIKitCore                           0x00007fff23ca3d8e -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 474
        15  UIKitCore                           0x00007fff23ca40fb -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 819
        16  UIKitCore                           0x00007fff23ca3ae5 -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:] + 225
        17  UIKitCore                           0x00007fff246765a9 -[UIApplication workspaceShouldExit:withTransitionContext:] + 169
        18  FrontBoardServices                  0x00007fff25a7b187 -[FBSUIApplicationWorkspaceShim workspaceShouldExit:withTransitionContext:] + 79
        19  FrontBoardServices                  0x00007fff25aa61d6 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke_2 + 76
        20  FrontBoardServices                  0x00007fff25a8bad5 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 209
        21  FrontBoardServices                  0x00007fff25aa6175 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke + 106
        22  libdispatch.dylib                   0x00007fff20106508 _dispatch_client_callout + 8
        23  libdispatch.dylib                   0x00007fff20109052 _dispatch_block_invoke_direct + 281
        24  FrontBoardServices                  0x00007fff25acc7a5 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
        25  FrontBoardServices                  0x00007fff25acc48b -[FBSSerialQueue _targetQueue_performNextIfPossible] + 433
        26  FrontBoardServices                  0x00007fff25acc950 -[FBSSerialQueue _performNextFromRunLoopSource] + 22
        27  CoreFoundation                      0x00007fff2038c37a __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
        28  CoreFoundation                      0x00007fff2038c272 __CFRunLoopDoSource0 + 180
        29  CoreFoundation                      0x00007fff2038b7b6 __CFRunLoopDoSources0 + 346
        30  CoreFoundation                      0x00007fff20385f1f __CFRunLoopRun + 878
        31  CoreFoundation                      0x00007fff203856c6 CFRunLoopRunSpecific + 567
        32  GraphicsServices                    0x00007fff2b76adb3 GSEventRunModal + 139
        33  UIKitCore                           0x00007fff24675187 -[UIApplication _run] + 912
        34  UIKitCore                           0x00007fff2467a038 UIApplicationMain + 101
        35  NativeScript                        0x000000010c1c2fbd ffi_call_unix64 + 85
        36  ???                                 0x00007ff7b4f9de59 0x0 + 140701869923929
)

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Der Bericht nennt @nativescript/detox, device.launchApp mit newInstance:true sowie die XCode/macOS/iOS-Versionen, aber keine Quelldatei oder keinen Test-Einstiegspunkt. Beginne damit, den Absturz beim erneuten Öffnen der App zwischen Testsuiten zu reproduzieren, und verfolge dann den Pfad für Teardown und erneuten Start. Fertig ist die Aufgabe, wenn dasselbe Szenario in der gemeldeten Umgebung nicht mehr abstürzt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
ios
Bereich
mobile-dev, testing-qa
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.