Node.js Selenium IPv6 Issue (SocketException Protocol family unavailable)

前端 未结 2 377
醉话见心
醉话见心 2020-12-17 17:22

This error only happens when I spawn the ios-driver jar as a Node.js child.

The error is java.net.SocketException: Protocol family unavailable

seleni

2条回答
  •  有刺的猬
    2020-12-17 18:04

    I managed to solve this by making the spawned child ignore stdin:

    var selenium = spawn('java', ['-jar', './ios-server-standalone-0.6.6-SNAPSHOT.jar', '-port', '4444'], {stdio: ['ignore', null, null]});

    I'm not sure why this workaround works.

提交回复
热议问题