appium 报错问题合集

1:

Failed to create session. An unknown server-side error occurred while processing the command. 
Original error: Cannot connect to the Dart Observatory URL ws://[127.0.0.1:49331/W12bAV_pOTc=/ws](http://127.0.0.1:49331/W12bAV_pOTc=/ws). 
Check the server log for more details

启动flutter应用时 flutter项目中没有正确启动enableFlutterDriverExtension();
引入, 需添加:

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_driver:
    sdk: flutter

2:

self = <urllib3.connection.HTTPConnection object at 0x10b2fc4a0>

   def _new_conn(self) -> socket.socket:
       """Establish a socket connection and set nodelay settings on it.

Could not connect to Appium server URL 'http://127.0.0.1:4723/'. 
Please check if the server is running and the URL is correct (valid URLs can be found at the start of the Appium server log). 
If you are using the Inspector's browser version, ensure the server has been started with '--allow-cors'.

appium服务未开启

3:

Failed to create session. An unknown server-side error occurred while processing the command.
Original error: Unable to launch WebDriverAgent. Original error: xcodebuild failed with code 65\. 
This usually indicates an issue with the local Xcode setup or WebDriverAgent project configuration or the driver-to-platform version mismatch. 
Consider setting 'showXcodeLog' capability to true in order to check the Appium server log for build-related error messages..
Make sure you follow the tutorial at [https://appium.github.io/appium-xcuitest-driver/latest/preparation/real-device-config/](https://appium.github.io/appium-xcuitest-driver/latest/preparation/real-device-config/)
手机没连接, 或在手机上运行一下 WebDriverAgent.xcodeproj

4: code 70

一般是网络问题,因为在运行前会向证书中心发起验证请求

5:长时间多次连接不上并且报65,xcode卸载设备重新信任

image.png

不行的话在手机中清除受信任设备,再不行就重启手机。

欢迎补充。

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容