Appium 求大佬指点,Xcode9.2+ 真机 11.1 上运行 xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination "id=xxxxxxxxxxxxx" test WebDriverAgentRunner 后闪退,看社区有很多人遇到这个问题,怎么解决呢?

大呆呆 · 2018年04月02日 · 最后由 大呆呆 回复于 2018年04月08日 · 1758 次阅读

运行:xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination "id=xxxxxxxxxxxxx" test
WebDriverAgentRunner 一直打开后就闪退,无法访问 appium 的http://localhost:8100/inspector,

dyld: Library not loaded: @rpath/XCTest.framework/XCTest
2018-03-30 00:58:14.423 xcodebuild[4244:129345] Error Domain=IDETestOperationsObserverErrorDomain Code=6 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}

Testing failed:
Early unexpected exit, operation never finished bootstrapping - no restart will be attempted

Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/2C09BBB1-04C3-469A-884C-8CB6F9D3C1BA/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest: code signing blocked mmap() of '/private/var/containers/Bundle/Application/2C09BBB1-04C3-469A-884C-8CB6F9D3C1BA/WebDriverAgentRunner-Runner.app/Frameworks/XCTest.framework/XCTest'

共收到 7 条回复 时间 点赞

我这边遇到过这种无论怎么装都闪退的问题
闪退之后用 xcodebuild 重启 wda
如果 xcodebuild 报 too many instance……就重启手机

很奇怪的事情就是如果 xcodebuild 启动 wda 启动成功了 那么再次执行 appium 也可以成功
后来就加了个主动触发 xcodebuild 的脚本用来启动 wda

/usr/bin/xcodebuild build-for-testing test-without-building -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=此处添加udid test

我好像答非所问了……

感谢你的建议,我想问下 xcodebuild 重启 wda 的意思是再次用 xcode product—>test ?或者是删除 wdarunner 后再次 xcode product—>test ?麻烦详细确认下,要是这样操作的话。我做了,没有效果。。。

在描述文件里面 点击信任新下的 WDA 就可以了 不信任就会被删了

王智强 回复

是设置—>通用—>描述文件与设备管理—>开发者应用 这里信任吧?试了没用。。。

大呆呆 回复

xcodebuild 重启 wda 是你说的那个样子 重启不成功 xcodebuild 会弹出弹框 重启成功手机就会装上 wda 然后之后 appium 再次启动时 wda 也是可以正常启动的 我这边这样测试时可以的

如果你按照 xcodebuild test 之后仍然 appium 启动不成功 那我就不太清除了哈~

终于好了,换了台别的电脑就好了,然后又把自己电脑上之前安装的全部卸掉重装就直接 ok 了。。。

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册