appcrawler启动APP后报错

2020-11-13 11:29:18 INFO [Crawler.147.start] waiting for app load
2020-11-13 11:29:24 INFO [Crawler.149.start] driver=null
2020-11-13 11:29:24 INFO [Crawler.150.start] get screen info
2020-11-13 11:29:24 INFO [AppiumClient.120.getDeviceInfo] screenWidth=1080 screenHeight=2115
2020-11-13 11:29:24 INFO [Crawler.627.refreshPage] refresh page
2020-11-13 11:29:24 INFO [AppiumClient.102.getPageSourceWithRetry] start to get page source from appium
2020-11-13 11:29:24 INFO [AppiumClient.117.$anonfun$getPageSourceWithRetry$1] xml format
Exception in thread “main” java.lang.NoSuchMethodError: ‘void com.sun.org.apache.xml.internal.serialize.OutputFormat.(org.w3c.dom.Document)’
at com.testerhome.appcrawler.XPathUtil$.toPrettyXML(XPathUtil.scala:35)
at com.testerhome.appcrawler.driver.ReactWebDriver.$anonfun$getPageSourceWithRetry$1(ReactWebDriver.scala:132)
at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:156)
at com.testerhome.appcrawler.driver.ReactWebDriver.getPageSourceWithRetry(ReactWebDriver.scala:106)
at com.testerhome.appcrawler.driver.ReactWebDriver.getPageSourceWithRetry$(ReactWebDriver.scala:99)
at com.testerhome.appcrawler.driver.AppiumClient.getPageSourceWithRetry(AppiumClient.scala:28)
at com.testerhome.appcrawler.Crawler.refreshPage(Crawler.scala:628)
at com.testerhome.appcrawler.Crawler.start(Crawler.scala:152)
at com.testerhome.appcrawler.AppCrawler$.startCrawl(AppCrawler.scala:322)
at com.testerhome.appcrawler.AppCrawler$.parseParams(AppCrawler.scala:290)
at com.testerhome.appcrawler.AppCrawler$.main(AppCrawler.scala:91)
at com.testerhome.appcrawler.AppCrawler.main(AppCrawler.scala)

日志信息:
2020-11-13 11:29:05 INFO [Crawler.130.start] set xpath attribute with List(name, label, value, resource-id, content-desc, instance, text)
2020-11-13 11:29:05 INFO [Crawler.135.start] set xpath
2020-11-13 11:29:05 INFO [Crawler.89.$anonfun$loadPlugins$2] com.testerhome.appcrawler.plugin.TagLimitPlugin@245ec1a6
2020-11-13 11:29:05 INFO [Crawler.89.$anonfun$loadPlugins$2] com.testerhome.appcrawler.plugin.ReportPlugin@782be4eb
2020-11-13 11:29:05 INFO [Crawler.89.$anonfun$loadPlugins$2] com.testerhome.appcrawler.plugin.FreeMind@38792286
2020-11-13 11:29:05 INFO [TagLimitPlugin.19.init] com.testerhome.appcrawler.plugin.TagLimitPlugin init
2020-11-13 11:29:05 INFO [ReportPlugin.19.init] com.testerhome.appcrawler.plugin.ReportPlugin init
2020-11-13 11:29:05 INFO [FreeMind.19.init] com.testerhome.appcrawler.plugin.FreeMind init
2020-11-13 11:29:05 INFO [ReportPlugin.21.start] reportPath=D:\Program Files\appcrawler\20201113112903
2020-11-13 11:29:05 INFO [ReportPlugin.24.start] create D:\Program Files\appcrawler\20201113112903/tmp/ directory
2020-11-13 11:29:05 INFO [Crawler.138.start] prepare setup Appium
2020-11-13 11:29:05 INFO [Crawler.250.setupAppium] afterPageMax=2
2020-11-13 11:29:07 INFO [Crawler.273.setupAppium] use AppiumClient
2020-11-13 11:29:07 INFO [Crawler.274.setupAppium] Map(appActivity -> .view.WelcomeActivityAlias, appium -> http://127.0.0.1:4723/wd/hub, noReset -> true, appPackage -> com.xueqiu.android, fullReset -> false)
2020-11-13 11:29:18 INFO [AppiumClient.120.getDeviceInfo] screenWidth=1080 screenHeight=2115
2020-11-13 11:29:18 INFO [AppiumClient.112.appium] capture dir = D:\Program Files\appcrawler.
2020-11-13 11:29:18 INFO [Crawler.278.setupAppium] com.testerhome.appcrawler.driver.AppiumClient@24fba488
2020-11-13 11:29:18 INFO [Crawler.145.start] platformName= driver=com.testerhome.appcrawler.driver.AppiumClient@24fba488
2020-11-13 11:29:18 INFO [Crawler.146.start]

AppCrawler 2.4.0 [霍格沃兹测试学院特别纪念版]
Appium 1.8.1 Java8 tested
app爬虫, 用于自动遍历测试. 支持Android和iOS, 支持真机和模拟器
项目地址: https://github.com/seveniruby/AppCrawler
移动测试技术交流: https://testerhome.com
联络作者: seveniruby@testerhome.com (思寒)
致谢: 晓光 泉龙 杨榕 恒温 mikezhou yaming116 沐木


2020-11-13 11:29:18 INFO [Crawler.147.start] waiting for app load
2020-11-13 11:29:24 INFO [Crawler.149.start] driver=null
2020-11-13 11:29:24 INFO [Crawler.150.start] get screen info
2020-11-13 11:29:24 INFO [AppiumClient.120.getDeviceInfo] screenWidth=1080 screenHeight=2115
2020-11-13 11:29:24 INFO [Crawler.627.refreshPage] refresh page
2020-11-13 11:29:24 INFO [AppiumClient.102.getPageSourceWithRetry] start to get page source from appium
2020-11-13 11:29:24 INFO [AppiumClient.117.$anonfun$getPageSourceWithRetry$1] xml format

同问,哪位能解答下

我也遇到了同样的问题:2021-09-09 09:56:33 INFO [AppCrawler$.223.parseParams] use default appium address 4723
2021-09-09 09:56:33 INFO [AppCrawler$.230.parseParams] appium address = Some(http://127.0.0.1:4723/wd/hub)
2021-09-09 09:56:33 INFO [AppCrawler$.242.parseParams] result directory = 20210909095631
2021-09-09 09:56:33 INFO [Crawler.130.start] set xpath attribute with List(name, label, value, resource-id, content-desc, instance, text)
2021-09-09 09:56:33 INFO [Crawler.135.start] set xpath
2021-09-09 09:56:33 INFO [Crawler.89.$anonfun$loadPlugins$2] com.testerhome.appcrawler.plugin.TagLimitPlugin@724c5cbe
2021-09-09 09:56:33 INFO [Crawler.89.$anonfun$loadPlugins$2] com.testerhome.appcrawler.plugin.ReportPlugin@418c020b
2021-09-09 09:56:33 INFO [Crawler.89.$anonfun$loadPlugins$2] com.testerhome.appcrawler.plugin.FreeMind@21618fa7
2021-09-09 09:56:33 INFO [TagLimitPlugin.19.init] com.testerhome.appcrawler.plugin.TagLimitPlugin init
2021-09-09 09:56:33 INFO [ReportPlugin.19.init] com.testerhome.appcrawler.plugin.ReportPlugin init
2021-09-09 09:56:33 INFO [FreeMind.19.init] com.testerhome.appcrawler.plugin.FreeMind init
2021-09-09 09:56:33 INFO [ReportPlugin.21.start] reportPath=D:\baiduyunpan\Appcrawler\20210909095631
2021-09-09 09:56:33 INFO [ReportPlugin.24.start] create D:\baiduyunpan\Appcrawler\20210909095631/tmp/ directory
2021-09-09 09:56:33 INFO [Crawler.138.start] prepare setup Appium
2021-09-09 09:56:33 INFO [Crawler.250.setupAppium] afterPageMax=2
Exception in thread “main” java.lang.ExceptionInInitializerError
at com.testerhome.appcrawler.Crawler.setupAppium(Crawler.scala:251)
at com.testerhome.appcrawler.Crawler.start(Crawler.scala:139)
at com.testerhome.appcrawler.AppCrawler$.startCrawl(AppCrawler.scala:322)
at com.testerhome.appcrawler.AppCrawler$.parseParams(AppCrawler.scala:290)
at com.testerhome.appcrawler.AppCrawler$.main(AppCrawler.scala:91)
at com.testerhome.appcrawler.AppCrawler.main(AppCrawler.scala)
Caused by: java.lang.NullPointerException
at java.util.Arr

完整的报错信息是:D:\baiduyunpan\Appcrawler>java -jar appcrawler-2.1.3.jar -a app-debug(2).apk
2021-09-09 15:26:22 INFO [DataRecord.append.13] append 1
2021-09-09 15:26:22 INFO [AppCrawler$.main.87]

AppCrawler 2.1.3 [霍格沃兹测试学院特别纪念版]
Appium 1.7.1 Java8 support
app爬虫, 用于自动遍历测试. 支持Android和iOS, 支持真机和模拟器
帮助文档: https://github.com/seveniruby/AppCrawler
移动测试技术交流: https://testerhome.com
联络作者: seveniruby@testerhome.com (思寒)
致谢: 晓光 泉龙 杨榕 恒温 mikezhou yaming116 沐木
感谢如下公司提供商业支持: Keep

2021-09-09 15:26:22 INFO [AppCrawler$.parseParams.219] Set Platform=Android
2021-09-09 15:26:22 INFO [AppCrawler$.parseParams.234] app path = D:\baiduyunpan\Appcrawler\app-debug(2).apk
2021-09-09 15:26:22 INFO [AppCrawler$.parseParams.245] use default appium address 4723
2021-09-09 15:26:22 INFO [AppCrawler$.parseParams.252] appium address = Some(http://127.0.0.1:4723/wd/hub)
2021-09-09 15:26:22 INFO [AppCrawler$.parseParams.264] result directory = Android_20210909152622
2021-09-09 15:26:22 INFO [DataRecord.initLog.30] alread exist
2021-09-09 15:26:22 INFO [DataRecord.append.13] append 1
2021-09-09 15:26:22 INFO [Crawler.start.126] set xpath attribute with List(name, label, value, resource-id, content-desc, index, text)
2021-09-09 15:26:22 INFO [Crawler.start.129] set xpath
2021-09-09 15:26:22 INFO [Crawler.loadPlugins.82] dynamic load plugin in D:\baiduyunpan\Appcrawler\plugins
Exception in thread “main” java.lang.ExceptionInInitializerError
at com.testerhome.appcrawler.Crawler.loadPlugins(Crawler.scala:83)
at com.testerhome.appcrawler.Crawler.start(Crawler.scala:130)
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)
Caused by: java.lang.NullPointerException
at java.util.Arrays.sort(Unknown Source)
at scala.tools.nsc.classpath.JFileDirectoryLookup.listChildren(DirectoryClassPath.scala:113)
at scala.tools.nsc.classpath.JFileDirectoryLookup.listChildren$(DirectoryClassPath.scala:97)
at scala.tools.nsc.classpath.DirectoryClassPath.listChildren(DirectoryClassPath.scala:202)
at scala.tools.nsc.classpath.DirectoryClassPath.listChildren(DirectoryClassPath.scala:202)
at scala.tools.nsc.classpath.DirectoryLookup.list(DirectoryClassPath.scala:73)
at scala.tools.nsc.classpath.DirectoryLookup.list$(DirectoryClassPath.scala:69)
at scala.tools.nsc.classpath.DirectoryClassPath.list(DirectoryClassPath.scala:202)
at scala.tools.nsc.classpath.AggregateClassPath.$anonfun$list$1(AggregateClassPath.scala:76)
at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
at scala.collection.Iterator.foreach(Iterator.scala:929)
at scala.collection.Iterator.foreach$(Iterator.scala:929)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1417)
at scala.collection.IterableLike.foreach(IterableLike.scala:71)
at scala.collection.IterableLike.foreach$(IterableLike.scala:70)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at scala.collection.TraversableLike.map(TraversableLike.scala:234)
at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
at scala.collection.AbstractTraversable.map(Traversable.scala:104)
at scala.tools.nsc.classpath.AggregateClassPath.list(AggregateClassPath.scala:74)
at scala.tools.nsc.symtab.SymbolLoaders$PackageLoader.doComplete(SymbolLoaders.scala:271)
at scala.tools.nsc.symtab.SymbolLoaders$SymbolLoader.complete(SymbolLoaders.scala:220)
at scala.reflect.internal.Symbols$Symbol.info(Symbols.scala:1530)
at scala.reflect.internal.Mirrors$RootsBase.init(Mirrors.scala:225)
at scala.tools.nsc.Global.rootMirror$lzycompute(Global.scala:65)
at scala.tools.nsc.Global.rootMirror(Global.scala:63)
at scala.tools.nsc.Global.rootMirror(Global.scala:36)
at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass$lzycompute(Definitions.scala:267)
at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass(Definitions.scala:267)
at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1422)
at scala.tools.nsc.Global$Run.(Global.scala:1164)
at com.testerhome.appcrawler.Runtimes.(Runtimes.scala:28)
at com.testerhome.appcrawler.Runtimes$.(Runtimes.scala:53)
at com.testerhome.appcrawler.Runtimes$.(Runtimes.scala)
… 6 more

关闭