Детокс висит на detox.init - PullRequest
       10

Детокс висит на detox.init

1 голос
/ 24 октября 2019

Я пытаюсь настроить реактивное приложение с помощью тестов detox e2e. Ранее я использовал expo, но извлек в голое состояние, а затем полностью удалил expo.

Тем не менее, я все еще получаю device/element не определено:

  • "detox": "13.3.1 "
beforeAll(async () => {
  console.log('DETOX init start');
  await device.launchApp({
    permissions: {
      notifications: 'YES',
    },
    newInstance: true,
    launchArgs: { detoxPrintBusyIdleResources: 'YES' },
  });
  console.log('DETOX init end');
});

Я никогда не доберусь до DETOX init end. Вот журналы:

Мне нужно добавить еще описание, потому что Stackoverflow сказал, что я добавил слишком много кода и недостаточно описания ...

detox[20496] INFO:  [test.js] configuration="ios.sim.debug" loglevel="verbose" debugSynchronization=1000 artifactsLocation="artifacts/ios.sim.debug.2019-10-24 08-13-29Z" recordLogs="none" takeScreenshots="manual" recordVideos="none" recordPerformance="none" reportSpecs=true node_modules/.bin/jest --config=e2e/config.json --maxWorkers=1 '--testNamePattern=^((?!:android:).)*$' "e2e"
  console.log e2e/init.js:20
    DETOX init start

detox[20497] INFO:  [DetoxServer.js] server listening on localhost:61858...
detox[20497] DEBUG: [AsyncWebSocket.js/WEBSOCKET_OPEN] opened web socket to: ws://localhost:61858
detox[20497] DEBUG: [DetoxServer.js/LOGIN] role=tester, sessionId=098db8fa-106e-c11b-8deb-2e3121feb5f3
detox[20497] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=tester, sessionId=098db8fa-106e-c11b-8deb-2e3121feb5f3
detox[20497] DEBUG: [exec.js/EXEC_CMD, #0] /usr/bin/xcrun simctl list -j
detox[20497] DEBUG: [exec.js/EXEC_CMD, #1] applesimutils --list --byType "iPhone 11" --byOS "13.0"
detox[20497] DEBUG: [exec.js/EXEC_TRY, #1] Searching for device matching iPhone 11...
detox[20497] DEBUG: [exec.js/EXEC_CMD, #2] applesimutils --list --byId "D84CAC90-F9FA-4811-9882-556E0D5FC298"
detox[20497] DEBUG: [exec.js/EXEC_CMD, #3] /usr/bin/xcrun simctl uninstall D84CAC90-F9FA-4811-9882-556E0D5FC298 com.iynk.iynk
detox[20497] DEBUG: [exec.js/EXEC_TRY, #3] Uninstalling com.iynk.iynk...
detox[20497] DEBUG: [exec.js/EXEC_SUCCESS, #3] com.iynk.iynk uninstalled
detox[20497] DEBUG: [exec.js/EXEC_CMD, #4] /usr/bin/xcrun simctl install D84CAC90-F9FA-4811-9882-556E0D5FC298 "/Users/alexchin/ReactNative/iynk-react-app/ios/build/Build/Products/Debug-iphonesimulator/iynk.app"
detox[20497] DEBUG: [exec.js/EXEC_TRY, #4] Installing /Users/alexchin/ReactNative/iynk-react-app/ios/build/Build/Products/Debug-iphonesimulator/iynk.app...
detox[20497] DEBUG: [exec.js/EXEC_SUCCESS, #4] /Users/alexchin/ReactNative/iynk-react-app/ios/build/Build/Products/Debug-iphonesimulator/iynk.app installed
detox[20497] DEBUG: [exec.js/EXEC_CMD, #5] /usr/bin/xcrun simctl terminate D84CAC90-F9FA-4811-9882-556E0D5FC298 com.iynk.iynk
detox[20497] DEBUG: [exec.js/EXEC_TRY, #5] Terminating com.iynk.iynk...
detox[20497] DEBUG: [exec.js/EXEC_SUCCESS, #5] com.iynk.iynk terminated
detox[20497] DEBUG: [exec.js/EXEC_CMD, #6] applesimutils --byId D84CAC90-F9FA-4811-9882-556E0D5FC298 --bundle com.iynk.iynk --restartSB --setPermissions notifications=YES,location=always
detox[20497] DEBUG: [exec.js/EXEC_TRY, #6] Trying to set permissions...
detox[20497] DEBUG: [exec.js/EXEC_SUCCESS, #6] Permissions are set
detox[20497] DEBUG: [exec.js/EXEC_CMD, #7] SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="/Users/alexchin/Library/Detox/ios/78aa16e822eb448600c2df3ca9fa600001357d63/Detox.framework/Detox" /usr/bin/xcrun simctl launch D84CAC90-F9FA-4811-9882-556E0D5FC298 com.iynk.iynk --args -detoxServer "ws://localhost:61858" -detoxSessionId "098db8fa-106e-c11b-8deb-2e3121feb5f3" -detoxPrintBusyIdleResources "YES"
detox[20497] DEBUG: [exec.js/EXEC_TRY, #7] Launching com.iynk.iynk...
detox[20497] DEBUG: [exec.js/EXEC_CMD, #8] /usr/bin/xcrun simctl get_app_container D84CAC90-F9FA-4811-9882-556E0D5FC298 com.iynk.iynk
detox[20497] INFO:  [AppleSimUtils.js] com.iynk.iynk launched. To watch simulator logs, run:
        /usr/bin/xcrun simctl spawn D84CAC90-F9FA-4811-9882-556E0D5FC298 log stream --level debug --style compact --predicate 'processImagePath beginsWith "/Users/alexchin/Library/Developer/CoreSimulator/Devices/D84CAC90-F9FA-4811-9882-556E0D5FC298/data/Containers/Bundle/Application/A6F12D73-F6C9-435F-B020-E866833F73E3/iynk.app"'
detox[20497] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=098db8fa-106e-c11b-8deb-2e3121feb5f3)
detox[20497] DEBUG: [DetoxServer.js/LOGIN] role=testee, sessionId=098db8fa-106e-c11b-8deb-2e3121feb5f3
detox[20497] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=testee, sessionId=098db8fa-106e-c11b-8deb-2e3121feb5f3
Login: should have login screen
detox[20497] ERROR: [Detox.js/APP_CRASH] App crashed in test 'Login should have login screen', here's the native stack trace: 
Signal 11 was raised
(
    0   Detox                               0x0000000104a88644 _ZL16__DTXHandleCrashP11NSExceptionP8NSNumberP8NSString + 497
    1   Detox                               0x0000000104a883c9 _ZL17__DTXHandleSignali + 59
    2   libsystem_platform.dylib            0x00007fff51414b5d _sigtramp + 29
    3   ???                                 0x0000000000000000 0x0 + 0
    4   CoreFoundation                      0x00007fff23b20d7a __CFStringAppendFormatCore + 12426
    5   CoreFoundation                      0x00007fff23b22d15 _CFStringCreateWithFormatAndArgumentsAux2 + 133
    6   Foundation                          0x00007fff25677fa2 +[NSString stringWithFormat:] + 169
    7   Detox                               0x0000000104a7c770 ___prettyPrintAppStateTracker_block_invoke_2 + 87
    8   CoreFoundation                      0x00007fff23b669e7 __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ + 7
    9   CoreFoundation                      0x00007fff23c095ce -[__NSArrayI enumerateObjectsWithOptions:usingBlock:] + 190
    10  Detox                               0x0000000104a7c632 ___prettyPrintAppStateTracker_block_invoke + 275
    11  libdispatch.dylib                   0x00007fff511fc7f9 _dispatch_client_callout + 8
    12  libdispatch.dylib                   0x00007fff512097ff _dispatch_lane_barrier_sync_invoke_and_complete + 94
    13  EarlGrey                            0x0000000104b8800e grey_dispatch_sync + 238
    14  Detox                               0x0000000104a7c4a0 _prettyPrintAppStateTracker + 309
    15  Detox                               0x0000000104a7aa36 __WXFixupIdlingResourceClasses_block_invoke_2 + 392
    16  EarlGrey                            0x0000000104bfd8ff -[GREYUIThreadExecutor grey_busyResourcesReturnEarly:] + 1343
    17  EarlGrey                            0x0000000104bfd0ae -[GREYUIThreadExecutor grey_areAllResourcesIdle] + 62
    18  EarlGrey                            0x0000000104bfcc19 __59-[GREYUIThreadExecutor executeSyncWithTimeout:block:error:]_block_invoke.102 + 57
    19  EarlGrey                            0x0000000104ba9cfe __77-[GREYRunLoopSpinner grey_drainRunLoopInActiveModeAndCheckCondition:forTime:]_block_invoke + 350
    20  EarlGrey                            0x0000000104baabdc __89-[GREYRunLoopSpinner grey_setupObserverInMode:withBeforeSourcesBlock:beforeWaitingBlock:]_block_invoke + 268
    21  CoreFoundation                      0x00007fff23afaeb7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
    22  CoreFoundation                      0x00007fff23af594e __CFRunLoopDoObservers + 430
    23  CoreFoundation                      0x00007fff23af5eb3 __CFRunLoopRun + 1235
    24  CoreFoundation                      0x00007fff23af56b6 CFRunLoopRunSpecific + 438
    25  EarlGrey                            0x0000000104ba981b -[GREYRunLoopSpinner grey_drainRunLoopInActiveModeAndCheckCondition:forTime:] + 651
    26  EarlGrey                            0x0000000104ba915b -[GREYRunLoopSpinner spinWithStopConditionBlock:] + 635
    27  EarlGrey                            0x0000000104bfc2cf -[GREYUIThreadExecutor executeSyncWithTimeout:block:error:] + 1343
    28  EarlGrey                            0x0000000104bfbd45 -[GREYUIThreadExecutor executeSync:error:] + 309
    29  Detox                               0x0000000104a7a4e5 __45-[EarlGreyImpl(Detox) detox_safeExecuteSync:]_block_invoke + 137
    30  CoreFoundation                      0x00007fff23afb8ec __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
    31  CoreFoundation                      0x00007fff23afb058 __CFRunLoopDoBlocks + 312
    32  CoreFoundation                      0x00007fff23af5ee4 __CFRunLoopRun + 1284
    33  CoreFoundation                      0x00007fff23af56b6 CFRunLoopRunSpecific + 438
    34  GraphicsServices                    0x00007fff3815cbb0 GSEventRunModal + 65
    35  Detox                               0x0000000104a7e045 __detox_UIApplication_run + 365
    36  UIKitCore                           0x00007fff47162a67 UIApplicationMain + 1621
    37  iynk                                0x00000001007c8b20 main + 112
    38  libdyld.dylib                       0x00007fff5123bcf5 start + 1
)
detox[20497] DEBUG: [exec.js/EXEC_CMD, #9] /usr/bin/xcrun simctl terminate D84CAC90-F9FA-4811-9882-556E0D5FC298 com.iynk.iynk
detox[20497] DEBUG: [exec.js/EXEC_TRY, #9] Terminating com.iynk.iynk...
detox[20497] DEBUG: [exec.js/EXEC_SUCCESS, #9] com.iynk.iynk terminated
detox[20497] DEBUG: [exec.js/EXEC_CMD, #10] SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="/Users/alexchin/Library/Detox/ios/78aa16e822eb448600c2df3ca9fa600001357d63/Detox.framework/Detox" /usr/bin/xcrun simctl launch D84CAC90-F9FA-4811-9882-556E0D5FC298 com.iynk.iynk --args -detoxServer "ws://localhost:61858" -detoxSessionId "098db8fa-106e-c11b-8deb-2e3121feb5f3"
detox[20497] DEBUG: [exec.js/EXEC_TRY, #10] Launching com.iynk.iynk...
detox[20497] DEBUG: [DetoxServer.js/DISCONNECT] role=testee, sessionId=098db8fa-106e-c11b-8deb-2e3121feb5f3
detox[20497] DEBUG: [exec.js/EXEC_CMD, #11] /usr/bin/xcrun simctl get_app_container D84CAC90-F9FA-4811-9882-556E0D5FC298 com.iynk.iynk
detox[20497] INFO:  [AppleSimUtils.js] com.iynk.iynk launched. To watch simulator logs, run:
        /usr/bin/xcrun simctl spawn D84CAC90-F9FA-4811-9882-556E0D5FC298 log stream --level debug --style compact --predicate 'processImagePath beginsWith "/Users/alexchin/Library/Developer/CoreSimulator/Devices/D84CAC90-F9FA-4811-9882-556E0D5FC298/data/Containers/Bundle/Application/A6F12D73-F6C9-435F-B020-E866833F73E3/iynk.app"'
detox[20497] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=098db8fa-106e-c11b-8deb-2e3121feb5f3)
detox[20497] DEBUG: [DetoxServer.js/LOGIN] role=testee, sessionId=098db8fa-106e-c11b-8deb-2e3121feb5f3
detox[20497] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=testee, sessionId=098db8fa-106e-c11b-8deb-2e3121feb5f3
...