Crash on advert with short/truncated signature — unhandled Error from @noble/curves in isVerified() #5

Open
opened 2026-10-27 16:44:23 +01:00 by adam · 0 comments
Owner

My instance is crashing relatively often (more than once a day) with the following error:

file:///app/node_modules/@noble/curves/esm/utils.js:93
throw new Error(title + ' of length ' + expectedLength + ' expected, got ' + len);
^
Error: signature of length 64 expected, got 18
at ensureBytes (file:///app/node_modules/@noble/curves/esm/utils.js:93:15)
at Object.verify (file:///app/node_modules/@noble/curves/esm/abstract/edwards.js:487:15)
at Advert.isVerified (file:///app/node_modules/@liamcottle/meshcore.js/src/advert.js:66:24)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
Node.js v22.22.0

It seems like it receives a packet of type advert of the wrong length and this is unexpected and crashes. Luckily, due to this PR my container auto restarts and keeps on working, but without monitoring and autorestart, this would be a significant problem.

My instance is crashing relatively often (more than once a day) with the following error: file:///app/node_modules/@noble/curves/esm/utils.js:93 throw new Error(title + ' of length ' + expectedLength + ' expected, got ' + len); ^ Error: signature of length 64 expected, got 18 at ensureBytes (file:///app/node_modules/@noble/curves/esm/utils.js:93:15) at Object.verify (file:///app/node_modules/@noble/curves/esm/abstract/edwards.js:487:15) at Advert.isVerified (file:///app/node_modules/@liamcottle/meshcore.js/src/advert.js:66:24) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) Node.js v22.22.0 It seems like it receives a packet of type advert of the wrong length and this is unexpected and crashes. Luckily, due to [this PR](https://github.com/recrof/map.meshcore.dev-uploader/pull/5) my container auto restarts and keeps on working, but without monitoring and autorestart, this would be a significant problem. <!-- github-sync-id:4192896333 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/map.meshcore.dev-uploader#5