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

时间:2019-05-16 04:21:17

标签: testing appium qa

选择开始会话时,我无法从Appium启动ui检查器,但出现此错误: 处理命令时发生未知的服务器端错误。原始错误:您必须包含platformName功能

Appium版本(1.13) 没有出现问题的最新Appium版本(如果适用): 用于运行Appium的桌面操作系统/版本: 正在测试的移动平台/版本:Galaxy s7 真实设备: Appium.app | exe:

在Appium上选择使用ui inspector启动会话时出现错误。

所需功能检查器

"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 个答案:

答案 0 :(得分:0)

这是因为在“ platformName”的末尾有一个空格。删除它,它将起作用。