Skip to content

Enable PMP throw a Uncaught Exception #9

@agalwood

Description

@agalwood

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions