buffer.js throws Unknown encoding: base64url

800 views Asked by At

the line

publicKey = Buffer.from(publicKey, 'base64url');

throws

uncaughtException server.js TypeError [ERR_UNKNOWN_ENCODING]: Unknown encoding: base64url
    at fromString (buffer.js:451:13)
    at Function.from (buffer.js:305:12)
    at Object.validatePublicKey (C:\Users\libor\OneDrive\Escritorio\todo\dev\Aplay\proyectos\cms-mimediodetest3\node_modules\web-push\src\vapid-helper.js:107:22)

I'm using node:12.22.12 and buffer:3.6.4
I have searched for fixes and found nothing
I have searched in the docs and buffer accepts base64url
I have no idea what to do

0

There are 0 answers