问答 Appium-desktop 设置好参数(确认无误),点击 startsession 后,真机打开指定 app 后闪退

ArthurWang · 2021年04月22日 · 最后由 ArthurWang 回复于 2021年04月26日 · 4648 次阅读

前置条件:
MacOS 10.15.7
appium-desktop 1.8.3
node.js 12.8.1
华为真机 Android 10.0

操作步骤:
1.Appium-desktop 设置好参数(确认无误)
2.点击 start session 后

实际结果:
1.手机打开指定 app 后直接闪退
2.session 其实已经成功建立了

期望结果:
1.app 不会闪退
2.可以直接在 inspector 上进行 app 的元素定位等操作

PS:
1.app 是可以正常手动打开的,是混合 app,含有 webview

请问带哥们有碰到过类似的情况吗,如何解决的????跪谢

共收到 4 条回复 时间 点赞


排查到日志中可能跟这个报错有关系

[info] [35m[Appium][39m Welcome to Appium v1.18.3
[info] [35m[Appium][39m Non-default server args:
[info] [35m[Appium][39m relaxedSecurityEnabled: true
[info] [35m[Appium][39m allowInsecure: {
[info] [35m[Appium][39m }
[info] [35m[Appium][39m denyInsecure: {
[info] [35m[Appium][39m }
[info] [35m[Appium][39m Appium REST http interface listener started on 0.0.0.0:4723[info] [35m[HTTP][39m [37m-->[39m [37mPOST[39m [37m/wd/hub/session[39m
[info] [35m[HTTP][39m [90m{"desiredCapabilities":{"appActivity":"com.tencent.tauth.AuthActivity","appPackage":"com.hundsun.crm.debug","automationName":"UiAutomator2","deviceName":"3l","enableWebviewDetailsCollection":true,"ensureWebviewsHavePages":true,"platformName":"Android","platformVersion":"10","newCommandTimeout":0,"connectHardwareKeyboard":true}}[39m
[debug] [35m[MJSONWP][39m Calling AppiumDriver.createSession() with args: [{"appActivity":"com.tencent.tauth.AuthActivity","appPackage":"com.hundsun.crm.debug","automationName":"UiAutomator2","deviceName":"3l","enableWebviewDetailsCollection":true,"ensureWebviewsHavePages":true,"platformName":"Android","platformVersion":"10","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null]
[debug] [35m[BaseDriver][39m Event 'newSessionRequested' logged at 1619156935550 (13:48:55 GMT+0800 (China Standard Time))
[info] [35m[Appium][39m Appium v1.18.3 creating new AndroidUiautomator2Driver (v1.56.1) session
[info] [35m[Appium][39m Applying relaxed security to 'AndroidUiautomator2Driver' as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure
[debug] [35m[BaseDriver][39m Creating session with MJSONWP desired capabilities: {
[debug] [35m[BaseDriver][39m "appActivity": "com.tencent.tauth.AuthActivity",
[debug] [35m[BaseDriver][39m "appPackage": "com.hundsun.crm.debug",
[debug] [35m[BaseDriver][39m "automationName": "UiAutomator2",
[debug] [35m[BaseDriver][39m "deviceName": "3l",
[debug] [35m[BaseDriver][39m "enableWebviewDetailsCollection": true,
[debug] [35m[BaseDriver][39m "ensureWebviewsHavePages": true,
[debug] [35m[BaseDriver][39m "platformName": "Android",
[debug] [35m[BaseDriver][39m "platformVersion": "10",
[debug] [35m[BaseDriver][39m "newCommandTimeout": 0,
[debug] [35m[BaseDriver][39m "connectHardwareKeyboard": true
[debug] [35m[BaseDriver][39m }
[warn] [35m[BaseDriver][39m The following capabilities were provided, but are not recognized by Appium:
[warn] [35m[BaseDriver][39m connectHardwareKeyboard
[info] [35m[BaseDriver][39m Session created with session id: 2b3b8850-373d-4f10-adab-e76e704636f5
[info] [35m[UiAutomator2][39m Starting 'com.hundsun.crm.debug' directly on the device
[info] [35m[ADB][39m Using 'adb' from '/Users/arthurw/Library/Android/sdk/platform-tools/adb'
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 start-server'
[info] [35m[AndroidDriver][39m Retrieving device list
[debug] [35m[ADB][39m Trying to find a connected android device
[debug] [35m[ADB][39m Getting connected devices[debug] [35m[ADB][39m Current device property 'ro.build.version.release': 10
[info] [35m[AndroidDriver][39m Using device: emulator-5554
[info] [35m[ADB][39m Using 'adb' from '/Users/arthurw/Library/Android/sdk/platform-tools/adb'
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 start-server'
[debug] [35m[ADB][39m Setting device id to emulator-5554
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
[debug] [35m[ADB][39m Current device property 'ro.build.version.sdk': 29
[info] [35m[ADB][39m Getting device platform version
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.release'
[debug] [35m[ADB][39m Current device property 'ro.build.version.release': 10
[debug] [35m[ADB][39m Device API level: 29
[info] [35m[UiAutomator2][39m Relaxing hidden api policy
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'settings put global hidden_api_policy_pre_p_apps 1;settings put global hidden_api_policy_p_apps 1;settings put global hidden_api_policy 1''
[warn] [35m[AndroidDriver][39m No app sent in, not parsing package/activity
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 wait-for-device'
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell echo ping'[debug] [35m[AndroidDriver][39m Pushing settings apk to device...
[debug] [35m[ADB][39m Getting install status for io.appium.settings
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings'
[debug] [35m[ADB][39m 'io.appium.settings' is installed
[debug] [35m[ADB][39m Getting package info for 'io.appium.settings'
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings'
[debug] [35m[ADB][39m The version name of the installed 'io.appium.settings' is greater or equal to the application version name ('3.2.0' >= '3.2.0')
[debug] [35m[ADB][39m There is no need to install/upgrade '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/io.appium.settings/apks/settings_apk-debug.apk'
[debug] [35m[ADB][39m Getting IDs of all 'io.appium.settings' processes
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'pgrep --help; echo $?''
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pgrep -f io\.appium\.settings'
[debug] [35m[AndroidDriver][39m io.appium.settings is already running. There is no need to reset its permissions.
[debug] [35m[Logcat][39m Starting logs capture with command: /Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 logcat -v threadtime
[debug] [35m[UiAutomator2][39m Forwarding UiAutomator2 Server port 6790 to 8200
[debug] [35m[ADB][39m Forwarding system: 8200 to device: 6790
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward tcp:8200 tcp:6790'
[debug] [35m[ADB][39m Getting install status for io.appium.uiautomator2.server
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server'[debug] [35m[ADB][39m 'io.appium.uiautomator2.server' is installed
[debug] [35m[ADB][39m Getting package info for 'io.appium.uiautomator2.server'
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server'
[debug] [35m[ADB][39m The version name of the installed 'io.appium.uiautomator2.server' is greater or equal to the application version name ('4.12.2' >= '4.12.2')
[debug] [35m[UiAutomator2][39m io.appium.uiautomator2.server installation state: sameVersionInstalled
[debug] [35m[ADB][39m Checking app cert for /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.12.2.apk
[info] [35m[ADB][39m Using 'apksigner.jar' from '/Users/arthurw/Library/Android/sdk/build-tools/29.0.3/lib/apksigner.jar'
[debug] [35m[ADB][39m Starting apksigner: /Library/Java/JavaVirtualMachines/jdk-11.0.7.jdk/Contents/Home/bin/java -Xmx1024M -Xss1m -jar /Users/arthurw/Library/Android/sdk/build-tools/29.0.3/lib/apksigner.jar verify --print-certs /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.12.2.apk[debug] [35m[ADB][39m apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [35m[ADB][39m Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [35m[ADB][39m Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] [35m[ADB][39m Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [35m[ADB][39m
[debug] [35m[ADB][39m '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.12.2.apk' is signed with the default certificate
[debug] [35m[ADB][39m Getting install status for io.appium.uiautomator2.server.test
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server.test'[debug] [35m[ADB][39m 'io.appium.uiautomator2.server.test' is installed
[debug] [35m[ADB][39m Checking app cert for /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk
[debug] [35m[ADB][39m Starting apksigner: /Library/Java/JavaVirtualMachines/jdk-11.0.7.jdk/Contents/Home/bin/java -Xmx1024M -Xss1m -jar /Users/arthurw/Library/Android/sdk/build-tools/29.0.3/lib/apksigner.jar verify --print-certs /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk[debug] [35m[ADB][39m apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [35m[ADB][39m Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [35m[ADB][39m Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] [35m[ADB][39m Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [35m[ADB][39m
[debug] [35m[ADB][39m '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk' is signed with the default certificate
[info] [35m[UiAutomator2][39m Server packages are not going to be (re) installed
[debug] [35m[UiAutomator2][39m Waiting up to 30000ms for services to be available
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm list instrumentation'
[debug] [35m[UiAutomator2][39m Instrumentation target 'io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner' is available
[debug] [35m[UiAutomator2][39m No app capability. Assuming it is already on the device
[debug] [35m[ADB][39m Getting install status for com.hundsun.crm.debug
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package com.hundsun.crm.debug'
[debug] [35m[ADB][39m 'com.hundsun.crm.debug' is installed
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop com.hundsun.crm.debug'
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm clear com.hundsun.crm.debug'
[debug] [35m[AndroidDriver][39m Performed fast reset on the installed 'com.hundsun.crm.debug' application (stop and clear)
[debug] [35m[UiAutomator2][39m Performing shallow cleanup of automation leftovers
[debug] [35m[UiAutomator2][39m No obsolete sessions have been detected (socket hang up)
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.uiautomator2.server.test'[info] [35m[UiAutomator2][39m Starting UIAutomator2 server 4.12.2
[info] [35m[UiAutomator2][39m Using UIAutomator2 server from '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.12.2.apk' and test from '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk'
[info] [35m[UiAutomator2][39m Waiting up to 30000ms for UiAutomator2 to be online...
[debug] [35m[ADB][39m Creating ADB subprocess with args: ["-P",5037,"-s","emulator-5554","shell","am","instrument","-w","io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner"][debug] [35m[Instrumentation][39m INSTRUMENTATION_RESULT: shortMsg=Process crashed.
[debug] [35m[Instrumentation][39m INSTRUMENTATION_CODE: 0
[debug] [35m[Instrumentation][39m The process has exited with code 0[debug] [35m[WD Proxy][39m Matched '/status' to command name 'getStatus'
[debug] [35m[WD Proxy][39m Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body
[info] [35m[WD Proxy][39m socket hang up
[debug] [35m[Instrumentation][39m io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:[debug] [35m[WD Proxy][39m Matched '/status' to command name 'getStatus'
[debug] [35m[WD Proxy][39m Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body
[info] [35m[WD Proxy][39m socket hang up[debug] [35m[WD Proxy][39m Matched '/status' to command name 'getStatus'
[debug] [35m[WD Proxy][39m Proxying [GET /status] to [GET http://127.0.0.1:8200/wd/hub/status] with no body
[debug] [35m[WD Proxy][39m Got response with status 200: {"sessionId":"None","value":{"message":"UiAutomator2 Server is ready to accept commands","ready":true}}
[debug] [35m[UiAutomator2][39m The initialization of the instrumentation process took 3183ms
[debug] [35m[WD Proxy][39m Matched '/session' to command name 'createSession'
[debug] [35m[WD Proxy][39m Proxying [POST /session] to [POST http://127.0.0.1:8200/wd/hub/session] with body: {"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"appActivity":"com.tencent.tauth.AuthActivity","appPackage":"com.hundsun.crm.debug","automationName":"UiAutomator2","deviceName":"3l","enableWebviewDetailsCollection":true,"ensureWebviewsHavePages":true,"platformName":"Android","platformVersion":"10","newCommandTimeout":0,"connectHardwareKeyboard":true},"appActivity":"com.tencent.tauth.AuthActivity","appPackage":"com.hundsun.crm.debug","automationName":"UiAutomator2","deviceName":"emulator-5554","enableWebviewDetailsCollection":true,"ensureWebviewsHavePages":true,"platformName":"Android","platformVersion":"10","newCommandTimeout":0,"connectHardwareKeyboard":true,"deviceUDID":"emulator-5554"}],"alwaysMatch":{}}}[debug] [35m[WD Proxy][39m Got response with status 200: {"sessionId":"5b40a788-a59f-428e-a310-07b1bc63803d","value":{"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"appActivity":"com.tencent.tauth.AuthActivity","appPackage":"com.hundsun.crm.debug","automationName":"UiAutomator2","deviceName":"3l","enableWebviewDetailsCollection":true,"ensureWebviewsHavePages":true,"platformName":"Android","platformVersion":"10","newCommandTimeout":0,"connectHardwareKeyboard":true},"appActivity":"com.tencent.tauth.AuthActivity","appPackage":"com.hundsun.crm.debug","automationName":"UiAutomator2","deviceName":"emulator-5554","enableWebviewDetailsCollection":true,"ensureWebviewsHavePages":true,"platformName":"Android","platformVersion":"10","newCommandTimeout":0,"connectHardwareKeyboard":true,"deviceUDID":"emulator-5554"}],"alwaysMatch":{}},"sessionId":"5b40a788-a59f-428e-a310-07b1bc63803d"}}
[info] [35m[WD Proxy][39m Determined the downstream protocol as 'W3C'
[debug] [35m[WD Proxy][39m Proxying [GET /appium/device/info] to [GET http://127.0.0.1:8200/wd/hub/session/5b40a788-a59f-428e-a310-07b1bc63803d/appium/device/info] with no body
[debug] [35m[WD Proxy][39m Got response with status 200: {"sessionId":"5b40a788-a59f-428e-a310-07b1bc63803d","value":{"androidId":"473c9c4b6e67b2a2","apiVersion":"29","bluetooth":null,"brand":"google","carrierName":"Android","displayDensity":400,"locale":"en_US","manufacturer":"Google","model":"Android SDK built for x86","networks":[{"capabilities":{"SSID":null,"linkDownBandwidthKbps":102400,"linkUpstreamBandwidthKbps":51200,"networkCapabilities":"NET_CAPABILITY_MMS,NET_CAPABILITY_SUPL,NET_CAPABILITY_DUN,NET_CAPABILITY_FOTA,NET_CAPABILITY_IMS,NET_CAPABILITY_CBS,NET_CAPABILITY_INTERNET,NET_CAPABILITY_NOT_RESTRICTED,NET_CAPABILITY_TRUSTED,NET_CAPABILITY_NOT_VPN,NET_CAPABILITY_NOT_ROAMING,NET_CAPABILITY_NOT_CONGESTED,NET_CAPABILITY_NOT_SUSPENDED","signalStrength":-2147483648,"transportTypes":"TRANSPORT_CELLULAR"},"detailedState":"CONNECTED","extraInfo":"epc.tmobile.com","isAvailable":true,"isConnected":true,"isFailover":false,"isRoaming":false,"state":"CONNECTED","subtype":13,"subtypeName":"LTE","type":0,"typeName":"MOBILE"},{"capabilities":{"SSID":null,"linkDownBa...
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys window'
[info] [35m[AndroidDriver][39m Screen already unlocked, doing nothing
[info] [35m[UiAutomator2][39m Starting 'com.hundsun.crm.debug/com.tencent.tauth.AuthActivity and waiting for 'com.hundsun.crm.debug/com.tencent.tauth.AuthActivity'
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am start -W -n com.hundsun.crm.debug/com.tencent.tauth.AuthActivity -S'[debug] [35m[WD Proxy][39m Proxying [GET /appium/device/pixel_ratio] to [GET http://127.0.0.1:8200/wd/hub/session/5b40a788-a59f-428e-a310-07b1bc63803d/appium/device/pixel_ratio] with no body
[debug] [35m[WD Proxy][39m Got response with status 200: {"sessionId":"5b40a788-a59f-428e-a310-07b1bc63803d","value":2.5}
[debug] [35m[WD Proxy][39m Matched '/appium/device/system_bars' to command name 'getSystemBars'
[debug] [35m[WD Proxy][39m Proxying [GET /appium/device/system_bars] to [GET http://127.0.0.1:8200/wd/hub/session/5b40a788-a59f-428e-a310-07b1bc63803d/appium/device/system_bars] with no body
[debug] [35m[WD Proxy][39m Got response with status 200: {"sessionId":"5b40a788-a59f-428e-a310-07b1bc63803d","value":{"statusBar":60}}
[debug] [35m[WD Proxy][39m Matched '/window/current/size' to command name 'getWindowSize'
[debug] [35m[WD Proxy][39m Proxying [GET /window/current/size] to [GET http://127.0.0.1:8200/wd/hub/session/5b40a788-a59f-428e-a310-07b1bc63803d/window/current/size] with no body[debug] [35m[WD Proxy][39m Got response with status 200: {"sessionId":"5b40a788-a59f-428e-a310-07b1bc63803d","value":{"height":2040,"width":1080}}
[info] [35m[Appium][39m New AndroidUiautomator2Driver session created successfully, session 2b3b8850-373d-4f10-adab-e76e704636f5 added to master session list
[debug] [35m[BaseDriver][39m Event 'newSessionStarted' logged at 1619156945201 (13:49:05 GMT+0800 (China Standard Time))
[debug] [35m[MJSONWP (2b3b8850)][39m Cached the protocol value 'MJSONWP' for the new session 2b3b8850-373d-4f10-adab-e76e704636f5
[debug] [35m[MJSONWP (2b3b8850)][39m Responding to client with driver.createSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"appActivity":"com.tencent.tauth.AuthActivity","appPackage":"com.hundsun.crm.debug","automationName":"UiAutomator2","deviceName":"3l","enableWebviewDetailsCollection":true,"ensureWebviewsHavePages":true,"platformName":"Android","platformVersion":"10","newCommandTimeout":0,"connectHardwareKeyboard":true},"appActivity":"com.tencent.tauth.AuthActivity","appPackage":"com.hundsun.crm.debug","automationName":"UiAutomator2","deviceName":"emulator-5554","enableWebviewDetailsCollection":true,"ensureWebviewsHavePages":true,"platformName":"Android","platformVersion":"10","newCommandTimeout":0,"connectHardwareKeyboard":true,"deviceUDID":"emulator-5554","deviceApiLevel":29,"deviceScreenSize":"1080x2160","deviceScreenDensity":400,"deviceModel":"Android SDK built for x86","deviceManufacturer":"Google","pixelRatio":2.5,...
[info] [35m[HTTP][39m [37m<-- POST /wd/hub/session [39m[32m200[39m [90m9654 ms - 1174[39m
[info] [35m[HTTP][39m [90m[39m[info] [35m[HTTP][39m [37m-->[39m [37mGET[39m [37m/wd/hub/session/2b3b8850-373d-4f10-adab-e76e704636f5/contexts[39m
[info] [35m[HTTP][39m [90m{}[39m
[debug] [35m[MJSONWP (2b3b8850)][39m Calling AppiumDriver.getContexts() with args: ["2b3b8850-373d-4f10-adab-e76e704636f5"]
[debug] [35m[AndroidDriver][39m Getting a list of available webviews
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell cat /proc/net/unix'
[debug] [35m[AndroidDriver][39m Parsed 1 active devtools socket: ["@webview_devtools_remote_17962"]
[debug] [35m[AndroidDriver][39m Collecting CDP data of 1 webview
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward tcp:10900 localabstract:webview_devtools_remote_17962'
[debug] [35m[ADB][39m Removing forwarded port socket connection: 10900
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward --remove tcp:10900'[debug] [35m[AndroidDriver][39m CDP data collection completed
[info] [35m[AndroidDriver][39m Skipping the webview 'WEBVIEW_17962' at '@webview_devtools_remote_17962' since it has reported having zero pages
[debug] [35m[AndroidDriver][39m Found 0 webviews: []
[debug] [35m[AndroidDriver][39m Available contexts: ["NATIVE_APP"]
[debug] [35m[MJSONWP (2b3b8850)][39m Responding to client with driver.getContexts() result: ["NATIVE_APP"]
[info] [35m[HTTP][39m [37m<-- GET /wd/hub/session/2b3b8850-373d-4f10-adab-e76e704636f5/contexts [39m[32m200[39m [90m93 ms - 86[39m
[info] [35m[HTTP][39m [90m[39m
[info] [35m[HTTP][39m [37m-->[39m [37mGET[39m [37m/wd/hub/session/2b3b8850-373d-4f10-adab-e76e704636f5/context[39m
[info] [35m[HTTP][39m [90m{}[39m
[debug] [35m[MJSONWP (2b3b8850)][39m Calling AppiumDriver.getCurrentContext() with args: ["2b3b8850-373d-4f10-adab-e76e704636f5"]
[debug] [35m[MJSONWP (2b3b8850)][39m Responding to client with driver.getCurrentContext() result: "NATIVE_APP"
[info] [35m[HTTP][39m [37m<-- GET /wd/hub/session/2b3b8850-373d-4f10-adab-e76e704636f5/context [39m[32m200[39m [90m1 ms - 84[39m
[info] [35m[HTTP][39m [90m[39m
[info] [35m[HTTP][39m [37m-->[39m [37mGET[39m [37m/wd/hub/session/2b3b8850-373d-4f10-adab-e76e704636f5[39m
[info] [35m[HTTP][39m [90m{}[39m
[debug] [35m[MJSONWP (2b3b8850)][39m Calling AppiumDriver.getSession() with args: ["2b3b8850-373d-4f10-adab-e76e704636f5"]
[debug] [35m[UiAutomator2][39m Getting session details from server to mix in
[debug] [35m[WD Proxy][39m Matched '/' to command name 'getSession'
[debug] [35m[WD Proxy][39m Proxying [GET /] to [GET http://127.0.0.1:8200/wd/hub/session/5b40a788-a59f-428e-a310-07b1bc63803d] with no body
[debug] [35m[WD Proxy][39m Got response with status 200: {"sessionId":"5b40a788-a59f-428e-a310-07b1bc63803d","value":{"lastScrollData":null}}
[debug] [35m[MJSONWP (2b3b8850)][39m Responding to client with driver.getSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"appActivity":"com.tencent.tauth.AuthActivity","appPackage":"com.hundsun.crm.debug","automationName":"UiAutomator2","deviceName":"3l","enableWebviewDetailsCollection":true,"ensureWebviewsHavePages":true,"platformName":"Android","platformVersion":"10","newCommandTimeout":0,"connectHardwareKeyboard":true},"appActivity":"com.tencent.tauth.AuthActivity","appPackage":"com.hundsun.crm.debug","automationName":"UiAutomator2","deviceName":"emulator-5554","enableWebviewDetailsCollection":true,"ensureWebviewsHavePages":true,"platformName":"Android","platformVersion":"10","newCommandTimeout":0,"connectHardwareKeyboard":true,"deviceUDID":"emulator-5554","deviceApiLevel":29,"deviceScreenSize":"1080x2160","deviceScreenDensity":400,"deviceModel":"Android SDK built for x86","deviceManufacturer":"Google","pixelRatio":2.5,...
[info] [35m[HTTP][39m [37m<-- GET /wd/hub/session/2b3b8850-373d-4f10-adab-e76e704636f5 [39m[32m200[39m [90m16 ms - 1196[39m
[info] [35m[HTTP][39m [90m[39m
[info] [35m[HTTP][39m [37m-->[39m [37mGET[39m [37m/wd/hub/session/2b3b8850-373d-4f10-adab-e76e704636f5/window/current/size[39m
[info] [35m[HTTP][39m [90m{}[39m
[info] [35m[MJSONWP (2b3b8850)][39m Driver proxy active, passing request on via HTTP proxy
[debug] [35m[WD Proxy][39m Matched '/wd/hub/session/2b3b8850-373d-4f10-adab-e76e704636f5/window/current/size' to command name 'getWindowSize'
[debug] [35m[WD Proxy][39m Proxying [GET /wd/hub/session/2b3b8850-373d-4f10-adab-e76e704636f5/window/current/size] to [GET http://127.0.0.1:8200/wd/hub/session/5b40a788-a59f-428e-a310-07b1bc63803d/window/current/size] with no body
[debug] [35m[WD Proxy][39m Got response with status 200: {"sessionId":"5b40a788-a59f-428e-a310-07b1bc63803d","value":{"height":2040,"width":1080}}
[info] [35m[WD Proxy][39m Replacing sessionId 5b40a788-a59f-428e-a310-07b1bc63803d with 2b3b8850-373d-4f10-adab-e76e704636f5
[info] [35m[HTTP][39m [37m<-- GET /wd/hub/session/2b3b8850-373d-4f10-adab-e76e704636f5/window/current/size [39m[32m200[39m [90m27 ms - 100[39m
[info] [35m[HTTP][39m [90m[39m
[info] [35m[HTTP][39m [37m-->[39m [37mGET[39m [37m/wd/hub/session/2b3b8850-373d-4f10-adab-e76e704636f5/context[39m
[info] [35m[HTTP][39m [90m{}[39m
[debug] [35m[MJSONWP (2b3b8850)][39m Calling AppiumDriver.getCurrentContext() with args: ["2b3b8850-373d-4f10-adab-e76e704636f5"]
[debug] [35m[MJSONWP (2b3b8850)][39m Responding to client with driver.getCurrentContext() result: "NATIVE_APP"
[info] [35m[HTTP][39m [37m<-- GET /wd/hub/session/2b3b8850-373d-4f10-adab-e76e704636f5/context [39m[32m200[39m [90m1 ms - 84[39m
[info] [35m[HTTP][39m [90m[39m
[info] [35m[HTTP][39m [37m-->[39m [37mGET[39m [37m/wd/hub/session/2b3b8850-373d-4f10-adab-e76e704636f5/contexts[39m
[info] [35m[HTTP][39m [90m{}[39m
[debug] [35m[MJSONWP (2b3b8850)][39m Calling AppiumDriver.getContexts() with args: ["2b3b8850-373d-4f10-adab-e76e704636f5"]
[debug] [35m[AndroidDriver][39m Getting a list of available webviews
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell cat /proc/net/unix'
[debug] [35m[AndroidDriver][39m Parsed 1 active devtools socket: ["@webview_devtools_remote_17962"]
[debug] [35m[AndroidDriver][39m Collecting CDP data of 1 webview
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward tcp:10900 localabstract:webview_devtools_remote_17962'
[debug] [35m[ADB][39m Removing forwarded port socket connection: 10900
[debug] [35m[ADB][39m Running '/Users/arthurw/Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward --remove tcp:10900'
[debug] [35m[AndroidDriver][39m CDP data collection completed
[info] [35m[AndroidDriver][39m Skipping the webview 'WEBVIEW_17962' at '@webview_devtools_remote_17962' since it has reported having zero pages
[debug] [35m[AndroidDriver][39m Found 0 webviews: []
[debug] [35m[AndroidDriver][39m Available contexts: ["NATIVE_APP"]
[debug] [35m[MJSONWP (2b3b8850)][39m Responding to client with driver.getContexts() result: ["NATIVE_APP"]
[info] [35m[HTTP][39m [37m<-- GET /wd/hub/session/2b3b8850-373d-4f10-adab-e76e704636f5/contexts [39m[32m200[39m [90m101 ms - 86[39m
[info] [35m[HTTP][39m [90m[39m
[info] [35m[HTTP][39m [37m-->[39m [37mPOST[39m [37m/wd/hub/session/2b3b8850-373d-4f10-adab-e76e704636f5/context[39m
[info] [35m[HTTP][39m [90m{"name":"NATIVE_APP"}[39m
[debug] [35m[MJSONWP (2b3b8850)][39m Calling AppiumDriver.setContext() with args: ["NATIVE_APP","2b3b8850-373d-4f10-adab-e76e704636f5"]
[debug] [35m[MJSONWP (2b3b8850)][39m Responding to client with driver.setContext() result: null
[info] [35m[HTTP][39m [37m<-- POST /wd/hub/session/2b3b8850-373d-4f10-adab-e76e704636f5/context [39m[32m200[39m [90m1 ms - 76[39m
[info] [35m[HTTP][39m [90m[39m
[info] [35m[HTTP][39m [37m-->[39m [37mGET[39m [37m/wd/hub/session/2b3b8850-373d-4f10-adab-e76e704636f5/source[39m
[info] [35m[HTTP][39m [90m{}[39m
[info] [35m[MJSONWP (2b3b8850)][39m Driver proxy active, passing request on via HTTP proxy
[debug] [35m[WD Proxy][39m Matched '/wd/hub/session/2b3b8850-373d-4f10-adab-e76e704636f5/source' to command name 'getPageSource'
[debug] [35m[WD Proxy][39m Proxying [GET /wd/hub/session/2b3b8850-373d-4f10-adab-e76e704636f5/source] to [GET http://127.0.0.1:8200/wd/hub/session/5b40a788-a59f-428e-a310-07b1bc63803d/source] with no body[debug] [35m[WD Proxy][39m Got response with status 200: {"sessionId":"5b40a788-a59f-428e-a310-07b1bc63803d","value":"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\r\n\r\n \r\n \r\n [info] [35m[WD Proxy][39m Replacing sessionId 5b40a788-a59f-428e-a310-07b1bc63803d with 2b3b8850-373d-4f10-adab-e76e704636f5
[info] [35m[HTTP][39m [37m<-- GET /wd/hub/session/2b3b8850-373d-4f10-adab-e76e704636f5/source [39m[32m200[39m [90m450 ms - 11181[39m
[info] [35m[HTTP][39m [90m[39m
[info] [35m[HTTP][39m [37m-->[39m [37mGET[39m [37m/wd/hub/session/2b3b8850-373d-4f10-adab-e76e704636f5/screenshot[39m
[info] [35m[HTTP][39m [90m{}[39m
[debug] [35m[MJSONWP (2b3b8850)][39m Calling AppiumDriver.getScreenshot() with args: ["2b3b8850-373d-4f10-adab-e76e704636f5"]
[debug] [35m[WD Proxy][39m Matched '/screenshot' to command name 'getScreenshot'
[debug] [35m[WD Proxy][39m Proxying [GET /screenshot] to [GET http://127.0.0.1:8200/wd/hub/session/5b40a788-a59f-428e-a310-07b1bc63803d/screenshot] with no body[debug] [35m[WD Proxy][39m Got response with status 200: {"sessionId":"5b40a788-a59f-428e-a310-07b1bc63803d","value":"iVBORw0KGgoAAAANSUhEUgAABDgAAAhwCAYAAADIu476AAAAAXNSR0IArs4c6QAAAARzQklUCAgI\nCHwIZIgAACAASURBVHic7N1nkCTXgSf2/8vMsu27x3sPNzPAwAyHwMCDBgsSBJfL3SX3tLsn3a05\nXSh0Cini9En6qFDEnqS7i4vTflDs7nHtrbsjCS65oAHhObCDGQwG471vX74yUx+yqrp8ZVWleZn5\n/5GN7umuynz5XL589Yz433/rfzQ1VUU6kUJci0E3dBimgRoTRERE9gi/A0BEREREUaXFVA2aqkFT\nVaiqCqEImIbR+Cp2chARUS/s3CAiIiIiH2mj6TRURUUyFoemaTBNEyY7NIiIaBC8fxARERGRT7Rk\nLA5VVRDXYtBUrfGvbKgSERERERERUQBoZb0E01QRUzW09GhwuDEREfWDHeNERERE5BOtbBiAUGAA\ngGCPBhERDYG3ESIiIiLyiQKTrVEiIiIiIiIiCjZNKAKKUGpfRERERERERERBs7KqqInAzp3mGBQi\nIiIiIiKiaNMEKv8T1lcQBTPUREREREREROQUTQBW50blf0HkW6gDOuKFiIiIiIiIKGw0jn8YQgii\nTigCQigYWz2FXZ/bh1XbNiCeTCC7sIxrJ8/j7JFjKGRyAADTZI8OEREREZFM2EInWqFZ01I4RSVS\nBDC9YQ0e+vqzGJuZXEn3uohMjKQwtWE17n3qEQBW58bNs5dw5G9/jEI2x5qUiIiIiIiIpKIJAdR/\nRV6vB/eAx9GW/Xvw8EvPQAjF3rVU+z6EwNpdW/DC//LbKOYK+NG//zMUs3lXw0pERERERN0F/PHE\nV/F0ErFEHKqmIpZMtH1NKV+AXtZRKhQD/fyz9YG7ceHDT107fnpyDCOTYx3/nplfQnZ+ybXzV1V2\nUak81Ue9dJjoHQcBjaPkaBpf...
[debug] [35m[MJSONWP (2b3b8850)][39m Responding to client with driver.getScreenshot() result: "iVBORw0KGgoAAAANSUhEUgAABDgAAAhwCAYAAADIu476AAAAAXNSR0IArs4c6QAAAARzQklUCAgI\nCHwIZIgAACAASURBVHic7N1nkCTXgSf2/8vMsu27x3sPNzPAwAyHwMCDBgsSBJfL3SX3tLsn3a05\nXSh0Cini9En6qFDEnqS7i4vTflDs7nHtrbsjCS65oAHhObCDGQwG471vX74yUx+yqrp8ZVWleZn5\n/5GN7umuynz5XL589Yz433/rfzQ1VUU6kUJci0E3dBimgRoTRERE9gi/A0BEREREUaXFVA2aqkFT\nVaiqCqEImIbR+Cp2chARUS/s3CAiIiIiH2mj6TRURUUyFoemaTBNEyY7NIiIaBC8fxARERGRT7Rk\nLA5VVRDXYtBUrfGvbKgSERERERERUQBoZb0E01QRUzW09GhwuDEREfWDHeNERERE5BOtbBiAUGAA\ngGCPBhERDYG3ESIiIiLyiQKTrVEiIiIiIiIiCjZNKAKKUGpfRERERERERERBs7KqqInAzp3mGBQi\nIiIiIiKiaNMEKv8T1lcQBTPUREREREREROQUTQBW50blf0HkW6gDOuKFiIiIiIiIKGw0jn8YQgii\nTigCQigYWz2FXZ/bh1XbNiCeTCC7sIxrJ8/j7JFjKGRyAADTZI8OEREREZFM2EInWqFZ01I4RSVS\nBDC9YQ0e+vqzGJuZXEn3uohMjKQwtWE17n3qEQBW58bNs5dw5G9/jEI2x5qUiIiIiIiIpKIJAdR/\nRV6vB/eAx9GW/Xvw8EvPQAjF3rVU+z6EwNpdW/DC//LbKOYK+NG//zMUs3lXw0pERERERN0F/PHE\nV/F0ErFEHKqmIpZMtH1NKV+AXtZRKhQD/fyz9YG7ceHDT107fnpyDCOTYx3/nplfQnZ+ybXzV1V2\nUak81Ue9dJjoHQcBjaPkaBpf+O+/hXiHgmuXEAKJdBIPfvUpvP1X/+BQ6OQSTyUxOjOBuSs3OS3H\nJ6u2bs...
[info] [35m[HTTP][39m [37m<-- GET /wd/hub/session/2b3b8850-373d-4f10-adab-e76e704636f5/screenshot [39m[32m200[39m [90m768 ms - 826260[39m
[info] [35m[HTTP][39m [90m[39m

第 104 行的 [39m INSTRUMENTATION_RESULT: shortMsg=Process crashed.可能是问题所在,但是这个进程是啥东西,有带哥知道吗???

appium 的测试辅助 apk

甬力君 回复

你是说 UIautomator 的问题吗

ArthurWang 关闭了讨论 04月26日 15:25
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册