free_port() with netstat

I don't know where this error derived from: 'Error in strsplit(local, ":") : argumento de tipo no-carácter'

Dr = RSelenium::rsDriver(browser = 'firefox', port = netstat::free_port(), extraCapabilities = eCaps)
netstat::free_port(random = TRUE) 

The result of these three different lines is the same. So, what was the part of the code in which I took the mistake?


1 Like

Hi there, would it be possible to run sessionInfo() from the same computer you experienced the error on, and paste the output here?

Hi. I didn't solve this problem, but I find another alternative in which I can use Rselenium properly: I used shell() function in order to close the server and port.

Dr = RSelenium::rsDriver(browser = 'firefox', port = 4444L)
Driver = Dr[['client']]
  kill = 'for /f "tokens=5" %a in (\'netstat -aon ^| find ":4444" ^| find "LISTENING"\') do taskkill /f /pid %a'
  shell(kill, ignore.stderr = TRUE, ignore.stdout = TRUE)
1 Like

Great solution.

Another thing you could try is using a port value other than 4444L (there's a massive range of ports available, see the IANA recommended ones in the netstat package source code here), for example, any of the ~500 integers between 14415 and 14935 are usually free.

I'll try to fix the issue with netstat::free_port(). Do you remember which operating system you were using at the time of the error?

1 Like

Yes, I use Windows as an Operating system. I miss Linux so much

That is the result of sessioninfo()

If I have a information that I need to hide for my security, I hope you alert me.

1 Like

Thanks very much. sessionInfo() provides the R version, operating system name, locale (i.e. OS language, time, currency unit), and loaded R packages. It is recommendedhere for helping reproduce bugs, so nothing to worry about regarding security.

1 Like

:+1: :+1: :+1: :+1: :+1:


1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.