Appium appium 报错 500 具体日志已发

虎虎虎虎虎 · 2021年01月13日 · 最后由 MarvinWu 回复于 2021年01月13日 · 2557 次阅读
[Appium] Welcome to Appium v1.20.0
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[debug] [HTTP] Request idempotency key: 4db87b35-cdc4-4fc4-9dff-9340374475eb
[HTTP] --> POST /wd/hub/session
[HTTP] {"capabilities":{"firstMatch":[{"platformName":"android","appium:deviceName":"977707a29807","appium:appPackage":"com.app_qa","appium:appActivity":"com.wisdom_dyeing_fe_rn_demo_pre.MainActivity","appium:dontStopAppOnReset":false,"appium:newCommandTimeout":6000,"appium:noReset":true}]},"desiredCapabilities":{"platformName":"android","deviceName":"977707a29807","appPackage":"com.app_qa","appActivity":"com.wisdom_dyeing_fe_rn_demo_pre.MainActivity","dontStopAppOnReset":false,"newCommandTimeout":6000,"noReset":true}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"platformName":"android","deviceName":"977707a29807","appPackage":"com.app_qa","appActivity":"com.wisdom_dyeing_fe_rn_demo_pre.MainActivity","dontStopAppOnReset":false,"newCommandTimeout":6000,"noReset":true},null,{"firstMatch":[{"platformName":"android","appium:deviceName":"977707a29807","appium:appPackage":"com.app_qa","appium:appActivity":"com.wisdom_dyeing_fe_rn_demo_pre.MainActivity","appium:dontStopAppOnReset":false,"appium:newCommandTimeout":6000,"appium:noReset":true}]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1610503940437 (19:12:20 GMT-0700 (Mountain Standard Time))
[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.20.0 creating new AndroidUiautomator2Driver (v1.61.0) 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:deviceName": "977707a29807",
[debug] [BaseDriver]     "appium:appPackage": "com.app_qa",
[debug] [BaseDriver]     "appium:appActivity": "com.wisdom_dyeing_fe_rn_demo_pre.MainActivity",
[debug] [BaseDriver]     "appium:dontStopAppOnReset": false,
[debug] [BaseDriver]     "appium:newCommandTimeout": 6000,
[debug] [BaseDriver]     "appium:noReset": true
[debug] [BaseDriver]   },
[debug] [BaseDriver]   "firstMatch": [
[debug] [BaseDriver]     {}
[debug] [BaseDriver]   ]
[debug] [BaseDriver] }
[BaseDriver] Session created with session id: 9a598a1e-a862-430e-b955-fa539b32d48b
[UiAutomator2] Starting 'com.app_qa' directly on the device
[debug] [UiAutomator2] Deleting UiAutomator2 session
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1610503940729 (19:12:20 GMT-0700 (Mountain Standard Time))
[debug] [W3C] Encountered internal error running command: Error: Neither ANDROID_HOME nor ANDROID_SDK_ROOT environment variable was exported. Read https://developer.android.com/studio/command-line/variables for more details
[debug] [W3C]     at requireSdkRoot (/usr/local/lib/node_modules/appium/node_modules/_appium-adb@8.9.2@appium-adb/lib/helpers.js:36:11)
[debug] [W3C]     at Function.createADB (/usr/local/lib/node_modules/appium/node_modules/_appium-adb@8.9.2@appium-adb/lib/adb.js:55:23)
[debug] [W3C]     at Object.createBaseADB (/usr/local/lib/node_modules/appium/node_modules/_appium-android-driver@4.41.2@appium-android-driver/lib/android-helpers.js:108:20)
[debug] [W3C]     at Object.getDeviceInfoFromCaps (/usr/local/lib/node_modules/appium/node_modules/_appium-android-driver@4.41.2@appium-android-driver/lib/android-helpers.js:193:29)
[debug] [W3C]     at AndroidUiautomator2Driver.startUiAutomator2Session (/usr/local/lib/node_modules/appium/node_modules/_appium-uiautomator2-driver@1.61.0@appium-uiautomator2-driver/lib/driver.js:327:40)
[debug] [W3C]     at AndroidUiautomator2Driver.createSession (/usr/local/lib/node_modules/appium/node_modules/_appium-uiautomator2-driver@1.61.0@appium-uiautomator2-driver/lib/driver.js:224:18)
[debug] [W3C]     at processTicksAndRejections (node:internal/process/task_queues:93:5)
[debug] [W3C]     at AppiumDriver.createSession (/usr/local/lib/node_modules/appium/lib/appium.js:371:35)
[HTTP] <-- POST /wd/hub/session 500 428 ms - 865
共收到 1 条回复 时间 点赞

[W3C] Encountered internal error running command: Error: Neither ANDROID_HOME nor ANDROID_SDK_ROOT environment variable was exported.
顺着这里往下查吧

虎虎虎虎虎 关闭了讨论 08月20日 16:27
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册