APPIUM 版本1.7.0
WDA build真機時會提示 “未能載入軟件包“WebDriverAgentRunner”,因為它已損壞或丟失必要的資源。
2017-04-19 16:45:53.366908 XCTRunner[10203:3854208] (dlopen_preflight(/var/containers/Bundle/Application/827F554F-55B7-4B5B-9F4C-75A14EB3A143/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/WebDriverAgentRunner): Library not loaded: @rpath/RoutingHTTPServer.framework/RoutingHTTPServer
Referenced from: /private/var/containers/Bundle/Application/827F554F-55B7-4B5B-9F4C-75A14EB3A143/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/WebDriverAgentLib
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/827F554F-55B7-4B5B-9F4C-75A14EB3A143/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/RoutingHTTPServer.framework/RoutingHTTPServer: code signature invalid for '/private/var/containers/Bundle/Application/827F554F-55B7-4B5B-9F4C-75A14EB3A143/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/Frameworks/WebDriverAgentLib.framework/Frameworks/RoutingHTTPServer.framework/RoutingHTTPServer'
但是使用模擬器又沒有問題。
關鍵點:Library not loaded: @rpath/RoutingHTTPServer.framework/RoutingHTTPServer
可以猜測是由於依賴的該framework出現問題導致錯誤
解決思路:
一.查看wda依賴framework是否正常。
在wda目錄下執行:
./Scripts/bootstrap.sh -d
Fetching dependencies
二:Xcode中設置buildphases 加入RoutingHTTPServer