monorepo icon indicating copy to clipboard operation
monorepo copied to clipboard

Push errors

Open Superalexandre opened this issue 4 months ago • 0 comments

When I try to generate a generateSubscriptionId I got an error :

TypeError: genSalt is not a function
    at Module.generateSubscriptionId (PATH/node_modules/@remix-pwa/push/dist/server/utils.js:11:24)
    at action (PATH\app\routes\api\notifications\subscribe\index.ts:22:34)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async Object.callRouteAction (PATH\node_modules\@remix-run\server-runtime\dist\data.js:36:16)
    at async PATH\node_modules\@remix-run\router\dist\router.cjs.js:4724:19
    at async callLoaderOrAction (PATH\node_modules\@remix-run\router\dist\router.cjs.js:4790:16)
    at async Promise.all (index 0)
    at async defaultDataStrategy (PATH\node_modules\@remix-run\router\dist\router.cjs.js:4649:17)
    at async callDataStrategyImpl (PATH\node_modules\@remix-run\router\dist\router.cjs.js:4681:17)
    at async callDataStrategy (PATH\node_modules\@remix-run\router\dist\router.cjs.js:4136:19)
    at async submit (PATH\node_modules\@remix-run\router\dist\router.cjs.js:3995:21)
    at async queryImpl (PATH\node_modules\@remix-run\router\dist\router.cjs.js:3953:22)
    at async Object.queryRoute (PATH\node_modules\@remix-run\router\dist\router.cjs.js:3922:18)
    at async handleResourceRequest (PATH\node_modules\@remix-run\server-runtime\dist\server.js:402:20)
    at async requestHandler (PATH\node_modules\@remix-run\server-runtime\dist\server.js:156:18)
    at async nodeHandler (PATH\node_modules\@remix-run\dev\dist\vite\plugin.js:839:27)
    at async PATH\node_modules\@remix-run\dev\dist\vite\plugin.js:842:15

Second thing, when I use the function sendNotifications and the subscriptions is invalid (for exemple the user have subscribed then unistall the pwa and the subscriptions is still in database) The whole process crash even in a try catch it could be nice to throw the error without crash

Superalexandre avatar Oct 07 '24 18:10 Superalexandre