当前位置:   article > 正文

Mac M1终端appium报错 Failed to receive any data within the timeout: 5000

failed to receive any data within the timeout

Mac M1终端appium报错 Failed to receive any data within the timeout: 5000

踩坑搞了我2天多终于找到解决办法了

先看报错信息

[debug] [W3C] Encountered internal error running command: Error: Failed to receive any data within the timeout: 5000

[debug] [W3C] at Timeout._onTimeout (/opt/homebrew/lib/node_modules/appium/node_modules/appium-ios-device/lib/plist-service/index.js:67:16)

[debug] [W3C] at listOnTimeout (node:internal/timers:573:17)

[debug] [W3C] at processTimers (node:internal/timers:514:7)

[HTTP] <-- POST /wd/hub/session 500 10431 ms - 605

iPhone手机真机明明和电脑连接正常用客户端版appium也正常到终端就报错内部超时连不上设备

解决办法(最好看完根据个人情况来改)

node(npm,cnpm)和appium(包括appium-doctor)最好都安装在homebrew(下载方式网上搜一大堆)路径(/opt/homebrew/lib/node_modules )

,其次下载完的appium记得替换appium-webdriveagent里面内容文件(网上搜github下载webdriveagent文件替换),最后node版本要选低版本的不能选高版本的比如14

1、卸载node指令(local路径生效)

sudo rm -rf /usr/local/bin/npm
sudo rm -rf /usr/local/share/man/man1/node.1
sudo rm -rf /usr/local/lib/dtrace/node.d
sudo rm -rf ~/.npm
sudo rm -rf ~/.node-gyp
sudo rm /usr/local/bin/node

然后node -v查看情况,如果还有就用brew uninstall node卸载

然后安装node用brew insatall node@14

安装完成node -v没显示版本号就open ~/.zshrc

输入export PATH=“/opt/homebrew/opt/node@14/bin:$PATH”

保存退出source ~/.zshrc

再node-v 就正常了

npm install -g appium@1.20.2 下载完成后记得替换webdriveragent文件

npm install -g appium-doctor

npm uninstall -g appium (卸载appium)

总结,appium版本可以高点但node最好版本低点,指令最好安装homebrew里不要安装本地路径local

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/334029
推荐阅读
相关标签
  

闽ICP备14008679号