AppCrawler 运行测试报错Exception in thread “main” org.openqa.selenium.WebDriverException: Unable to parse remote response: Parameters were incorrect. We wanted {“required”:[“desiredCapabilities”],“optional”:[“requiredCapabilities”,“sessionId”,“id”]} and you sen

运行命令java -jar appcrawler.jar -a /Users/liwen/Downloads/com.xueqiu.android_12.38.2_liqucn.com.apk 报错

2021-07-11 23:38:20 INFO [Crawler.setupAppium.262] use AppiumClient

Exception in thread “main” org.openqa.selenium.WebDriverException: Unable to parse remote response: Parameters were incorrect. We wanted {“required”:[“desiredCapabilities”],“optional”:[“requiredCapabilities”,“sessionId”,“id”]} and you sent [“desiredCapabilities”,“requiredCapabilities”,“capabilities”]

Build info: version: ‘unknown’, revision: ‘unknown’, time: ‘unknown’

System info: host: ‘liwendeMacBook-Pro.local’, ip: ‘2409:8a1e:3b44:8c70:5dd7:5fa4:2625:8b5b%en0’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.15.7’, java.version: ‘1.8.0_271’

Driver info: driver.version: AndroidDriver

at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:347)

at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:136)

at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)

at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:89)

at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:586)

at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)

at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)

at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)

at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:217)

at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:140)

at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:38)

at io.appium.java_client.AppiumDriver.(AppiumDriver.java:83)

at io.appium.java_client.AppiumDriver.(AppiumDriver.java:93)

at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:72)

at com.testerhome.appcrawler.driver.AppiumClient.appium(AppiumClient.scala:163)

at com.testerhome.appcrawler.driver.AppiumClient.(AppiumClient.scala:39)

at com.testerhome.appcrawler.Crawler.setupAppium(Crawler.scala:263)

at com.testerhome.appcrawler.Crawler.start(Crawler.scala:133)

at com.testerhome.appcrawler.AppCrawler$.startCrawl(AppCrawler.scala:344)

at com.testerhome.appcrawler.AppCrawler$.parseParams(AppCrawler.scala:312)

at com.testerhome.appcrawler.AppCrawler$.main(AppCrawler.scala:92)

at com.testerhome.appcrawler.AppCrawler.main(AppCrawler.scala)


求大神指点,感谢!!!

他说是你配置错了,你至少贴下你的配置把,主要是capability部分

感谢,我按照文档搭建了环境,没有配置appium参数 :sweat_smile:

求思寒大佬帮忙看看,万分感谢!



贴下你的配置文件内容,尤其是capability部分

安装appium1.5.3版本后,没有配置任何文件,直接连接手机vivo 1808,在appium中Android setting中配置了apk路径和capabilities的内容,如下图:
企业微信截图_d4f4302b-bbb7-4984-8553-3c0be75afde8

之后就命令java -jar appcrawler.jar -a /Users/liwen/Downloads/com.xueqiu.android_12.38.2_liqucn.com.apk
运行结果报错:

在window上运行正常的脚本,在Mac上运行,也是报同样的错误:
from appium import webdriver
import time, traceback

desired_caps={}
desired_caps[‘platformName’]=‘Android’
desired_caps[‘platformVersion’]=‘8.1.0’
desired_caps[‘deviceName’]=‘test’
desired_caps[‘app’]=’/Users/liwen/Downloads/apk/duoduojisuanqi_1293.apk’
desired_caps[‘appPackage’]=‘com.ibox.calculators’
desired_caps[‘appActivity’]=‘com.ibox.calculators.SplashActivity’
desired_caps[‘unicodeKeyboard’]= True
desired_caps[‘resetKeyboard’]= True
desired_caps[‘noReset’]=True
desired_caps[‘newCommandTimeout’]=6000

driver=webdriver.Remote(‘http://localhost:4723/wd/hub’ , desired_caps)
driver.implicitly_wait(10)
try:
driver.find_element_by_id(“com.ibox.calculators:id/digit3”).click()
driver.find_element_by_id(“com.ibox.calculators:id/plus”).click()
driver.find_element_by_id(“com.ibox.calculators:id/digit9”).click()
equal=driver.find_element_by_id(“com.ibox.calculators:id/equal”)
equal.click()
driver.find_element_by_id(“com.ibox.calculators:id/mul”).click()
driver.find_element_by_id(“com.ibox.calculators:id/digit5”).click()
equal.click()
# tl=driver.find_element_by_id(“com.ibox.calculators:id/cv”)
# tvs=tl.find_elements_by_class_name(“android.widget.TextView”)
tvs=driver.find_elements_by_xpath(’//*[@resource-id=“com.ibox.calculators:id/cv”]/android.widget.TextView[2]’)
# print(tvs.text)
retStr=tvs[0].text
assert retStr == ‘60’,“计算结果错误”

except:
print(traceback.format_exc())
input(’****Press to quit…’)
driver.quit()

运行脚本报下面错误
raceback (most recent call last):
File “/Users/liwen/Desktop/duoduocalculator.py”, line 17, in
driver=webdriver.Remote(‘http://localhost:4723/wd/hub’ , desired_caps)
File “/Users/liwen/PycharmProjects/java/venv/lib/python3.6/site-packages/appium/webdriver/webdriver.py”, line 157, in init
AppiumConnection(command_executor, keep_alive=keep_alive), desired_capabilities, browser_profile, proxy
File “/Users/liwen/PycharmProjects/java/venv/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py”, line 157, in init
self.start_session(capabilities, browser_profile)
File “/Users/liwen/PycharmProjects/java/venv/lib/python3.6/site-packages/appium/webdriver/webdriver.py”, line 226, in start_session
response = self.execute(RemoteCommand.NEW_SESSION, parameters)
File “/Users/liwen/PycharmProjects/java/venv/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py”, line 321, in execute
self.error_handler.check_response(response)
File “/Users/liwen/PycharmProjects/java/venv/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py”, line 208, in check_response
raise exception_class(value)
selenium.common.exceptions.WebDriverException: Message: Parameters were incorrect. We wanted {“required”:[“desiredCapabilities”],“optional”:[“requiredCapabilities”,“sessionId”,“id”]} and you sent [“capabilities”,“desiredCapabilities”]

Mac 安装appium1.5.3版本后,没有进行任何配置文件的更改,求思寒大佬指点!

找到原因,是升级appium版本不匹配对应的selenium版本。打扰思寒大佬了,感谢

运行命令:java -jar appcrawler.jar -a /Users/liwen/Downloads/com.xueqiu.android_12.38.2_liqucn.com.apk

报错: Exception in thread “main” org.openqa.selenium.WebDriverException: Unable to parse remote response: Parameters were incorrect. We wanted {“required”:[“desiredCapabilities”],“optional”:[“requiredCapabilities”,“sessionId”,“id”]} and you sent [“desiredCapabilities”,“requiredCapabilities”,“capabilities”]

Build info: version: ‘unknown’, revision: ‘unknown’, time: ‘unknown’

System info: host: ‘liwendeMacBook-Pro.local’, ip: ‘fe80:0:0:0:14f5:8909:a46d:fb0d%en0’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.15.7’, java.version: ‘1.8.0_271’

Driver info: driver.version: AndroidDriver

at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:347)

at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:136)

at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)

at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:89)

at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:586)

at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)

at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)

at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)

at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:217)

at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:140)

at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:38)

at io.appium.java_client.AppiumDriver.(AppiumDriver.java:83)

at io.appium.java_client.AppiumDriver.(AppiumDriver.java:93)

at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:72)

at com.testerhome.appcrawler.driver.AppiumClient.appium(AppiumClient.scala:163)

at com.testerhome.appcrawler.driver.AppiumClient.(AppiumClient.scala:39)

at com.testerhome.appcrawler.Crawler.setupAppium(Crawler.scala:263)

at com.testerhome.appcrawler.Crawler.start(Crawler.scala:133)

at com.testerhome.appcrawler.AppCrawler$.startCrawl(AppCrawler.scala:344)

at com.testerhome.appcrawler.AppCrawler$.parseParams(AppCrawler.scala:312)

at com.testerhome.appcrawler.AppCrawler$.main(AppCrawler.scala:92)

at com.testerhome.appcrawler.AppCrawler.main(AppCrawler.scala)

appium日志报错

[Appium] Non-default server args:

[Appium] nodeconfig: ‘/Users/me/nodeconfig.json’

[Appium] debugLogSpacing: true
[Appium] platformName: ‘Android’
[Appium] platformVersion: ‘8.1.0’
[Appium] automationName: ‘Appium’

[Appium] deviceName: ‘vivo 1808’
[Appium] app: ‘/Users/liwen/Downloads/com.xueqiu.android_12.38.2_liqucn.com.apk’
[Appium] fullReset: true
[Appium] appPackage: ‘com.xueqiu.android’
[Appium] appActivity: ‘com.xueqiu.android.common.splash.SplashActivity’
[Appium] appWaitPackage: ‘com.xueqiu.android’
[Appium] deviceReadyTimeout: 6000

[Appium] Deprecated server args:
[Appium] --platform-name => --default-capabilities ‘{“platformName”:“Android”}’
[Appium] --platform-version => --default-capabilities ‘{“platformVersion”:“8.1.0”}’
[Appium] --automation-name => --default-capabilities ‘{“automationName”:“Appium”}’
[Appium] --device-name => --default-capabilities ‘{“deviceName”:“vivo 1808”}’
[Appium] --app => --default-capabilities ‘{“app”:"/Users/liwen/Downloads/com.xueqiu.android_12.38.2_liqucn.com.apk"}’
[Appium] --full-reset => --default-capabilities ‘{“fullReset”:true}’
[Appium] --app-pkg => --default-capabilities ‘{“appPackage”:“com.xueqiu.android”}’

[Appium] --app-activity => --default-capabilities ‘{“appActivity”:“com.xueqiu.android.common.splash.SplashActivity”}’
[Appium] --app-wait-package => --default-capabilities ‘{“appWaitPackage”:“com.xueqiu.android”}’
[Appium] --device-ready-timeout => --default-capabilities ‘{“deviceReadyTimeout”:6000}’
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:

[Appium] platformName: ‘Android’

[Appium] platformVersion: ‘8.1.0’
[Appium] automationName: ‘Appium’
[Appium] deviceName: ‘vivo 1808’
[Appium] app: ‘/Users/liwen/Downloads/com.xueqiu.android_12.38.2_liqucn.com.apk’
[Appium] fullReset: true
[Appium] appPackage: ‘com.xueqiu.android’
[Appium] appActivity: ‘com.xueqiu.android.common.splash.SplashActivity’
[Appium] appWaitPackage: ‘com.xueqiu.android’
[Appium] deviceReadyTimeout: 6000

[Appium] Unable to load node configuration file to register with grid: ENOENT: no such file or directory, open ‘/Users/me/nodeconfig.json’

[Appium] Appium REST http interface listener started on 0.0.0.0:4723

求思寒大佬指点,缺少的文件/Users/me/nodeconfig.json网上找了一个,放在/Users/me/n目录下,运行appium报错
TypeError: Cannot read property ‘url’ of undefined
at postRequest$ (lib/grid-register.js:50:32)
at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at enqueueResult (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:185:17)
at new Promise (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:197:7)
at AsyncIterator.enqueue (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:184:12)
at AsyncIterator.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at Object.runtime.async (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:209:12)
at postRequest (lib/grid-register.js:78:24)
at registerNode$ (lib/grid-register.js:20:9)
at tryCatch (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at run (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:104:47)
at /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:115:28
at flush (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/$.microtask.js:19:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)

你的appium版本太低了,升级到最新版本吧。另外不需要nodeconfig文件。

求教思寒大佬指导下,辛苦了 :+1: :gift_heart: :gift_heart: :gift_heart:
1.运行下面命令
java -jar appcrawler.jar -a /Users/liwen/Downloads/com.xueqiu.android_12.38.2_liqucn.com.apk
2.报下面错误

appium日志
(upload://xv8j884PdiYb1cNb2ceTrarAj6p.jpeg)
[HTTP] {“desiredCapabilities”:{“appActivity”:"",“app”:"/Users/liwen/Downloads/com.xueqiu.android_12.38.2_liqucn.com.apk",“appPackage”:"",“appium”:“http://127.0.0.1:4723/wd/hub",“noReset”:“true”,“autoLaunch”:“true”,“platformName”:“Android”,“fullReset”:“false”,“deviceName”:“demo”},“requiredCapabilities”:{},“capabilities”:{“desiredCapabilities”:{“appActivity”:"",“app”:"/Users/liwen/Downloads/com.xueqiu.android_12.38.2_liqucn.com.apk",“appPackage”:"",“appium”:“http://127.0.0.1:4723/wd/hub”,“noReset”:“true”,“autoLaunch”:“true”,“platformName”:“Android”,“fullReset”:“false”,“deviceName”:“demo”},“requiredCapabilities”:{},“alwaysMatch”:{“platformName”:“Android”},"firstMatch”:}}

[W3C] Calling AppiumDriver.createSession() with args: [{“appActivity”:"",“app”:"/Users/liwen/Downloads/com.xueqiu.android_12.38.2_liqucn.com.apk",“appPackage”:"",“appium”:“http://127.0.0.1:4723/wd/hub",“noReset”:“true”,“autoLaunch”:“true”,“platformName”:“Android”,“fullReset”:“false”,“deviceName”:“demo”},{},{“desiredCapabilities”:{“appActivity”:"",“app”:"/Users/liwen/Downloads/com.xueqiu.android_12.38.2_liqucn.com.apk",“appPackage”:"",“appium”:“http://127.0.0.1:4723/wd/hub”,“noReset”:“true”,“autoLaunch”:“true”,“platformName”:“Android”,“fullReset”:“false”,“deviceName”:“demo”},“requiredCapabilities”:{},“alwaysMatch”:{“platformName”:“Android”},"firstMatch”:}]

[BaseDriver] Event ‘newSessionRequested’ logged at 1626922979336 (11:02:59 GMT+0800 (CST))

[Appium] Could not parse W3C capabilities: ‘deviceName’ can’t be blank

[Appium] Trying to fix W3C capabilities by merging them with JSONWP caps

[BaseDriver] The capabilities [“appActivity”,“app”,“appPackage”,“appium”,“noReset”,“autoLaunch”,“fullReset”,“deviceName”] are not standard capabilities and should have an extension prefix

[BaseDriver] Boolean capability passed in as string. Functionality may be compromised.

[BaseDriver] Boolean capability passed in as string. Functionality may be compromised.

[BaseDriver] Boolean capability passed in as string. Functionality may be compromised.

[Appium] Creating new AndroidDriver (v3.7.0) session

[Appium] Capabilities:

[Appium] platformName: Android

[Appium] appActivity:

[Appium] app: /Users/liwen/Downloads/com.xueqiu.android_12.38.2_liqucn.com.apk

[Appium] appPackage:

[Appium] appium: http://127.0.0.1:4723/wd/hub

[Appium] noReset: true

[Appium] autoLaunch: true

[Appium] fullReset: false

[Appium] deviceName: demo

[BaseDriver] W3C capabilities {“alwaysMatch”:{“platformNa… and MJSONWP desired capabilities {“appActivity”:”",“app”:"/U… were provided

[BaseDriver] Creating session with W3C capabilities: {“alwaysMatch”:{"platformNa…

[BaseDriver] Boolean capability passed in as string. Functionality may be compromised.

[BaseDriver] Boolean capability passed in as string. Functionality may be compromised.

[BaseDriver] Boolean capability passed in as string. Functionality may be compromised.

[BaseDriver] Capability ‘autoLaunch’ changed from string to boolean. This may cause unexpected behavior

[BaseDriver] Capability ‘noReset’ changed from string to boolean. This may cause unexpected behavior

[BaseDriver] Capability ‘fullReset’ changed from string to boolean. This may cause unexpected behavior

[BaseDriver] The following capabilities were provided, but are not recognized by appium: appium.

[BaseDriver] Session created with session id: c132776d-d358-4800-a584-5cc0eb5ee79e

[AndroidDriver] Java version is: 1.8.0_271

[AndroidDriver] Retrieving device list

[ADB] Trying to find a connected android device

[ADB] Getting connected devices…

[ADB] 1 device(s) connected

[AndroidDriver] Using device: PJW4PFUGBQBQFQSW

[ADB] Setting device id to PJW4PFUGBQBQFQSW

[ADB] Running ‘/Users/liwen/android-sdk-macosx/platform-tools/adb -P 5037 -s PJW4PFUGBQBQFQSW shell getprop ro.build.version.sdk’

[ADB] Current device property ‘ro.build.version.sdk’: 27

[ADB] Device API level: 27

[AndroidDriver] Consider setting ‘automationName’ capability to ‘uiautomator2’ on Android >= 6, since UIAutomator framework is not maintained anymore by the OS vendor.

[BaseDriver] Using local app ‘/Users/liwen/Downloads/com.xueqiu.android_12.38.2_liqucn.com.apk’

[AndroidDriver] Checking whether app is actually present

[AndroidDriver] Starting Android session

[ADB] Running ‘/Users/liwen/android-sdk-macosx/platform-tools/adb -P 5037 -s PJW4PFUGBQBQFQSW wait-for-device’

[ADB] Running ‘/Users/liwen/android-sdk-macosx/platform-tools/adb -P 5037 -s PJW4PFUGBQBQFQSW shell echo ping’

[AndroidDriver] Pushing settings apk to device…

[ADB] Getting install status for io.appium.settings

[ADB] Running ‘/Users/liwen/android-sdk-macosx/platform-tools/adb -P 5037 -s PJW4PFUGBQBQFQSW shell pm list packages io.appium.settings’

[ADB] App is not installed

[ADB] App ‘/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/io.appium.settings/app/build/outputs/apk/settings_apk-debug.apk’ not installed. Installing

[ADB] Device API level: 27

[ADB] Running ‘/Users/liwen/android-sdk-macosx/platform-tools/adb -P 5037 -s PJW4PFUGBQBQFQSW install -g /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/io.appium.settings/app/build/outputs/apk/settings_apk-debug.apk’

[ADB] Install command stdout: Performing Streamed Install

[ADB] Success

[ADB] Running ‘/Users/liwen/android-sdk-macosx/platform-tools/adb -P 5037 -s PJW4PFUGBQBQFQSW shell ps’

[ADB] Device API level: 27

[ADB] Running ‘/Users/liwen/android-sdk-macosx/platform-tools/adb -P 5037 -s PJW4PFUGBQBQFQSW shell am start -W -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000’

[ADB] Device API level: 27

[ADB] Running ‘/Users/liwen/android-sdk-macosx/platform-tools/adb -P 5037 -s PJW4PFUGBQBQFQSW shell appops set io.appium.settings android:mock_location allow’

[AndroidDriver] setDeviceLanguageCountry requires language or country.

[AndroidDriver] Got language: ‘undefined’ and country: ‘undefined’

[Logcat] Starting logcat capture

[AndroidDriver] Pushing unlock helper app to device…

[ADB] Getting install status for io.appium.unlock

[ADB] Running ‘/Users/liwen/android-sdk-macosx/platform-tools/adb -P 5037 -s PJW4PFUGBQBQFQSW shell pm list packages io.appium.unlock’

[ADB] App is not installed

[ADB] App ‘/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-unlock/bin/unlock_apk-debug.apk’ not installed. Installing

[ADB] Device API level: 27

[ADB] Running ‘/Users/liwen/android-sdk-macosx/platform-tools/adb -P 5037 -s PJW4PFUGBQBQFQSW install -g /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-unlock/bin/unlock_apk-debug.apk’

[ADB] Install command stdout: Performing Streamed Install

[ADB] Success

[ADB] Getting device platform version

[ADB] Running ‘/Users/liwen/android-sdk-macosx/platform-tools/adb -P 5037 -s PJW4PFUGBQBQFQSW shell getprop ro.build.version.release’

[ADB] Current device property ‘ro.build.version.release’: 8.1.0

[ADB] Running ‘/Users/liwen/android-sdk-macosx/platform-tools/adb -P 5037 -s PJW4PFUGBQBQFQSW shell wm size’

[ADB] Running ‘/Users/liwen/android-sdk-macosx/platform-tools/adb -P 5037 -s PJW4PFUGBQBQFQSW shell getprop ro.product.model’

[ADB] Current device property ‘ro.product.model’: vivo 1808

[ADB] Running ‘/Users/liwen/android-sdk-macosx/platform-tools/adb -P 5037 -s PJW4PFUGBQBQFQSW shell getprop ro.product.manufacturer’

[ADB] Current device property ‘ro.product.manufacturer’: vivo

[AndroidDriver] Parsing package and activity from app manifest

[ADB] Using the alternative activity name detection method because of: Could not find apkanalyzer in /Users/liwen/android-sdk-macosx/platform-tools/apkanalyzer,/Users/liwen/android-sdk-macosx/emulator/apkanalyzer,/Users/liwen/android-sdk-macosx/tools/apkanalyzer,/Users/liwen/android-sdk-macosx/tools/bin/apkanalyzer,/Users/liwen/android-sdk-macosx/build-tools/29.0.3/apkanalyzer. Do you have the Android SDK installed at ‘/Users/liwen/android-sdk-macosx’?

[ADB] Extracting package and launch activity from manifest

[AndroidDriver] Shutting down Android driver

[AndroidDriver] Called deleteSession but bootstrap wasn’t active

[Logcat] Stopping logcat capture

[ADB] Running ‘/Users/liwen/android-sdk-macosx/platform-tools/adb -P 5037 -s PJW4PFUGBQBQFQSW shell am force-stop io.appium.unlock’

[AndroidDriver] Not cleaning generated files. Add clearSystemFiles capability if wanted.

[BaseDriver] Event ‘newSessionStarted’ logged at 1626923018744 (11:03:38 GMT+0800 (CST))

[W3C] Encountered internal error running command: Error: packageAndLaunchActivityFromManifest failed. Original error: Command ‘java -jar /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-adb/jars/appium_apk_tools.jar printLaunchActivity /Users/liwen/Downloads/com.xueqiu.android_12.38.2_liqucn.com.apk /var/folders/bt/nxskmw0n773_6fckpp6zd2r40000gn/T/com.xueqiu.android’ exited with code 1; StdErr: Exception in thread “main” brut.androlib.AndrolibException: Multiple resources: spec=0x7f0800a3 drawable/abc_dialog_material_background, config=[DEFAULT]

[W3C] at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:63)

[W3C] at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:56)

[W3C] at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:186)

[W3C] at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:157)

[W3C] at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:125)

[W3C] at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:100)

[W3C] at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:78)

[W3C] at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)

[W3C] at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:605)

[W3C] at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:74)

[W3C] at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:66)

[W3C] at io.appium.apktools.AndroidManifestActivityHelper.decodeManifestXML(AndroidManifestActivityHelper.java:26)

[W3C] at io.appium.apktools.Main.main(Main.java:33)

[W3C]

[W3C] at ADB.callee$0$0$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-adb/lib/tools/android-manifest.js:183:9)

[W3C] at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)

[W3C] at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)

[W3C] at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)

[W3C] at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)

[W3C] at

[HTTP] ← POST /wd/hub/session 500 39418 ms - 4371

[HTTP]

关闭