CreatePlatformSocket() returned an error: An invalid argument was supplied. (0x2726) when trying to access chromedriver through network path

ぃ、小莉子 提交于 2019-11-29 16:27:28

As you have mentioned:

  • Both ChromeDriver and GeckoDriver starts without any problem when executed locally ( e.g. C:\ drive)
  • The issues arises when ChromeDriver and GeckoDriver are found in a network path.

Historically, as per the discussions:

It had been observed that both ChromeDriver and GeckoDriver when shared over the network, while initializing the respective Browser Clients the following errors were observed:

  • Sample A:

    Starting ChromeDriver 2.28.455520 (cc17746adff54984afff480136733114c6b3704b) on port 12121
    Only local connections are allowed.
    [0.023][SEVERE]: CreatePlatformSocket() returned an error: An invalid argument was supplied. (0x2726)
    [0.023][SEVERE]: CreatePlatformSocket() returned an error: An invalid argument was supplied. (0x2726)
    Port not available. Exiting...
    Mar 11, 2017 9:13:06 PM org.openqa.selenium.os.UnixProcess checkForError
    SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
    org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
    
  • Sample B:

    [0.147][SEVERE]: CreatePlatformSocket() returned an error: An invalid argument was supplied. (0x2726) 
    [0.147][SEVERE]: CreatePlatformSocket() returned an error: An invalid argument was supplied. (0x27t6) 
    Port not available. Exiting...
    
  • Sample C:

    Starting ChromeDriver 2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb) on port 17873
    Only local connections are allowed.
    [1525873930.811][SEVERE]: CreatePlatformSocket() returned an error: An invalid argument was supplied. (0x2726)
    [1525873930.816][SEVERE]: CreatePlatformSocket() returned an error: An invalid argument was supplied. (0x2726)
    Port not available. Exiting...
    May 09, 2018 7:22:30 PM org.openqa.selenium.os.UnixProcess checkForError
    SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
    Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
    
  • And even:

    //chromedriver
    [1530079175.164][SEVERE]: CreatePlatformSocket() returned an error: An invalid argument was supplied. (0x2726)
    [1530079175.165][INFO]: listen on IPv4 failed with error ERR_INVALID_ARGUMENT
    
    //geckodriver
    An invalid argument was supplied. (os error 10022)
    
    //IEDriverServer
    Failed to start the server with: port = '2305', host = '', log level = '', log file = '', whitelisted ips = ''
    

Solution

So a generalized solution would be to access ChromeDriver and GeckoDriver by putting them into the local drives of the host machine.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!