Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable PMP throw a Uncaught Exception #9

Open
agalwood opened this issue May 24, 2020 · 0 comments
Open

Enable PMP throw a Uncaught Exception #9

agalwood opened this issue May 24, 2020 · 0 comments

Comments

@agalwood
Copy link

agalwood commented May 24, 2020

Hello Alex,

When I enable PMP and initialized, it throw a Uncaught Exception : (

client = new NatAPI({
  enablePMP: true
})

Uncaught Exception:
TypeError: Cannot read property 'readUInt8' of undefined
at Client.onMessage (node_modules/nat-api/lib/pmp/index.js:257:23)
at Socket. (node_modules/nat-api/lib/pmp/index.js:50:42)
at Socket.emit (events.js:210:5)
at UDP.onMessage [as onmessage] (dgram.js:861:8)

I open the source code to find readUInt8, then set

cross-env DEBUG='nat-pmp*'

and restart the application, found the following log:

2020-05-24T09:54:00.059Z nat-pmp Client#onMessage() [ undefined, undefined ]

I don’t know how to fix it, so I ’ll ask for help.

ENV

  • OS: macOS Catalina 10.15.4
  • Router: Apple Time Capsule (Enabled NAT Port Mapping)
  • Electron: v9.0.0
  • System NodeJS: v12.16.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant