Binary_8 2021-11-15 16:19 采纳率: 100%
浏览 93
已结题

链接ios手机Appium启动start session弹窗错误提示

链接ios手机appium启动start session提示An unknown server-side error occurred while processing the command. Original error: Could not load a driver for automationName 'XCUITest' and platformName 'ios'. Please verify your Appium installation。
谁知道这是为啥?
appium日志中显示:

[BaseDriver] Event 'newSessionRequested' logged at 1636964052381 (16:14:12 GMT+0800 (中国标准时间))
[Appium] /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent/index.js:1
[Appium] import * as dependencies from './lib/check-dependencies';
[Appium] ^^^^^^
[Appium] 
[Appium] SyntaxError: Cannot use import statement outside a module
[Appium]     at Module._compile (internal/modules/cjs/loader.js:815:22)
[Appium]     at Object.Module._extensions..js (internal/modules/cjs/loader.js:892:10)
[Appium]     at Module.load (internal/modules/cjs/loader.js:735:32)
[Appium]     at Module._load (internal/modules/cjs/loader.js:648:12)
[Appium]     at Module._load (electron/js2c/asar.js:717:26)
[Appium]     at Function.Module._load (electron/js2c/asar.js:717:26)
[Appium]     at Module.require (internal/modules/cjs/loader.js:775:19)
[Appium]     at require (internal/modules/cjs/helpers.js:68:18)
[Appium]     at Object. (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:5:1)
[Appium]     at Module._compile (internal/modules/cjs/loader.js:880:30)
[Appium]     at Object.Module._extensions..js (internal/modules/cjs/loader.js:892:10)
[Appium]     at Module.load (internal/modules/cjs/loader.js:735:32)
[Appium]     at Module._load (internal/modules/cjs/loader.js:648:12)
[Appium]     at Module._load (electron/js2c/asar.js:717:26)
[Appium]     at Function.Module._load (electron/js2c/asar.js:717:26)
[Appium]     at Module.require (internal/modules/cjs/loader.js:775:19)
[Appium]     at require (internal/modules/cjs/helpers.js:68:18)
[Appium]     at Object. (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/index.js:5:1)
[Appium]     at Module._compile (internal/modules/cjs/loader.js:880:30)
[Appium]     at Object.Module._extensions..js (internal/modules/cjs/loader.js:892:10)
[Appium]     at Module.load (internal/modules/cjs/loader.js:735:32)
[Appium]     at Module._load (internal/modules/cjs/loader.js:648:12)
[Appium]     at Module._load (electron/js2c/asar.js:717:26)
[Appium]     at Function.Module._load (electron/js2c/asar.js:717:26)
[Appium]     at Module.require (internal/modules/cjs/loader.js:775:19)
[Appium]     at require (internal/modules/cjs/helpers.js:68:18)
[Appium]     at AppiumDriver.getDriverAndVersionForCaps (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/lib/appium.js:221:24)
[Appium]     at AppiumDriver.createSession (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/lib/appium.js:311:66)
[BaseDriver] Event 'newSessionStarted' logged at 1636964052584 (16:14:12 GMT+0800 (中国标准时间))
[MJSONWP] Encountered internal error running command: Error: Could not load a driver for automationName 'XCUITest' and platformName 'ios'. Please verify your Appium installation
[MJSONWP]     at AppiumDriver.getDriverAndVersionForCaps (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/lib/appium.js:237:11)
[MJSONWP]     at AppiumDriver.createSession (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/lib/appium.js:311:66)
[MJSONWP]     at commandExecutor (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/basedriver/driver.js:334:9)
[MJSONWP]     at AppiumDriver.executeCommand (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/basedriver/driver.js:348:15)
[MJSONWP]     at AppiumDriver.executeCommand (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/lib/appium.js:520:26)
[MJSONWP]     at asyncHandler (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:297:34)
[MJSONWP]     at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:436:15
[MJSONWP]     at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/layer.js:95:5)
[MJSONWP]     at next (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/route.js:137:13)
[MJSONWP]     at Route.dispatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/route.js:112:3)
[MJSONWP]     at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/layer.js:95:5)
[MJSONWP]     at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/index.js:281:22
[MJSONWP]     at Function.process_params (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/index.js:335:12)
[MJSONWP]     at next (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/index.js:275:10)
[MJSONWP]     at logger (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/morgan/index.js:144:5)
[MJSONWP]     at Layer.handle [as handle_request] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/layer.js:95:5)
[MJSONWP]     at trim_prefix (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/index.js:317:13)
[MJSONWP]     at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/index.js:284:7
[MJSONWP]     at Function.process_params (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/index.js:335:12)
[MJSONWP]     at next (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/express/lib/router/index.js:275:10)
[MJSONWP]     at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/body-parser/lib/read.js:130:5
[MJSONWP]     at invokeCallback (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/raw-body/index.js:224:16)
[MJSONWP]     at done (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/raw-body/index.js:213:7)
[MJSONWP]     at IncomingMessage.onEnd (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/raw-body/index.js:273:7)
[MJSONWP]     at IncomingMessage.emit (events.js:208:15)
[MJSONWP]     at endReadableNT (_stream_readable.js:1168:12)
[MJSONWP]     at processTicksAndRejections (internal/process/task_queues.js:77:11)
[MJSONWP] Destroying socket connection
[HTTP] <-- POST /wd/hub/session 500 218 ms - 253
[HTTP] 
[HTTP] --> DELETE /wd/hub/session
[HTTP] {}
[HTTP] No route found. Setting content type to 'text/plain'
[HTTP] <-- DELETE /wd/hub/session 404 7 ms - 57

  • 写回答

1条回答 默认 最新

  • Binary_8 2021-11-16 15:38
    关注

    问题解决:
    可能因为系统升级到了12.0.1版本、xcode升级到了13导致了兼容性问题,重新安装appium1.21.0版本就解决所有问题

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 11月24日
  • 已采纳回答 11月16日
  • 创建了问题 11月15日

悬赏问题

  • ¥60 优博讯DT50高通安卓11系统刷完机自动进去fastboot模式
  • ¥15 minist数字识别
  • ¥15 在安装gym库的pygame时遇到问题,不知道如何解决
  • ¥20 uniapp中的webview 使用的是本地的vue页面,在模拟器上显示无法打开
  • ¥15 网上下载的3DMAX模型,不显示贴图怎么办
  • ¥15 关于#stm32#的问题:寻找一块开发版,作为智能化割草机的控制模块和树莓派主板相连,要求:最低可控制 3 个电机(两个驱动电机,1 个割草电机),其次可以与树莓派主板相连电机照片如下:
  • ¥15 Mac(标签-IDE|关键词-File) idea
  • ¥15 潜在扩散模型的Unet特征提取
  • ¥15 iscsi服务无法访问,如何解决?
  • ¥15 感应式传感器制作的感应式讯响器