代码之家  ›  专栏  ›  技术社区  ›  Moshe S.

CreatePlatformsocket()返回错误:提供的参数无效。(0x2726)尝试通过网络路径访问Chromedriver时

  •  1
  • Moshe S.  · 技术社区  · 6 年前

    Chromedriver和GeckoDriver在更新后的站点在本地运行时(例如,驱动器C:\)都可以正常启动。当在网络路径中发现这两个问题时,就会出现问题。

    我正在使用两个驱动程序的默认设置运行它们,而不使用它们的选项,我相信使用这些选项可能可以解决问题。

    顺便说一下,我运行的是Windows10 Pro版本:1803 OS内部版本:17134.1

    GeckoDriver是v0.20.1-win64

    [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
    [1530079175.166][SEVERE]: CreatePlatformSocket() returned an error: An invalid argument was supplied. (0x2726)
    [1530079175.166][INFO]: listen on IPv6 failed with error ERR_INVALID_ARGUMENT
    

    壁虎司机

    An invalid argument was supplied. (os error 10022)
    
    1 回复  |  直到 6 年前
        1
  •  1
  •   undetected Selenium    6 年前

    正如您所提到的:

    • 两者都有 Chromedriver河 壁虎司机 在本地执行时无任何问题地启动(例如 C:\
    • 问题出现在

    历史上,根据讨论:

    壁虎司机

    • 样品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.
      
    • [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...
      
    • 样品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.
      
    • //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 = ''
      

    解决方案

    壁虎司机