当前位置: 首页 > 知识库问答 >
问题:

处理命令时发生未知的服务器端错误。原始错误:必须包含platformName功能?

戈正初
2023-03-14

我无法从Appium启动ui inspector当我选择Start session时,我得到这样的错误:在处理命令时发生了未知的服务器端错误。原始错误:必须包含platformName功能

Appium版本(1.13)上一个没有显示此问题的Appium版本(如果适用):桌面操作系统/运行Appium的版本:移动平台/测试中的版本:Galaxy s7真实设备:Appium.appexe:

所需能力检查器

"platformName ": "Android",
   "platformVersion": "9.0",
   "appPackage": "com.samsung.android.phonemessage",
   "appActivity": "com.android.phonemessage.ui.dialermessage",
   "deviceName": "Galaxy s7"

Appium日志

    base-driver/lib/basedriver/driver.js:319:19)
    [MJSONWP] at AppiumDriver.executeCommand (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/lib/appium.js:471:26)
    [MJSONWP] at executeCommand (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:352:34)
    [MJSONWP] at asyncHandler (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:489: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/n     
    ode_modules/raw-body/index.js:273:7)
    [MJSONWP] at phonemessage.emit (events.js:182:13)
    [MJSONWP] at endReadableNT (_stream_readable.js:1090:12)
    [MJSONWP] at process._tickCallback 
    (internal/process/next_tick.js:63:19)
    [HTTP] <-- POST /wd/hub/session 500 5 ms - 179
    [HTTP]
    [HTTP] --> DELETE /wd/hub/session
    [HTTP] {}
    [HTTP] No route found. Setting content type to 'text/plain'
    [HTTP] <-- DELETE /wd/hub/session 404 1 ms - 57
    [HTTP]

共有1个答案

商璞
2023-03-14

这是因为在“PlatformName”的末尾有一个空格。移开它,它就会起作用。

 类似资料: