alxhotel / nat-api

:left_right_arrow: Fast port mapping with UPnP and NAT-PMP
MIT License
23 stars 12 forks source link

Can't map ports #3

Closed brunicius closed 4 years ago

brunicius commented 4 years ago

I'm getting error when i try map ports

Error: NAT-PMP and UPnP port mapping failed at C:\Users\zerobgk\Documents\NodeJS\upnp test\node_modules\nat-api\index.js:218:41 at C:\Users\zerobgk\Documents\NodeJS\upnp test\node_modules\nat-api\index.js:282:16 at Request._callback (C:\Users\zerobgk\Documents\NodeJS\upnp test\node_modules\nat-api\lib\upnp\device.js:49:18) at Request.self.callback (C:\Users\zerobgk\Documents\NodeJS\upnp test\node_modules\request\request.js:185:22) at Request.emit (events.js:223:5) at Request. (C:\Users\zerobgk\Documents\NodeJS\upnp test\node_modules\request\request.js:1161:10) at Request.emit (events.js:223:5) at IncomingMessage. (C:\Users\zerobgk\Documents\NodeJS\upnp test\node_modules\request\request.js:1083:12) at Object.onceWrapper (events.js:312:28) at IncomingMessage.emit (events.js:228:7)

alxhotel commented 4 years ago

This error is returned when the port mapping fails for NAT-PMP and UPNP.

In your case, it looks like the response from the UPNP server did not have a 200 status code. Thus, the response was treated as an error.

Make sure your UPNP server (in many cases your home router) is enabled and working.

Edit: Closing issue. But please let me know if there is any news.

introspection3 commented 2 years ago

at Timeout._onTimeout (...node_modules\nat-api\lib\upnp\index.js:193:7) other's package wokr fine