Win10上启动UICrawler自动遍历时报 "org.openqa.selenium.WebDriverException: An unknown server-side error occur red while processing the command. Original er
程序员文章站
2022-04-15 16:59:56
操作步骤: 1、直接启动 Appium (我用的是 version 1.10.0) 2、打开命令窗口,切换到 UICrawler 所在路径 3、执行命令 java -jar UICrawler-2.23.jar -f config.yml -u deviceSerialNumber 4、执行后不会安 ......
操作步骤:
1、直接启动 appium (我用的是 version 1.10.0)
2、打开命令窗口,切换到 uicrawler 所在路径
3、执行命令 java -jar uicrawler-2.23.jar -f config.yml -u deviceserialnumber
4、执行后不会安装appium所需要特定 apk 程序,报错 could not sign with default certificate
完整信息如下:
1 e:\baidunetdiskdownload\uicrawler>java -jar uicrawler-2.23.jar -f config.yml -u diyth 2 ytccqbiv47d 3 13:39:43.822 [main] info crawler - version is 2.23 ---dec/7/2018 4 13:39:43.822 [main] info crawler - pc platform : windows 10 5 13:39:43.822 [main] info crawler - system file encoding: gbk 6 13:39:43.822 [main] info crawler - e:\baidunetdiskdownload\uicrawler\config.yml 7 13:39:43.822 [main] info crawler - crawler loop count is 1 8 13:39:43.822 [main] info crawler - crawler loop no is 1 9 13:39:43.822 [main] info util.configutil - method: initialize 10 13:39:43.822 [main] info util.configutil - reading config file e:\baidunetdiskdownlo 11 ad\uicrawler\config.yml 12 13:39:43.963 [main] info util.configutil - config : port = 4723 13 13:39:43.963 [main] info util.configutil - config : max_click_count = 100000 14 13:39:43.963 [main] info util.configutil - config : db_log = false 15 13:39:43.963 [main] info util.configutil - config : perf_log = false 16 13:39:43.963 [main] info util.configutil - config : dom_display = false 17 13:39:43.979 [main] info util.configutil - config : video_vertical = true 18 13:39:43.979 [main] info util.configutil - config : device_name = null 19 13:39:43.979 [main] info util.configutil - config : appium_server_ip = 0.0.0.0 20 13:39:43.979 [main] info util.configutil - config : item_blacklist = [客服, 电话, 不 21 允许, 拒绝, 拍照, 禁止, 呼叫, 低电量模式, 关闭, //*[@text="去付款"]] 22 13:39:43.979 [main] info util.configutil - rootdir is e:\baidunetdiskdownload\uicraw 23 ler\crawler_output\diythytccqbiv47d-2019-01-14-13_39_43 24 13:39:43.979 [main] info util.configutil - config : android_package = com.android.se 25 ttings 26 13:39:43.979 [main] info util.configutil - config : android_main_activity = /com.and 27 roid.settings.settings 28 13:39:44.010 [main] info util.driver - ===== method : prepareforappiumandroid 29 13:39:44.010 [main] info util.driver - apppackage com.android.settings 30 13:39:44.010 [main] info util.util - system name is :windows 10 31 13:39:44.010 [main] info util.util - method execmd : [cmd, /c, adb -s diythytccqbiv4 32 7d shell getprop | findstr version.sdk] 33 13:39:44.572 [main] info util.util - [cmd, /c, adb -s diythytccqbiv47d shell getprop 34 | findstr version.sdk] ---output is : [ro.build.version.sdk]: [24] 35 [ro.mediatek.version.sdk]: [4] 36 13:39:44.572 [main] info util.driver - sdk version : 24 37 13:39:44.588 [main] info util.driver - using uiautomator2 38 13:39:44.588 [main] info util.driver - http://0.0.0.0:4723/wd/hub 39 exception in thread "main" org.openqa.selenium.webdriverexception: it is impossible t 40 o create a new session because 'createsession' which takes httpclient, inputstream an 41 d long was not found or it is not accessible 42 build info: version: 'unknown', revision: 'unknown', time: 'unknown' 43 system info: host: 'l1-dfdfdf-w', ip: '192.168.1.103', os.name: 'windows 10', os.ar 44 ch: 'amd64', os.version: '10.0', java.version: '1.8.0_91' 45 driver info: driver.version: driver 46 at io.appium.java_client.remote.appiumcommandexecutor$1.createsession(appiumc 47 ommandexecutor.java:195) 48 at io.appium.java_client.remote.appiumcommandexecutor.createsession(appiumcom 49 mandexecutor.java:209) 50 at io.appium.java_client.remote.appiumcommandexecutor.execute(appiumcommandex 51 ecutor.java:231) 52 at org.openqa.selenium.remote.remotewebdriver.execute(remotewebdriver.java:54 53 3) 54 at io.appium.java_client.defaultgenericmobiledriver.execute(defaultgenericmob 55 iledriver.java:42) 56 at io.appium.java_client.appiumdriver.execute(appiumdriver.java:1) 57 at io.appium.java_client.android.androiddriver.execute(androiddriver.java:1) 58 at org.openqa.selenium.remote.remotewebdriver.startsession(remotewebdriver.ja 59 va:207) 60 at org.openqa.selenium.remote.remotewebdriver.<init>(remotewebdriver.java:130 61 ) 62 at io.appium.java_client.defaultgenericmobiledriver.<init>(defaultgenericmobi 63 ledriver.java:38) 64 at io.appium.java_client.appiumdriver.<init>(appiumdriver.java:84) 65 at io.appium.java_client.appiumdriver.<init>(appiumdriver.java:94) 66 at io.appium.java_client.android.androiddriver.<init>(androiddriver.java:93) 67 at util.driver.prepareforappiumandroid(driver.java:876) 68 at crawler.main(crawler.java:226) 69 caused by: java.lang.reflect.invocationtargetexception 70 at sun.reflect.nativemethodaccessorimpl.invoke0(native method) 71 at sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java: 72 62) 73 at sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorim 74 pl.java:43) 75 at java.lang.reflect.method.invoke(method.java:498) 76 at io.appium.java_client.remote.appiumcommandexecutor$1.createsession(appiumc 77 ommandexecutor.java:185) 78 ... 14 more 79 caused by: org.openqa.selenium.webdriverexception: an unknown server-side error occur 80 red while processing the command. original error: could not sign with default certifi 81 cate. original error command ''c:\\program files\\java\\jdk1.8.0_91\\bin\\java.exe' - 82 jar 'c:\\program files (x86)\\appium\\resources\\app\\node_modules\\appium-adb\\jars\ 83 \sign.jar' 'c:\\program files (x86)\\appium\\resources\\app\\node_modules\\appium-uia 84 utomator2-server\\apks\\appium-uiautomator2-server-debug-androidtest.apk' --override' 85 exited with code 1 86 build info: version: 'unknown', revision: 'unknown', time: 'unknown' 87 system info: host: 'l1-dfdfdf-w', ip: '192.168.1.103', os.name: 'windows 10', os.ar 88 ch: 'amd64', os.version: '10.0', java.version: '1.8.0_91' 89 driver info: driver.version: driver 90 remote stacktrace: unknownerror: an unknown server-side error occurred while processi 91 ng the command. original error: could not sign with default certificate. original err 92 or command ''c:\\program files\\java\\jdk1.8.0_91\\bin\\java.exe' -jar 'c:\\program f 93 iles (x86)\\appium\\resources\\app\\node_modules\\appium-adb\\jars\\sign.jar' 'c:\\pr 94 ogram files (x86)\\appium\\resources\\app\\node_modules\\appium-uiautomator2-server\\ 95 apks\\appium-uiautomator2-server-debug-androidtest.apk' --override' exited with code 96 1 97 at getresponseforw3cerror (c:\program files (x86)\appium\resources\app\node_modul 98 es\appium-base-driver\lib\protocol\errors.js:826:9) 99 at asynchandler (c:\program files (x86)\appium\resources\app\node_modules\appium- 100 base-driver\lib\protocol\protocol.js:447:37) 101 at process._tickcallback (internal/process/next_tick.js:68:7) 102 at sun.reflect.nativeconstructoraccessorimpl.newinstance0(native method) 103 at sun.reflect.nativeconstructoraccessorimpl.newinstance(nativeconstructoracc 104 essorimpl.java:62) 105 at sun.reflect.delegatingconstructoraccessorimpl.newinstance(delegatingconstr 106 uctoraccessorimpl.java:45) 107 at java.lang.reflect.constructor.newinstance(constructor.java:423) 108 at org.openqa.selenium.remote.w3chandshakeresponse.lambda$new$0(w3chandshaker 109 esponse.java:57) 110 at org.openqa.selenium.remote.w3chandshakeresponse.lambda$getresponsefunction 111 $2(w3chandshakeresponse.java:104) 112 at org.openqa.selenium.remote.protocolhandshake.lambda$createsession$0(protoc 113 olhandshake.java:123) 114 at java.util.stream.referencepipeline$3$1.accept(referencepipeline.java:193) 115 at java.util.spliterators$arrayspliterator.tryadvance(spliterators.java:958) 116 at java.util.stream.referencepipeline.foreachwithcancel(referencepipeline.jav 117 a:126) 118 at java.util.stream.abstractpipeline.copyintowithcancel(abstractpipeline.java 119 :498) 120 at java.util.stream.abstractpipeline.copyinto(abstractpipeline.java:485) 121 at java.util.stream.abstractpipeline.wrapandcopyinto(abstractpipeline.java:47 122 1) 123 at java.util.stream.findops$findop.evaluatesequential(findops.java:152) 124 at java.util.stream.abstractpipeline.evaluate(abstractpipeline.java:234) 125 at java.util.stream.referencepipeline.findfirst(referencepipeline.java:464) 126 at org.openqa.selenium.remote.protocolhandshake.createsession(protocolhandsha 127 ke.java:126) 128 ... 19 more
解决办法:
1、win10上带了管理员功能,普通权限对访问操作权限不够会导致读写失败
2、以管理员的形式启动 appium 应用并启动服务,再次执行自动遍历即可成功
上一篇: 刮刮乐效果