51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 537|回复: 3
打印 上一主题 下一主题

appium-desktop启动模拟器adb命令超时失败

[复制链接]
  • TA的每日心情
    无聊
    4 天前
  • 签到天数: 530 天

    连续签到: 2 天

    [LV.9]测试副司令

    跳转到指定楼层
    1#
    发表于 2022-7-1 10:44:17 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
    1测试积点

    1appium-desktop启动模拟器adb命令超时失败
    2.使用appium-server启动没有问题

    报错如下:

    1. [Appium] Welcome to Appium v1.15.0
    2. [Appium] Non-default server args:
    3. [Appium]   allowInsecure: {
    4. [Appium]   }
    5. [Appium]   denyInsecure: {
    6. [Appium]   }
    7. [Appium] Appium REST http interface listener started on 0.0.0.0:4723
    8. [HTTP] --> POST /wd/hub/session
    9. [HTTP] {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"platformName":"Android"}},"desiredCapabilities":{"platformName":"Android","platformVersion":"5.1.1","deviceName":"Android Emulator","appPackage":"com.android.calculator2","appActivity":".Calculator"}}
    10. [W3C] Calling AppiumDriver.createSession() with args: [{"platformName":"Android","platformVersion":"5.1.1","deviceName":"Android Emulator","appPackage":"com.android.calculator2","appActivity":".Calculator"},null,{"firstMatch":[{}],"alwaysMatch":{"platformName":"Android"}}]
    11. [BaseDriver] Event 'newSessionRequested' logged at 1571708607532 (09:43:27 GMT+0800 (中国标准时间))
    12. [Appium] Could not parse W3C capabilities: 'deviceName' can't be blank
    13. [Appium] Trying to fix W3C capabilities by merging them with JSONWP caps
    14. [BaseDriver] The capabilities ["platformVersion","deviceName","appPackage","appActivity"] are not standard capabilities and should have an extension prefix
    15. [Appium]
    16. [Appium] ======================================================================
    17. [Appium]   DEPRECATION WARNING:
    18. [Appium]
    19. [Appium]   The 'automationName' capability was not provided in the desired
    20. [Appium]   capabilities for this Android session
    21. [Appium]
    22. [Appium]   Setting 'automationName=UiAutomator2' by default and using the
    23. [Appium]   UiAutomator2 Driver
    24. [Appium]
    25. [Appium]   The next major version of Appium (2.x) will **require** the
    26. [Appium]   'automationName' capability to be set for all sessions on all
    27. [Appium]   platforms
    28. [Appium]
    29. [Appium]   In previous versions (Appium <= 1.13.x), the default was
    30. [Appium]   'automationName=UiAutomator1'
    31. [Appium]
    32. [Appium]   If you wish to use that automation instead of UiAutomator2, please
    33. [Appium]   add 'automationName=UiAutomator1' to your desired capabilities
    34. [Appium]
    35. [Appium]   For more information about drivers, please visit
    36. [Appium]   http://appium.io/docs/en/about-appium/intro/ and explore the
    37. [Appium]   'Drivers' menu
    38. [Appium]
    39. [Appium] ======================================================================
    40. [Appium]
    41. [Appium] Appium v1.15.0 creating new AndroidUiautomator2Driver (v1.37.1) session
    42. [BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
    43. [BaseDriver] Creating session with W3C capabilities: {
    44. [BaseDriver]   "alwaysMatch": {
    45. [BaseDriver]     "platformName": "Android",
    46. [BaseDriver]     "appium:platformVersion": "5.1.1",
    47. [BaseDriver]     "appium:deviceName": "Android Emulator",
    48. [BaseDriver]     "appium:appPackage": "com.android.calculator2",
    49. [BaseDriver]     "appium:appActivity": ".Calculator"
    50. [BaseDriver]   },
    51. [BaseDriver]   "firstMatch": [
    52. [BaseDriver]     {}
    53. [BaseDriver]   ]
    54. [BaseDriver] }
    55. [BaseDriver] Session created with session id: 838e3971-499e-42b3-aacd-1ef1a14ff4be
    56. [UiAutomator2] Starting 'com.android.calculator2' directly on the device
    57. [ADB] Found 1 'build-tools' folders under 'E:\androidsdk\android-sdk-windows' (newest first):
    58. [ADB]     E:/androidsdk/android-sdk-windows/build-tools/29.0.2
    59. [ADB] Using 'adb.exe' from 'E:\androidsdk\android-sdk-windows\platform-tools\adb.exe'
    60. [AndroidDriver] Retrieving device list
    61. [ADB] Trying to find a connected android device
    62. [ADB] Getting connected devices...
    63. [ADB] Connected devices: [{"udid":"emulator-5554","state":"device"}]
    64. [AndroidDriver] Looking for a device with Android '5.1.1'
    65. [ADB] Setting device id to emulator-5554
    66. [ADB] Getting device platform version
    67. [ADB] Running 'E:\androidsdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.release'
    68. [ADB] Current device property 'ro.build.version.release': 5.1.1
    69. [AndroidDriver] Using device: emulator-5554
    70. [ADB] Using 'adb.exe' from 'E:\androidsdk\android-sdk-windows\platform-tools\adb.exe'
    71. [ADB] Setting device id to emulator-5554
    72. [ADB] Running 'E:\androidsdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
    73. [ADB] Current device property 'ro.build.version.sdk': 22
    74. [ADB] Device API level: 22
    75. [AndroidDriver] No app sent in, not parsing package/activity
    76. [ADB] Running 'E:\androidsdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s emulator-5554 wait-for-device'
    77. [ADB] Running 'E:\androidsdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s emulator-5554 shell echo ping'
    78. [AndroidDriver] Pushing settings apk to device...
    79. [ADB] Getting install status for io.appium.settings
    80. [ADB] Running 'E:\androidsdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings'
    81. [ADB] 'io.appium.settings' is installed
    82. [ADB] Getting package info for 'io.appium.settings'
    83. [ADB] Running 'E:\androidsdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings'
    84. [ADB] Cannot extract apk info using apkanalyzer. Falling back to aapt. Original error: Could not find 'apkanalyzer.bat' in ["E:\\androidsdk\\android-sdk-windows\\platform-tools\\apkanalyzer.bat","E:\\androidsdk\\android-sdk-windows\\emulator\\apkanalyzer.bat","E:\\androidsdk\\android-sdk-windows\\tools\\apkanalyzer.bat","E:\\androidsdk\\android-sdk-windows\\tools\\bin\\apkanalyzer.bat","E:\\androidsdk\\android-sdk-windows\\build-tools\\29.0.2\\apkanalyzer.bat"]. Do you have Android Build Tools installed at 'E:\androidsdk\android-sdk-windows'?
    85. [ADB] Using 'aapt.exe' from 'E:\androidsdk\android-sdk-windows\build-tools\29.0.2\aapt.exe'
    86. [ADB] The version name of the installed 'io.appium.settings' is greater or equal to the application version name ('2.14.2' >= '2.14.2')
    87. [ADB] There is no need to install/upgrade 'C:\Users\Administrator\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\io.appium.settings\apks\settings_apk-debug.apk'
    88. [ADB] Getting IDs of all 'io.appium.settings' processes
    89. [ADB] Running 'E:\androidsdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s emulator-5554 shell 'pgrep --help; echo $?''
    90. [ADB] Running 'E:\androidsdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s emulator-5554 shell 'pidof --help > /dev/null; echo $?''
    91. [ADB] Using ps-based PID detection
    92. [ADB] Running 'E:\androidsdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s emulator-5554 shell ps'
    93. [AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions.
    94. [ADB] Running 'E:\androidsdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s emulator-5554 shell settings put secure mock_location 1'
    95. [Logcat] Starting logcat capture
    96. [ADB] Getting install status for io.appium.uiautomator2.server
    97. [ADB] Running 'E:\androidsdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server'
    98. [ADB] 'io.appium.uiautomator2.server' is installed
    99. [ADB] Getting package info for 'io.appium.uiautomator2.server'
    100. [ADB] Running 'E:\androidsdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server'
    101. [ADB] Cannot extract apk info using apkanalyzer. Falling back to aapt. Original error: Could not find 'apkanalyzer.bat' in ["E:\\androidsdk\\android-sdk-windows\\platform-tools\\apkanalyzer.bat","E:\\androidsdk\\android-sdk-windows\\emulator\\apkanalyzer.bat","E:\\androidsdk\\android-sdk-windows\\tools\\apkanalyzer.bat","E:\\androidsdk\\android-sdk-windows\\tools\\bin\\apkanalyzer.bat","E:\\androidsdk\\android-sdk-windows\\build-tools\\29.0.2\\apkanalyzer.bat"]. Do you have Android Build Tools installed at 'E:\androidsdk\android-sdk-windows'?
    102. [ADB] The version name of the installed 'io.appium.uiautomator2.server' is greater or equal to the application version name ('4.3.0' >= '4.3.0')
    103. [UiAutomator2] io.appium.uiautomator2.server installation state: sameVersionInstalled
    104. [ADB] Checking app cert for C:\Users\Administrator\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.3.0.apk
    105. [ADB] Using 'apksigner.bat' from 'E:\androidsdk\android-sdk-windows\build-tools\29.0.2\apksigner.bat'
    106. [ADB] Starting 'E:\androidsdk\android-sdk-windows\build-tools\29.0.2\apksigner.bat' with args '["verify","--print-certs","C:\\Users\\Administrator\\AppData\\Local\\Programs\\Appium\\resources\\app\\node_modules\\appium\\node_modules\\appium-uiautomator2-server\\apks\\appium-uiautomator2-server-v4.3.0.apk"]'
    107. [ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
    108. [ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
    109. [ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
    110. [ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
    111. [ADB]
    112. [ADB] 'C:\Users\Administrator\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.3.0.apk' is already signed.
    113. [ADB] Getting install status for io.appium.uiautomator2.server.test
    114. [ADB] Running 'E:\androidsdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server.test'
    115. [ADB] 'io.appium.uiautomator2.server.test' is not installed
    116. [ADB] Checking app cert for C:\Users\Administrator\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk
    117. [ADB] Starting 'E:\androidsdk\android-sdk-windows\build-tools\29.0.2\apksigner.bat' with args '["verify","--print-certs","C:\\Users\\Administrator\\AppData\\Local\\Programs\\Appium\\resources\\app\\node_modules\\appium\\node_modules\\appium-uiautomator2-server\\apks\\appium-uiautomator2-server-debug-androidTest.apk"]'
    118. [ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
    119. [ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
    120. [ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
    121. [ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
    122. [ADB]
    123. [ADB] 'C:\Users\Administrator\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk' is already signed.
    124. [UiAutomator2] Server packages are going to be (re)installed
    125. [ADB] Running 'E:\androidsdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s emulator-5554 shell 'ls -t -1 /data/local/tmp/appium_cache 2>&1 || echo _ERROR_''
    126. [ADB] The current Android API does not support extended ls options. Defaulting to no-options call
    127. [ADB] Running 'E:\androidsdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s emulator-5554 shell 'ls /data/local/tmp/appium_cache 2>&1 || echo _ERROR_''
    128. [ADB] The count of applications in the cache: 2
    129. [ADB] The application at 'C:\Users\Administrator\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.3.0.apk' is already cached to '/data/local/tmp/appium_cache/0cc1725a60a05dbb5d0d09256f2fc6ece7e3b10f.apk'
    130. [ADB] Running 'E:\androidsdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pm install -r /data/local/tmp/appium_cache/0cc1725a60a05dbb5d0d09256f2fc6ece7e3b10f.apk'
    131. [UiAutomator2] Deleting UiAutomator2 session
    132. [UiAutomator2] Deleting UiAutomator2 server session
    133. [WD Proxy] Matched '/' to command name 'deleteSession'
    134. [UiAutomator2] Did not get confirmation UiAutomator2 deleteSession worked; Error was: UnknownError: An unknown server-side error occurred while processing the command. Original error: Trying to proxy a session command without session id
    135. [ADB] Running 'E:\androidsdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am force-stop com.android.calculator2'
    136. [Logcat] Stopping logcat capture
    137. [ADB] Removing forwarded port socket connection: 8200
    138. [ADB] Running 'E:\androidsdk\android-sdk-windows\platform-tools\adb.exe -P 5037 -s emulator-5554 forward --remove tcp\:8200'
    139. [UiAutomator2] Unable to remove port forward 'Error executing adbExec. Original error: 'Command 'E:\\androidsdk\\android-sdk-windows\\platform-tools\\adb.exe -P 5037 -s emulator-5554 forward --remove tcp\:8200' exited with code 1'; Stderr: 'adb.exe: error: listener 'tcp:8200' not found'; Code: '1''
    140. [BaseDriver] Event 'newSessionStarted' logged at 1571708636226 (09:43:56 GMT+0800 (中国标准时间))
    141. [W3C] Encountered internal error running command: Error executing adbExec. Original error: 'Command 'E:\\androidsdk\\android-sdk-windows\\platform-tools\\adb.exe -P 5037 -s emulator-5554 shell pm install -r /data/local/tmp/appium_cache/0cc1725a60a05dbb5d0d09256f2fc6ece7e3b10f.apk' timed out after 20000ms'. Try to increase the 20000ms adb execution timeout represented by 'uiautomator2ServerInstallTimeout' capability
    142. [W3C] Error: Command 'E:\\androidsdk\\android-sdk-windows\\platform-tools\\adb.exe -P 5037 -s emulator-5554 shell pm install -r /data/local/tmp/appium_cache/0cc1725a60a05dbb5d0d09256f2fc6ece7e3b10f.apk' timed out after 20000ms
    143. [W3C]     at Timeout.setTimeout (C:\Users\Administrator\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\teen_process\lib\exec.js:125:19)
    144. [W3C]     at ontimeout (timers.js:427:11)
    145. [W3C]     at tryOnTimeout (timers.js:289:5)
    146. [W3C]     at listOnTimeout (timers.js:252:5)
    147. [W3C]     at Timer.processTimers (timers.js:212:10)
    148. [HTTP] <-- POST /wd/hub/session 500 28715 ms - 1450
    149. [HTTP]
    复制代码


    分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
    收藏收藏
    回复

    使用道具 举报

  • TA的每日心情
    慵懒
    3 天前
  • 签到天数: 1521 天

    连续签到: 5 天

    [LV.Master]测试大本营

    2#
    发表于 2022-7-4 11:03:46 | 只看该作者
    检查下环境配置把
    回复

    使用道具 举报

  • TA的每日心情
    奋斗
    3 天前
  • 签到天数: 1806 天

    连续签到: 5 天

    [LV.Master]测试大本营

    3#
    发表于 2022-7-4 11:12:56 | 只看该作者
    重新看下配置的环境
    回复

    使用道具 举报

  • TA的每日心情
    慵懒
    前天 08:51
  • 签到天数: 668 天

    连续签到: 6 天

    [LV.9]测试副司令

    4#
    发表于 2022-7-4 11:45:40 | 只看该作者
    没遇到过
    回复

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-11-25 03:05 , Processed in 0.068038 second(s), 21 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表