mrbbot / slshx

⚔️ Strongly-typed Discord commands on Cloudflare Workers
MIT License
211 stars 8 forks source link

Unrecgnized algorithm name when trying to validate request #18

Open roziscoding opened 12 months ago

roziscoding commented 12 months ago

I followed the README guide up to the point where it asks me to set my interactions URL. After that, I get the following error:

POST / 500 Internal Server Error (67.67ms)
[mf:err] POST /: NotSupportedError: Unrecognized name.
    at new DOMException (node:internal/per_context/domexception:53:5)
    at __node_internal_ (node:internal/util:505:10)
    at normalizeAlgorithm (node:internal/crypto/util:212:15)
    at SubtleCrypto.importKey (node:internal/crypto/webcrypto:526:15)
    at validateInteraction (/home/roziscoding/github/Formacao-Typescript/discord-bot-cfw/node_modules/slshx/src/interactions/validate.ts:20:41)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Object.fetch (/home/roziscoding/github/Formacao-Typescript/discord-bot-cfw/node_modules/slshx/src/index.ts:58:17)
    at EventTarget.[kDispatchFetch] (/home/roziscoding/github/Formacao-Typescript/discord-bot-cfw/node_modules/@miniflare/core/src/standards/event.ts:359:13)
    at Server.<anonymous> (/home/roziscoding/github/Formacao-Typescript/discord-bot-cfw/node_modules/@miniflare/http-server/src/index.ts:290:20)

I'm running on a fresh install of endeavor OS, and I've tried node 20.6.1, 18.17.1 and 16.20.2. None of them worked. I've googled a bit and found out that the specified algorithm was removed on version 1.16.17.

Is there any reason for the library to keep using such an outdated algorithm when ED25519 is officially supported by the latest Node.js version?