Hi Team.
Greetings of the day
I am trying to run Ajax Spider Scan and I am automating it through Java using Zap-Client API -> Version used 1.11.0 and Zap version - 2.13.0.
It fails to run the Ajax spider in ZAP, but works fine when running the Spider and Active Scans with the API.
I am using this piece of code to start the ajax spider scan ->
clientApi.ajaxSpider.setOptionBrowserId("chrome");
ApiResponse ascanResp = clientApi.ajaxSpider.scan(target, "false" , contextName, "false");
Where target is a public URL ->
https://opensource-demo.orangehrmlive.com/web/index.php/auth/validate and contextName is "MY_CONTEXT" and setting chrome as a browser.
When I try to print clientApi.ajaxSpider.status(); -> It gives the result as running but never shows up in ZAP.
But if I try to run the Ajax Spider scan manually in ZAP, it starts as expected and shows up in the tab with the number of crawled URL's.
The logs that show up are as follows.
2072340 [ZAP-AjaxSpiderApi] INFO org.zaproxy.zap.extension.spiderAjax.SpiderThread - Running Crawljax (with chrome): API - Context: TALOS_CONTEXT_TS_20
2072343 [ZAP-AjaxSpiderApi] INFO org.zaproxy.zap.extension.spiderAjax.SpiderThread - Starting proxy...
2072350 [ZAP-AjaxSpiderApi] INFO org.zaproxy.zap.extension.spiderAjax.SpiderThread - Proxy started, listening at port [51739].
2072369 [ZAP-AjaxSpiderApi] INFO com.crawljax.core.plugin.Plugins - Loaded org.zaproxy.zap.extension.spiderAjax.SpiderThread$DummyPlugin466ec645 as a OnBrowserCreatedPlugin
2072384 [ZAP-AjaxSpiderApi] INFO org.openqa.selenium.remote.service.DriverService - Driver logs no longer sent to console by default;
https://www.selenium.dev/documentation/webdriver/drivers/service/#setting-log-output2075406 [ZAP-AjaxSpiderApi] WARN org.openqa.selenium.devtools.CdpVersionFinder - Unable to find CDP implementation matching 122
2075408 [ZAP-AjaxSpiderApi] WARN org.openqa.selenium.chromium.ChromiumDriver - Unable to find version of CDP to use for . You may need to include a dependency on a specific version of the CDP using something similar to `org.seleniumhq.selenium:selenium-devtools-v86:4.10.0` where the version ("v86") matches the version of the chromium-based browser you're using and the version number of the artifact is the same as Selenium's.
2076242 [ZAP-IO-Server-1-31] INFO org.zaproxy.zap.users.User - Authenticating user: Test User
2079864 [ZAP-AjaxSpiderApi] INFO org.openqa.selenium.remote.service.DriverService - Driver logs no longer sent to console by default;
https://www.selenium.dev/documentation/webdriver/drivers/service/#setting-log-outputPlease help me to figure out the problem and get the ajax spider scan running in ZAP side.
Thanks