Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

UnhandledPromiseRejectionWarning thrown from this module #3

Closed
achingbrain opened this issue Feb 13, 2020 · 4 comments
Closed

UnhandledPromiseRejectionWarning thrown from this module #3

achingbrain opened this issue Feb 13, 2020 · 4 comments

Comments

@achingbrain
Copy link
Member

(node:19077) UnhandledPromiseRejectionWarning: Error: invalid ip
    at module.exports (/Users/alex/.nvm/versions/node/v10.17.0/lib/node_modules/ipfs/node_modules/libp2p-utils/src/ip-port-to-multiaddr.js:8:11)
    at module.exports (/Users/alex/.nvm/versions/node/v10.17.0/lib/node_modules/ipfs/node_modules/libp2p-tcp/src/socket-to-conn.js:55:39)
    at Server.net.createServer (/Users/alex/.nvm/versions/node/v10.17.0/lib/node_modules/ipfs/node_modules/libp2p-tcp/src/listener.js:23:20)
    at Server.emit (events.js:198:13)
    at TCP.onconnection (net.js:1520:8)

This can cause applications to crash.

@vasco-santos
Copy link
Member

vasco-santos commented Feb 13, 2020

@achingbrain this module throws when parameters are not valid, which seems correct to me. who uses this module (libp2p-tcp in this case) should take this into account, right?

@achingbrain
Copy link
Member Author

libp2p/js-libp2p-tcp#121

@jacobheun
Copy link
Contributor

jacobheun commented Feb 13, 2020

@vasco-santos while tcp needs to catch this we should improve the errors in this function to include the ip and port that were provided to more easily diagnose these issues. I'm assuming this is an issue with the remote address being a DNS or similar address, but can't be certain due to the lack of info in the error.

@vasco-santos
Copy link
Member

Yeah, that seems a good call! I can add them to the errors

D4nte referenced this issue in D4nte/js-libp2p-utils Jun 27, 2022
BREAKING CHANGE: uses new single-issue libp2p interface modules
D4nte referenced this issue in D4nte/js-libp2p-utils Jun 27, 2022
## [2.0.0](libp2p/js-libp2p-peer-record@v1.0.12...v2.0.0) (2022-06-15)

### ⚠ BREAKING CHANGES

* uses new single-issue libp2p interface modules

### Features

* update to latest interfaces ([#3](libp2p/js-libp2p-peer-record#3)) ([3448776](libp2p/js-libp2p-peer-record@3448776))
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants