我在我的 RN 应用程序中使用 React-navigation 进行导航。问题是当我运行 detox 时,测试只是挂起,但如果我删除导航并仅渲染 React 组件,则测试运行正常。以下是遵循本指南( https://github.com/wix/Detox/blob/master/docs/Guide.DebuggingInXcode.md)后的日志(使用react-navigation时):
\n(lldb) bt\n* thread #1, queue = \'com.apple.main-thread\', stop reason = signal SIGSTOP\n * frame #0: 0x00007fff23bd5a3a CoreFoundation`_CFRelease + 186\n frame #1: 0x00007fff23bce337 CoreFoundation`__CFRunLoopDoObservers + 487\n frame #2: 0x00007fff23bce97a CoreFoundation`__CFRunLoopRun + 1514\n frame #3: 0x00007fff23bce066 CoreFoundation`CFRunLoopRunSpecific + 438\n frame #4: 0x000000010207ba6a EarlGrey`-[GREYRunLoopSpinner grey_drainRunLoopInActiveModeAndCheckCondition:forTime:](self=0x0000600002a524f0, _cmd="grey_drainRunLoopInActiveModeAndCheckCondition:forTime:", stopConditionBlock=0x00000001020c9560, time=1.7976931348623157E+308) at GREYRunLoopSpinner.m:175:31\n frame #5: 0x000000010207b435 EarlGrey`-[GREYRunLoopSpinner spinWithStopConditionBlock:](self=0x0000600002a524f0, _cmd="spinWithStopConditionBlock:", stopConditionBlock=0x00000001020c9560) at GREYRunLoopSpinner.m:58:26\n frame #6: 0x00000001020c8cba EarlGrey`-[GREYUIThreadExecutor executeSyncWithTimeout:block:error:](self=0x000060000252c300, _cmd="executeSyncWithTimeout:block:error:", seconds=1.7976931348623157E+308, execBlock=0x000000010209aec0, error=0x00007ffeef3274d0) at GREYUIThreadExecutor.m:227:22\n …
Run Code Online (Sandbox Code Playgroud)