brannondorsey / chattervox

📡 An AX.25 packet radio chat protocol with support for digital signatures and binary compression. Like IRC over radio waves.
Other
748 stars 36 forks source link

Uncaught TypeError: Invalid magic bytes in packet header. #24

Closed brannondorsey closed 5 years ago

brannondorsey commented 5 years ago
KC3LZO-4: test test
KC3LZO-4: do you copy?
KC3LZO-4: (node:8064) UnhandledPromiseRejectionWarning: TypeError: Invalid magic bytes in packet header
. This is not a CV Packet.
    at Packet.<anonymous> (/home/pi/.nvm/versions/node/v8.15.0/lib/node_modules/chattervox/build/Packet
.js:96:23)
    at Generator.next (<anonymous>)
    at /home/pi/.nvm/versions/node/v8.15.0/lib/node_modules/chattervox/build/Packet.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (/home/pi/.nvm/versions/node/v8.15.0/lib/node_modules/chattervox/build/Packet.js:3:12)
    at Packet.disassemble (/home/pi/.nvm/versions/node/v8.15.0/lib/node_modules/chattervox/build/Packet
.js:88:16)
    at Function.<anonymous> (/home/pi/.nvm/versions/node/v8.15.0/lib/node_modules/chattervox/build/Pack
et.js:162:26)
    at Generator.next (<anonymous>)
    at /home/pi/.nvm/versions/node/v8.15.0/lib/node_modules/chattervox/build/Packet.js:7:71
    at new Promise (<anonymous>)
(node:8064) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either
 by throwing inside of an async function without a catch block, or by rejecting a promise which was not
 handled with .catch(). (rejection id: 4)
(node:8064) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, p
romise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
danc256 commented 5 years ago

Unable to reproduce on macOS Mojave and node v8.15.0. Any clues on how to trigger the bug?

brannondorsey commented 5 years ago

This bug was triggered after leaving the chattervox chat functionality open for an extended period of time, and presumably receiving a non-chattervox packet like APRS. My guess is that this could be triggered by tuning your radio to 144.39 (the APRS frequency in the US) and receiving normal APRS traffic for some time.

brannondorsey commented 5 years ago

I've got a fix inbound ;)