Closed maaft closed 3 years ago
Update
$ npm uninstall @noia-network/node-cli -g
$ npm install @noia-network/node-cli -g --unsafe-perm
$ noia-node-cli
Error
dgram.js:419
throw new errors.RangeError('ERR_SOCKET_BAD_PORT');
^
RangeError [ERR_SOCKET_BAD_PORT]: Port should be > 0 and < 65536
at Socket.send (dgram.js:419:11)
at Socket.server.on (/usr/lib/node_modules/@noia-network/node-cli/node_modules/@noia-network/webrtc-direct-server/dist/udp-proxy.js:96:25)
at emitTwo (events.js:126:13)
at Socket.emit (events.js:214:7)
at UDP.onMessage [as onmessage] (dgram.js:659:8)
Edit When testing the connection with:
const WebRtcDirect = require("@noia-network/webrtc-direct-client");
const wrtc = require("wrtc");
const address = "http://**removed**:8048";
const client = new WebRtcDirect.Client(address, {
wrtc: wrtc
});
async function main() {
try {
console.log("connecting...");
await client.connect();
console.log("stopping...");
await client.stop();
console.log("exiting...");
process.exit();
} catch (err) {
console.error("error", err);
}
}
main();
the above error arises.
Printing des
in udp_proxy.js line 95 yields my IPv6 loopback address e.g.:
::2:40605
which results in destPort
and destIP
being set to 0 and therefore throwing the exception.
Quick Fix
Remove IPv6 adapters with:
$ sysctl -w net.ipv6.conf.all.disable_ipv6=1
$ sysctl -w net.ipv6.conf.default.disable_ipv6=1
Conclusion
IPv6 support must be implemented in the future or ignore IPv6 adapters in webrtc-direct.js
implementation.
Closing because this stack is deprecated.
Describe the bug
To Reproduce Steps to reproduce the behavior:
Content of settings.json