Detox - 应用卡在 iOS 的启动屏幕中

sev*_*eHo 7 e2e-testing react-native detox

我的排毒设置在 android 上运行良好,但我在 iOS 上遇到了问题。

问题是应用程序在从 Metro 打包器加载包后卡在启动/启动屏幕上。排毒记录不多:

App has not responded to the network requests below:
(id = -1000) isReady: {}

Unresponded network requests might result in timeout errors in Detox tests.
Run Code Online (Sandbox Code Playgroud)

设置如下所示:

.detoxrc.json

...
"ios.sim.debug": {
    "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/<app_name>.app",
    "build": "xcodebuild -workspace ios/<project_name>.xcworkspace -scheme <scheme> -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
    "type": "ios.simulator",
    "device": {
      "type": "iPhone 11 Pro"
    }
},
...
Run Code Online (Sandbox Code Playgroud)

e2e/Login.e2e.js

App has not responded to the network requests below:
(id = -1000) isReady: {}

Unresponded network requests might result in timeout errors in Detox tests.
Run Code Online (Sandbox Code Playgroud)

观察 EarlGrey 日志但不记录单个字符的命令:

...
"ios.sim.debug": {
    "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/<app_name>.app",
    "build": "xcodebuild -workspace ios/<project_name>.xcworkspace -scheme <scheme> -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
    "type": "ios.simulator",
    "device": {
      "type": "iPhone 11 Pro"
    }
},
...
Run Code Online (Sandbox Code Playgroud)

我现在真的在挠头几个小时,试图弄清楚为什么应用程序卡住了,为什么我没有收到任何日志,非常感谢你的帮助。

环境:

机器:

MacOS: 10.15.5
XCode: 11.6
applesimutils: 0.8
Node: 12.18.1
detox-cli: 17.1.0 
Run Code Online (Sandbox Code Playgroud)

项目:

"react": "16.11.0",
"react-native": "0.62.1",
"detox": "^17.3.4",
"jest": "^26.2.2",
"jest-circus": "^26.2.2",
Run Code Online (Sandbox Code Playgroud)