appium中遇到WebDriverException: Message: An unknown server-side error occurred while processing the ...

selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: A new session could not be created. Details: session not created: please close 'com.tencent.mobileqq' and try again

image.png

将手机和电脑连接好后(adb可以访问),在电脑浏览器输入:chrome://inspect/#devices
image.png

npm install appium --chromedriver_version="83.0.4103.101"
在CMD下安装匹配的 chromedriver

image.png

奶奶的,报错了,那我们就去chromedriver下载地址看看有哪个版本
http://npm.taobao.org/mirrors/chromedriver/
image.png

发现这2个接近
那就换个版本试试
npm install appium --chromedriver_version="83.0.4103.39"
image.png

执行cmd的信息太多,看不懂,但是也没说安装不成功,管他妈的,再尝试运行一下代码
image.png

艹,成功了!

你可能感兴趣的:(appium中遇到WebDriverException: Message: An unknown server-side error occurred while processing the ...)