RSelenium: server signals port is already in use

后端 未结 5 814
北恋
北恋 2020-12-14 08:42

I\'m using the following code in RSelenium to open a browser. After I close the browser, or even close the handler by running remDr$close(), the port is still in use. I have

5条回答
  •  轮回少年
    2020-12-14 09:08

    I did not have issues until recently. What worked for me is to use the solution above and as per the solution in this thread to add a line to kill the Java instance(s) inside RStudio.

    remDr$close()
    driver$server$stop()
    rm(driver, remDr)
    gc()
    
    system("taskkill /im java.exe /f", intern=FALSE, ignore.stdout=FALSE)
    

提交回复
热议问题