请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

Message: An unknown server-side error occurred while processing the command.

[’* daemon not running. starting it now on port 5037 ', ’ daemon started successfully *’, 'List of devices attached ', ‘NSRBB19429205927\tdevice’]
List of devices attached
NSRBB19429205927 device

[‘appium -p 4700 -bp 4900 -U NSRBB19429205927–no-reset–session-override --log-no-colors’]
[Appium] Welcome to Appium v1.18.0
[Appium] Non-default server args:
[Appium] port: 4700
[Appium] bootstrapPort: 4900
[Appium] logNoColors: true
[Appium] udid: NSRBB19429205927–no-reset–session-override
[Appium] Deprecated server args:
[Appium] -U,–udid => --default-capabilities ‘{“udid”:“NSRBB19429205927–no-reset–session-override”}’
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
[Appium] udid: NSRBB19429205927–no-reset–session-override
[Appium] Appium REST http interface listener started on 0.0.0.0:4700
0
['List of devices attached ', ‘NSRBB19429205927\tdevice’]
List of devices attached
NSRBB19429205927 device

get_suite里面的 0
setUpclass-----> 0
this is setup

[HTTP] --> POST /wd/hub/session
[HTTP] {“capabilities”:{“firstMatch”:[{“platformName”:“Android”,“appium:deviceName”:“NSRBB19429205927”,“appium:appPackage”:“com.tencent.mm”,“appium:appActivity”:“com.tencent.mm.ui.LauncherUI”,“appium:recreateChromeDriverSessions”:true,“appium:appWaitActivity”:“io.dcloud.PandoraEntryActivity”,“appium:noRest”:true,“appium:unicodeKeyboard”:true,“appium:resetKeyboard”:true}]},“desiredCapabilities”:{“platformName”:“Android”,“deviceName”:“NSRBB19429205927”,“appPackage”:“com.tencent.mm”,“appActivity”:“com.tencent.mm.ui.LauncherUI”,“recreateChromeDriverSessions”:true,“appWaitActivity”:“io.dcloud.PandoraEntryActivity”,“noRest”:true,“unicodeKeyboard”:true,“resetKeyboard”:true}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{“platformName”:“Android”,“deviceName”:“NSRBB19429205927”,“appPackage”:“com.tencent.mm”,“appActivity”:“com.tencent.mm.ui.LauncherUI”,“recreateChromeDriverSessions”:true,“appWaitActivity”:“io.dcloud.PandoraEntryActivity”,“noRest”:true,“unicodeKeyboard”:true,“resetKeyboard”:true},null,{“firstMatch”:[{“platformName”:“Android”,“appium:deviceName”:“NSRBB19429205927”,“appium:appPackage”:“com.tencent.mm”,“appium:appActivity”:“com.tencent.mm.ui.LauncherUI”,“appium:recreateChromeDriverSessions”:true,“appium:appWaitActivity”:“io.dcloud.PandoraEntryActivity”,“appium:noRest”:true,“appium:unicodeKeyboard”:true,“appium:resetKeyboard”:true}]}]
[debug] [BaseDriver] Event ‘newSessionRequested’ logged at 1600998479361 (09:47:59 GMT+0800 (GMT+08:00))
[BaseDriver] The following capabilities are not standard capabilities and should have an extension prefix:
[BaseDriver] udid
[Appium]

[Appium] ======================================================================

[Appium] DEPRECATION WARNING:

[Appium]

[Appium] The ‘automationName’ capability was not provided in the desired
[Appium] capabilities for this Android session

[Appium]

[Appium] Setting ‘automationName=UiAutomator2’ by default and using the
[Appium] UiAutomator2 Driver

[Appium]

[Appium] The next major version of Appium (2.x) will require the
[Appium] ‘automationName’ capability to be set for all sessions on all
[Appium] platforms

[Appium]

[Appium] In previous versions (Appium <= 1.13.x), the default was
[Appium] ‘automationName=UiAutomator1’

[Appium]

[Appium] If you wish to use that automation instead of UiAutomator2, please
[Appium] add ‘automationName=UiAutomator1’ to your desired capabilities

[Appium]

[Appium] For more information about drivers, please visit
[Appium] http://appium.io/docs/en/about-appium/intro/ and explore the
[Appium] ‘Drivers’ menu

[Appium]

[Appium] ======================================================================

[Appium]
[Appium] Appium v1.18.0 creating new AndroidUiautomator2Driver (v1.56.1) session
[debug] [BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[debug] [BaseDriver] Creating session with W3C capabilities: {
[debug] [BaseDriver] “alwaysMatch”: {
[debug] [BaseDriver] “platformName”: “Android”,
[debug] [BaseDriver] “appium:udid”: “NSRBB19429205927–no-reset–session-override”,
[debug] [BaseDriver] “appium:deviceName”: “NSRBB19429205927”,
[debug] [BaseDriver] “appium:appPackage”: “com.tencent.mm”,
[debug] [BaseDriver] “appium:appActivity”: “com.tencent.mm.ui.LauncherUI”,
[debug] [BaseDriver] “appium:recreateChromeDriverSessions”: true,
[debug] [BaseDriver] “appium:appWaitActivity”: “io.dcloud.PandoraEntryActivity”,
[debug] [BaseDriver] “appium:noRest”: true,
[debug] [BaseDriver] “appium:unicodeKeyboard”: true,
[debug] [BaseDriver] “appium:resetKeyboard”: true
[debug] [BaseDriver] },
[debug] [BaseDriver] “firstMatch”: [
[debug] [BaseDriver] {}
[debug] [BaseDriver] ]
[debug] [BaseDriver] }
[BaseDriver] The following capabilities were provided, but are not recognized by Appium:
[BaseDriver] noRest
[BaseDriver] Session created with session id: a88568bf-1442-4712-bd31-de3b94eabe8b
[UiAutomator2] Starting ‘com.tencent.mm’ directly on the device
[ADB] Found 1 ‘build-tools’ folders under ‘D:\android-sdk-windows’ (newest first):
[ADB] D:/android-sdk-windows/build-tools/29.0.1
[ADB] Using ‘adb.exe’ from ‘D:\android-sdk-windows\platform-tools\adb.exe’
[debug] [ADB] Running ‘D:\android-sdk-windows\platform-tools\adb.exe -P 5037 start-server’
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices
[debug] [ADB] Connected devices: [{“udid”:“NSRBB19429205927”,“state”:“device”}]
[AndroidDriver] Device NSRBB19429205927–no-reset–session-override was not in the list of connected devices
[debug] [UiAutomator2] Deleting UiAutomator2 session
[debug] [BaseDriver] Event ‘newSessionStarted’ logged at 1600998479794 (09:47:59 GMT+0800 (GMT+08:00))
[debug] [W3C] Encountered internal error running command: Error: Device NSRBB19429205927–no-reset–session-override was not in the list of connected devices
[debug] [W3C] at Object.errorAndThrow (C:\Users\Admin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-support\lib\logging.js:94:35)
[debug] [W3C] at Object.getDeviceInfoFromCaps (C:\Users\Admin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-android-driver\lib\android-helpers.js:208:16)
[debug] [W3C] Destroying socket connection
[HTTP] <-- POST /wd/hub/session 500 508 ms - 745
[HTTP]
Ethis is setup

[HTTP] --> POST /wd/hub/session
[HTTP] {“capabilities”:{“firstMatch”:[{“platformName”:“Android”,“appium:deviceName”:“NSRBB19429205927”,“appium:appPackage”:“com.tencent.mm”,“appium:appActivity”:“com.tencent.mm.ui.LauncherUI”,“appium:recreateChromeDriverSessions”:true,“appium:appWaitActivity”:“io.dcloud.PandoraEntryActivity”,“appium:noRest”:true,“appium:unicodeKeyboard”:true,“appium:resetKeyboard”:true}]},“desiredCapabilities”:{“platformName”:“Android”,“deviceName”:“NSRBB19429205927”,“appPackage”:“com.tencent.mm”,“appActivity”:“com.tencent.mm.ui.LauncherUI”,“recreateChromeDriverSessions”:true,“appWaitActivity”:“io.dcloud.PandoraEntryActivity”,“noRest”:true,“unicodeKeyboard”:true,“resetKeyboard”:true}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{“platformName”:“Android”,“deviceName”:“NSRBB19429205927”,“appPackage”:“com.tencent.mm”,“appActivity”:“com.tencent.mm.ui.LauncherUI”,“recreateChromeDriverSessions”:true,“appWaitActivity”:“io.dcloud.PandoraEntryActivity”,“noRest”:true,“unicodeKeyboard”:true,“resetKeyboard”:true},null,{“firstMatch”:[{“platformName”:“Android”,“appium:deviceName”:“NSRBB19429205927”,“appium:appPackage”:“com.tencent.mm”,“appium:appActivity”:“com.tencent.mm.ui.LauncherUI”,“appium:recreateChromeDriverSessions”:true,“appium:appWaitActivity”:“io.dcloud.PandoraEntryActivity”,“appium:noRest”:true,“appium:unicodeKeyboard”:true,“appium:resetKeyboard”:true}]}]
[debug] [BaseDriver] Event ‘newSessionRequested’ logged at 1600998479900 (09:47:59 GMT+0800 (GMT+08:00))
[BaseDriver] The following capabilities are not standard capabilities and should have an extension prefix:
[BaseDriver] udid
[Appium]

[Appium] ======================================================================

[Appium] DEPRECATION WARNING:

[Appium]

[Appium] The ‘automationName’ capability was not provided in the desired
[Appium] capabilities for this Android session

[Appium]

[Appium] Setting ‘automationName=UiAutomator2’ by default and using the
[Appium] UiAutomator2 Driver

[Appium]

[Appium] The next major version of Appium (2.x) will require the
[Appium] ‘automationName’ capability to be set for all sessions on all
[Appium] platforms

[Appium]

[Appium] In previous versions (Appium <= 1.13.x), the default was
[Appium] ‘automationName=UiAutomator1’

[Appium]

[Appium] If you wish to use that automation instead of UiAutomator2, please
[Appium] add ‘automationName=UiAutomator1’ to your desired capabilities

[Appium]

[Appium] For more information about drivers, please visit
[Appium] http://appium.io/docs/en/about-appium/intro/ and explore the
[Appium] ‘Drivers’ menu

[Appium]

[Appium] ======================================================================

[Appium]
[Appium] Appium v1.18.0 creating new AndroidUiautomator2Driver (v1.56.1) session
[debug] [BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[debug] [BaseDriver] Creating session with W3C capabilities: {
[debug] [BaseDriver] “alwaysMatch”: {
[debug] [BaseDriver] “platformName”: “Android”,
[debug] [BaseDriver] “appium:udid”: “NSRBB19429205927–no-reset–session-override”,
[debug] [BaseDriver] “appium:deviceName”: “NSRBB19429205927”,
[debug] [BaseDriver] “appium:appPackage”: “com.tencent.mm”,
[debug] [BaseDriver] “appium:appActivity”: “com.tencent.mm.ui.LauncherUI”,
[debug] [BaseDriver] “appium:recreateChromeDriverSessions”: true,
[debug] [BaseDriver] “appium:appWaitActivity”: “io.dcloud.PandoraEntryActivity”,
[debug] [BaseDriver] “appium:noRest”: true,
[debug] [BaseDriver] “appium:unicodeKeyboard”: true,
[debug] [BaseDriver] “appium:resetKeyboard”: true
[debug] [BaseDriver] },
[debug] [BaseDriver] “firstMatch”: [
[debug] [BaseDriver] {}
[debug] [BaseDriver] ]
[debug] [BaseDriver] }
[BaseDriver] The following capabilities were provided, but are not recognized by Appium:
[BaseDriver] noRest
[BaseDriver] Session created with session id: ca8fb7d3-7ad3-4571-9a93-d41ddc158170
[UiAutomator2] Starting ‘com.tencent.mm’ directly on the device
[ADB] Using ‘adb.exe’ from ‘D:\android-sdk-windows\platform-tools\adb.exe’
[debug] [ADB] Running ‘D:\android-sdk-windows\platform-tools\adb.exe -P 5037 start-server’
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices
[debug] [ADB] Connected devices: [{“udid”:“NSRBB19429205927”,“state”:“device”}]
[AndroidDriver] Device NSRBB19429205927–no-reset–session-override was not in the list of connected devices
[debug] [UiAutomator2] Deleting UiAutomator2 session
[debug] [BaseDriver] Event ‘newSessionStarted’ logged at 1600998479977 (09:47:59 GMT+0800 (GMT+08:00))
[debug] [W3C] Encountered internal error running command: Error: Device NSRBB19429205927–no-reset–session-override was not in the list of connected devices
[debug] [W3C] at Object.errorAndThrow (C:\Users\Admin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-support\lib\logging.js:94:35)
[debug] [W3C] at Object.getDeviceInfoFromCaps (C:\Users\Admin\AppData\Roaming\npm\node_modules\appium\node_modules\appium-android-driver\lib\android-helpers.js:208:16)
[debug] [W3C] Destroying socket connection
[HTTP] <-- POST /wd/hub/session 500 79 ms - 745
[HTTP]
Ethis is class teardown

======================================================================
ERROR: test_1_daily (mp_main.DailyPricticeTests)

Traceback (most recent call last):
File “D:\workspace\yihafoWX\src\yihafoandroidWX\test_case\daily_prictice.py”, line 52, in setUp
self.driver=base_driver.android_driver(0)
File “D:\workspace\yihafoWX\src\yihafoandroidWX\base\base_driver.py”, line 39, in android_driver
driver=webdriver.Remote(“http://127.0.0.1: “+port+” /wd/hub”,capablibities)
File “D:\python37\lib\site-packages\appium\webdriver\webdriver.py”, line 129, in init
proxy
File “D:\python37\lib\site-packages\selenium\webdriver\remote\webdriver.py”, line 157, in init
self.start_session(capabilities, browser_profile)
File “D:\python37\lib\site-packages\appium\webdriver\webdriver.py”, line 204, in start_session
response = self.execute(RemoteCommand.NEW_SESSION, parameters)
File “D:\python37\lib\site-packages\selenium\webdriver\remote\webdriver.py”, line 321, in execute
self.error_handler.check_response(response)
File “D:\python37\lib\site-packages\selenium\webdriver\remote\errorhandler.py”, line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Device NSRBB19429205927–no-reset–session-override was not in the list of connected devices

======================================================================

老师你好,我是用真机测试的,但是自动启动appium后要启动手机app的时候就报错了,我要启动的是微信,是已经安装着的。

正在回答 回答被采纳积分+3

1回答

Mushishi 2020-09-25 18:00:35

https://img1.sycdn.imooc.com/szimg/5f6dbe4709c7a44411280728.jpg你手机链接上的吗?还有就是你sdk和手机版本匹配不?看错误 应该是sdk不认识你手机。

0 回复 有任何疑惑可以回复我~
  • 提问者 纳纳酱 #1
    请问怎么查看我的sdk和手机是否匹配呢?
    回复 有任何疑惑可以回复我~ 2020-09-25 18:12:23
  • Mushishi 回复 提问者 纳纳酱 #2
    你手机得android版本是多少 这个你手机里面能看到。
    sdk 得可以通过:
    C:\Users\60903>adb
    Android Debug Bridge version 1.0.40
    Version 28.0.2-5303910
    Installed as G:\java\sdk\platform-tools\adb.exe
    这样就看到version 28 
    
    https://www.cnblogs.com/fei-android/p/11059580.html 然后可以看一下类似得 或者官网
    回复 有任何疑惑可以回复我~ 2020-09-26 09:29:51
  • 提问者 纳纳酱 回复 Mushishi #3
    老师你好,我的sdk版本是version 24.4.1,安卓版本是8.1.0,跟你发的链接上确实不匹配,但是我手动启动appium服务,代码调用app启动,这样就可以正常打开,这是为什么呢?
    回复 有任何疑惑可以回复我~ 2020-09-26 11:47:04
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信