walther PRO said about 1 year ago on Push Notifications from Scratch :
hmm - when I introduce the vapid_public_key like in the shared example - I get this error in my Chrome ( Version 111.0.5563.64 (Officiel version) (arm64)) DevTools

Failed to execute 'subscribe' on 'PushManager': The provided applicationServerKey is not encoded as base64url without padding.

Comparing the key from the credentials with the one assigned to vapidPublicKey I find them to be matching 100%

Perhaps you might have a peek at https://blog.atulr.com/web-notifications/ - there's a function labeledĀ 
urlB64ToUint8Array
which AFAICS is the magic pillĀ