Next.js Discord

Discord Forum

Errors triggering Pusher messages on my Vercel deployment

Unanswered
Sun bear posted this in #help-forum
Open in Discord
Sun bearOP
Hi

I'm struggling to get my Pusher triggers working on Vercel. I was able to get presence channels working correctly (as seen in my Pusher logs both locally and on Vercel), however my code to trigger events only works locally - it errors out on Vercel.

I'm using a tRPC mutation on my frontend (in this instance to set the property of a database entry to designate it as cancelled) which runs a prisma update, then calls a Pusher trigger to send a message to all users in the presence channel. The error on the vercel deployment is in the screenshots (the database update is definitely still happening)

Code to trigger event can be seen in screenshots and link to repo (to mutation that triggers code) is here: https://github.com/harryhartley/striker/blob/e8dd0bd925bc1ac1e7a709fdcf3718fe71f0041c/src/server/api/routers/strikerRoom.ts#L66

Any help extremely appreciated

1 Reply

Sun bearOP
Bumping this, still pretty lost on how to fix it