Hello ZAP Proxy Group,
I hope this message finds you well. I'm currently facing an issue while using AjaxSpider in my Golang code with ZAP Proxy. The error message I'm encountering is as follows:
```
65343 [Thread-12] WARN org.openqa.selenium.os.ExternalProcess - failed to copy the output of process 163
java.io.IOException: Stream closed
at java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:176) ~[?:?]
at java.io.BufferedInputStream.read(BufferedInputStream.java:342) ~[?:?]
at java.io.InputStream.transferTo(InputStream.java:704) ~[?:?]
at org.openqa.selenium.os.ExternalProcess$Builder.lambda$start$0(ExternalProcess.java:209) ~[?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
71223 [Thread-79] WARN org.openqa.selenium.os.ExternalProcess - failed to copy the output of process 981
```
I'm using the following Golang function for the AjaxSpider scan:
```golang
// Note: the spiderAjax Add-on must install to run the AjaxSpiderScan function.
func (rcv PentestRcv) AjaxSpiderScan(targetURL, contextName string) error {
bar := logger.SetProgressBar(100, "Ajax Spider on target")
_, err := rcv.Interface.AjaxSpider().Scan(targetURL, "", contextName, "")
if err != nil {
return err
}
if bar != nil {
bar.Increment(10)
}
// Poll the AJAX Spider status until it completes
for {
status, err := rcv.Interface.AjaxSpider().Status()
if err != nil {
logger.Info("Failed to get AJAX Spider status:", err)
}
logger.Info("process ", status["status"])
if status["status"].(string) == "stopped" {
fmt.Println("AJAX Spider completed.")
break
}
time.Sleep(5 * time.Second) // Adjust the polling interval as needed
}
if bar != nil {
bar.Increment(90)
bar.MarkAsDone()
}
return nil
}
```
I would appreciate any guidance or suggestions on resolving this issue. If you need any additional information or code snippets, please let me know.
Thank you in advance for your assistance.
Best regards