Hi! I am so excited to see this library, thank you for creating it.
I set everything up and attempted to use const payload = await decodeNotificationPayload(signedPayload). However, I got an error:
(node:1) UnhandledPromiseRejectionWarning: TypeError: crypto_1.X509Certificate is not a constructor
[cookup-action-service] [2022-05-20 21:43:16] at /usr/src/app/node_modules/app-store-server-api/dist/cjs/Decoding.js:133:60
[cookup-action-service] [2022-05-20 21:43:16] at Array.map (<anonymous>)
[cookup-action-service] [2022-05-20 21:43:16] at validateCertificates (/usr/src/app/node_modules/app-store-server-api/dist/cjs/Decoding.js:133:34)
[cookup-action-service] [2022-05-20 21:43:16] at /usr/src/app/node_modules/app-store-server-api/dist/cjs/Decoding.js:111:29
[cookup-action-service] [2022-05-20 21:43:16] at step (/usr/src/app/node_modules/app-store-server-api/dist/cjs/Decoding.js:52:23)
[cookup-action-service] [2022-05-20 21:43:16] at Object.next (/usr/src/app/node_modules/app-store-server-api/dist/cjs/Decoding.js:33:53)
[cookup-action-service] [2022-05-20 21:43:16] at /usr/src/app/node_modules/app-store-server-api/dist/cjs/Decoding.js:27:71
[cookup-action-service] [2022-05-20 21:43:16] at new Promise (<anonymous>)
[cookup-action-service] [2022-05-20 21:43:16] at __awaiter (/usr/src/app/node_modules/app-store-server-api/dist/cjs/Decoding.js:23:12)
[cookup-action-service] [2022-05-20 21:43:16] at getKey (/usr/src/app/node_modules/app-store-server-api/dist/cjs/Decoding.js:106:74)
[cookup-action-service] [2022-05-20 21:43:16] (node:1) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
Hi! I am so excited to see this library, thank you for creating it.
I set everything up and attempted to use
const payload = await decodeNotificationPayload(signedPayload)
. However, I got an error:Any ideas?