活着 —— 2020年中国软件测试行业问卷调研,点击详情进入有奖问卷

Appium 启动 appium 失败,报错信息:Error: Unable to launch WebDriverAgent because of xcodebuild failure: Command 'carthage bootstrap --platform iOS\,tvOS' exited with code 1

Tinze · December 27, 2019 · Last by Edrain replied at November 20, 2020 · 1751 hits

今天想在iOS模拟器上安装webdriveragent,但是使用appium启动老是报错。报错信息如下

求解!

共收到 3 条回复 时间 点赞

appium+python,运行PyCharm 报错如下,请大神给解答一下,不胜感谢
D:\appium_test\venv\Scripts\python.exe D:/appium_test/Tineco_test.py
Traceback (most recent call last):
File "D:\appium_test\venv\lib\site-packages\urllib3\connection.py", line 157, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "D:\appium_test\venv\lib\site-packages\urllib3\util\connection.py", line 61, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "D:\Python35\lib\socket.py", line 732, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11001] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\appium_test\venv\lib\site-packages\urllib3\connectionpool.py", line 672, in urlopen
chunked=chunked,
File "D:\appium_test\venv\lib\site-packages\urllib3\connectionpool.py", line 387, in _make_request
conn.request(method, url, **httplib_request_kw)
File "D:\Python35\lib\http\client.py", line 1106, in request
self._send_request(method, url, body, headers)
File "D:\Python35\lib\http\client.py", line 1151, in _send_request
self.endheaders(body)
File "D:\Python35\lib\http\client.py", line 1102, in endheaders
self._send_output(message_body)
File "D:\Python35\lib\http\client.py", line 934, in _send_output
self.send(msg)
File "D:\Python35\lib\http\client.py", line 877, in send
self.connect()
File "D:\appium_test\venv\lib\site-packages\urllib3\connection.py", line 184, in connect
conn = self._new_conn()
File "D:\appium_test\venv\lib\site-packages\urllib3\connection.py", line 169, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 11001] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:/appium_test/Tineco_test.py", line 13, in
driver=webdriver.Remote('http//localhost:4723/wd/hubsessions',desired_caps)
File "D:\appium_test\venv\lib\site-packages\appium\webdriver\webdriver.py", line 144, in init
proxy
File "D:\appium_test\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in init
self.start_session(capabilities, browser_profile)
File "D:\appium_test\venv\lib\site-packages\appium\webdriver\webdriver.py", line 219, in start_session
response = self.execute(RemoteCommand.NEW_SESSION, parameters)
File "D:\appium_test\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 319, in execute
response = self.command_executor.execute(driver_command, params)
File "D:\appium_test\venv\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 374, in execute
return self._request(command_info[0], url, body=data)
File "D:\appium_test\venv\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 397, in _request
resp = self._conn.request(method, url, body=body, headers=headers)
File "D:\appium_test\venv\lib\site-packages\urllib3\request.py", line 80, in request
method, url, fields=fields, headers=headers, **urlopen_kw
File "D:\appium_test\venv\lib\site-packages\urllib3\request.py", line 171, in request_encode_body
return self.urlopen(method, url, **extra_kw)
File "D:\appium_test\venv\lib\site-packages\urllib3\poolmanager.py", line 330, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File "D:\appium_test\venv\lib\site-packages\urllib3\connectionpool.py", line 760, in urlopen
**response_kw
File "D:\appium_test\venv\lib\site-packages\urllib3\connectionpool.py", line 760, in urlopen
**response_kw
File "D:\appium_test\venv\lib\site-packages\urllib3\connectionpool.py", line 760, in urlopen
**response_kw
File "D:\appium_test\venv\lib\site-packages\urllib3\connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "D:\appium_test\venv\lib\site-packages\urllib3\util\retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='http', port=80): Max retries exceeded with url: //localhost:4723/wd/hubsessions/session (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))

Process finished with exit code 1

楼主解决问题了么?我也遇到同样的问题了

可以參考:https://github.com/Carthage/Carthage/issues/3019

I added a file calledtmp.xcconfig to the project and added the excludes:

EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64=arm64 arm64e armv7 armv7s armv6 armv8
EXCLUDED_ARCHS=$(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT))

Then I updated my update script file to export XCODE_XCCONFIG_FILE pointing to it like this:

# This export fixes an issues with the latest Xcode beta.
export XCODE_XCCONFIG_FILE=$PWD/tmp.xcconfig
carthage update --platform iOS --no-use-binaries --cache-builds
需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up