使用appcrawler-2.7.3跑的时候报错空指针,日志如下:还有一个问题在yml文件添加包名和activity,跑的时候无法自动打开应用

System info: host: ‘LAPTOP-FVIG5V9P’, ip: ‘192.168.0.36’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_291’
Driver info: io.appium.java_client.android.AndroidDriver
Capabilities {app: , appActivity: com.bloom.selfie.camera.bea…, appPackage: com.bloom.selfie.camera.beauty, appium: http://127.0.0.1:4723/wd/hub, autoGrantPermission: true, automationName: uiautomator2, databaseEnabled: false, desired: {app: , appActivity: com.bloom.selfie.camera.bea…, appPackage: com.bloom.selfie.camera.beauty, appium: http://127.0.0.1:4723/wd/hub, autoGrantPermission: true, automationName: uiautomator2, deviceName: demo, fullReset: false, newCommandTimeout: 120, noReset: true, platformName: android, unicodeKeyboard: false}, deviceApiLevel: 27, deviceManufacturer: asus, deviceModel: ASUS_X00TD, deviceName: J6AXB761J682CP7, deviceScreenDensity: 480, deviceScreenSize: 1080x2160, deviceUDID: J6AXB761J682CP7, fullReset: false, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: true, newCommandTimeout: 120, noReset: true, pixelRatio: 3, platform: LINUX, platformName: Android, platformVersion: 8.1.0, statBarHeight: 72, takesScreenshot: true, unicodeKeyboard: false, viewportRect: {height: 1944, left: 0, top: 72, width: 1080}, warnings: {}, webStorageEnabled: false}
Session ID: 0ffdc66b-bd3c-4a2b-8c65-83f3d1163e88
2021-12-20 16:48:56 WARN [ReactWebDriver.133.$anonfun$getPageSourceWithRetry$1] retry 2 times after 5s
2021-12-20 16:49:01 WARN [Crawler.705.refreshPage] page source get fail, go back
2021-12-20 16:49:01 WARN [Crawler.705.refreshPage] page source get fail, go back
2021-12-20 16:49:01 INFO [Crawler.1204.saveDom] save to 20210620203709/10_LoginActivity.tag=ImageView.depth=8.id=login_close.clicked.xml
2021-12-20 16:49:01 ERROR [LogicUtils$.13.handleException] java.lang.NullPointerException
2021-12-20 16:49:01 ERROR [LogicUtils$.14.$anonfun$handleException$1] java.util.concurrent.FutureTask.report(Unknown Source)
2021-12-20 16:49:01 ERROR [LogicUtils$.14.$anonfun$handleException$1] java.util.concurrent.FutureTask.get(Unknown Source)
2021-12-20 16:49:01 ERROR [LogicUtils$.14.$anonfun$handleException$1] com.ceshiren.appcrawler.utils.LogicUtils$.$anonfun$asyncTask$1(LogicUtils.scala:75)
2021-12-20 16:49:01 ERROR [LogicUtils$.14.$anonfun$handleException$1] scala.util.Try$.apply(Try.scala:210)
2021-12-20 16:49:01 ERROR [LogicUtils$.14.$anonfun$handleException$1] com.ceshiren.appcrawler.utils.LogicUtils$.asyncTask(LogicUtils.scala:66)
2021-12-20 16:49:01 ERROR [LogicUtils$.14.$anonfun$handleException$1] com.ceshiren.appcrawler.core.Crawler.saveDom(Crawler.scala:1206)
2021-12-20 16:49:01 ERROR [LogicUtils$.14.$anonfun$handleException$1] com.ceshiren.appcrawler.core.Crawler.afterElementAction(Crawler.scala:799)
2021-12-20 16:49:01 ERROR [LogicUtils$.14.$anonfun$handleException$1] com.ceshiren.appcrawler.core.Crawler.crawl(Crawler.scala:1027)
2021-12-20 16:49:01 ERROR [LogicUtils$.14.$anonfun$handleException$1] com.ceshiren.appcrawler.core.Crawler.$anonfun$crawlWithRetry$1(Crawler.scala:214)
2021-12-20 16:49:01 ERROR [LogicUtils$.14.$anonfun$handleException$1] scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
2021-12-20 16:49:01 ERROR [LogicUtils$.14.$anonfun$handleException$1] scala.util.Try$.apply(Try.scala:210)
2021-12-20 16:49:01 ERROR [LogicUtils$.14.$anonfun$handleException$1] com.ceshiren.appcrawler.core.Crawler.crawlWithRetry(Crawler.scala:214)
2021-12-20 16:49:01 ERROR [LogicUtils$.14.$anonfun$handleException$1] com.ceshiren.appcrawler.core.Crawler.start(Crawler.scala:171)
2021-12-20 16:49:01 ERROR [LogicUtils$.14.$anonfun$handleException$1] com.ceshiren.appcrawler.AppCrawler$.startCrawl(AppCrawler.scala:319)
2021-12-20 16:49:01 ERROR [LogicUtils$.14.$anonfun$handleException$1] com.ceshiren.appcrawler.AppCrawler$.parseParams(AppCrawler.scala:286)
2021-12-20 16:49:01 ERROR [LogicUtils$.14.$anonfun$handleException$1] com.ceshiren.appcrawler.AppCrawler$.main(AppCrawler.scala:73)
2021-12-20 16:49:01 ERROR [LogicUtils$.14.$anonfun$handleException$1] com.ceshiren.appcrawler.AppCrawler.main(AppCrawler.scala)
2021-12-20 16:49:01 ERROR [LogicUtils$.16.handleException] find more cause
2021-12-20 16:49:01 ERROR [LogicUtils$.13.handleException] null
2021-12-20 16:49:01 ERROR [LogicUtils$.14.$anonfun$handleException$1] com.ceshiren.appcrawler.core.Crawler.$anonfun$saveDom$1(Crawler.scala:1206)
2021-12-20 16:49:01 ERROR [LogicUtils$.14.$anonfun$handleException$1] scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
2021-12-20 16:49:01 ERROR [LogicUtils$.14.$anonfun$handleException$1] com.ceshiren.appcrawler.utils.LogicUtils$$anon$1.call(LogicUtils.scala:69)
2021-12-20 16:49:01 ERROR [LogicUtils$.14.$anonfun$handleException$1] java.util.concurrent.FutureTask.run(Unknown Source)
2021-12-20 16:49:01 ERROR [LogicUtils$.14.$anonfun$handleException$1] java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
2021-12-20 16:49:01 ERROR [LogicUtils$.14.$anonfun$handleException$1] java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
2021-12-20 16:49:01 ERROR [LogicUtils$.14.$anonfun$handleException$1] java.lang.Thread.run(Unknown Source)
2021-12-20 16:49:01 ERROR [LogicUtils$.18.handleException] exception finish
2021-12-20 16:49:01 INFO [URIElementStore.75.saveResHash] save resHash to 10
2021-12-20 16:49:01 INFO [URIElementStore.106.saveResImg] save resImg 20210620203709/10_LoginActivity.tag=ImageView.depth=8.id=login_close.clicked.png to 10
2021-12-20 16:49:01 ERROR [Crawler.221.crawlWithRetry] crawl not finish, return with exception
2021-12-20 16:49:01 ERROR [Crawler.222.crawlWithRetry] null
2021-12-20 16:49:01 ERROR [Crawler.223.crawlWithRetry] NullPointerException:
2021-12-20 16:49:01 ERROR [Crawler.224.crawlWithRetry] java.lang.NullPointerException
2021-12-20 16:49:01 ERROR [Crawler.225.$anonfun$crawlWithRetry$2] java.lang.NullPointerException
2021-12-20 16:49:01 ERROR [Crawler.225.$anonfun$crawlWithRetry$2] at com.ceshiren.appcrawler.core.Crawler.afterElementAction(Crawler.scala:804)
2021-12-20 16:49:01 ERROR [Crawler.225.$anonfun$crawlWithRetry$2] at com.ceshiren.appcrawler.core.Crawler.crawl(Crawler.scala:1027)
2021-12-20 16:49:01 ERROR [Crawler.225.$anonfun$crawlWithRetry$2] at com.ceshiren.appcrawler.core.Crawler.$anonfun$crawlWithRetry$1(Crawler.scala:214)
2021-12-20 16:49:01 ERROR [Crawler.225.$anonfun$crawlWithRetry$2] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
2021-12-20 16:49:01 ERROR [Crawler.225.$anonfun$crawlWithRetry$2] at scala.util.Try$.apply(Try.scala:210)
2021-12-20 16:49:01 ERROR [Crawler.225.$anonfun$crawlWithRetry$2] at com.ceshiren.appcrawler.core.Crawler.crawlWithRetry(Crawler.scala:214)
2021-12-20 16:49:01 ERROR [Crawler.225.$anonfun$crawlWithRetry$2] at com.ceshiren.appcrawler.core.Crawler.start(Crawler.scala:171)
2021-12-20 16:49:01 ERROR [Crawler.225.$anonfun$crawlWithRetry$2] at com.ceshiren.appcrawler.AppCrawler$.startCrawl(AppCrawler.scala:319)
2021-12-20 16:49:01 ERROR [Crawler.225.$anonfun$crawlWithRetry$2] at com.ceshiren.appcrawler.AppCrawler$.parseParams(AppCrawler.scala:286)
2021-12-20 16:49:01 ERROR [Crawler.225.$anonfun$crawlWithRetry$2] at com.ceshiren.appcrawler.AppCrawler$.main(AppCrawler.scala:73)
2021-12-20 16:49:01 ERROR [Crawler.225.$anonfun$crawlWithRetry$2] at com.ceshiren.appcrawler.AppCrawler.main(AppCrawler.scala)
2021-12-20 16:49:01 ERROR [Crawler.226.crawlWithRetry] create new session
Exception in thread “main” java.lang.NullPointerException
at com.ceshiren.appcrawler.core.Crawler.afterElementAction(Crawler.scala:804)
at com.ceshiren.appcrawler.core.Crawler.crawl(Crawler.scala:1027)
at com.ceshiren.appcrawler.core.Crawler.$anonfun$crawlWithRetry$1(Crawler.scala:214)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
at scala.util.Try$.apply(Try.scala:210)
at com.ceshiren.appcrawler.core.Crawler.crawlWithRetry(Crawler.scala:214)
at com.ceshiren.appcrawler.core.Crawler.start(Crawler.scala:171)
at com.ceshiren.appcrawler.AppCrawler$.startCrawl(AppCrawler.scala:319)
at com.ceshiren.appcrawler.AppCrawler$.parseParams(AppCrawler.scala:286)
at com.ceshiren.appcrawler.AppCrawler$.main(AppCrawler.scala:73)
at com.ceshiren.appcrawler.AppCrawler.main(AppCrawler.scala)

从报错看是因为获取页面pagesource的时候,没有获取到导致的,发下Appium日志看看吧