Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After deploying: Error: [@octokit/webhooks] signature does not match event payload and secret #82

Closed
mrousavy opened this issue Jun 11, 2024 · 2 comments

Comments

@mrousavy
Copy link

I developed my bot according to this example, but after deploying it to Vercel I get these errors in my Vercel Runtime Logs:

AggregateError: 
Error: [@octokit/webhooks] signature does not match event payload and secret
at verifyAndReceive (/var/task/node_modules/@octokit/webhooks/dist-node/index.js:490:19)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at middleware (/var/task/node_modules/@octokit/webhooks/dist-node/index.js:621:5)
at Server.<anonymous> (/opt/rust/nodejs.js:1:10461)
at Server.<anonymous> (/opt/rust/nodejs.js:7:3888)
at receiverHandle (/var/task/node_modules/@octokit/webhooks/dist-node/index.js:395:33)
at verifyAndReceive (/var/task/node_modules/@octokit/webhooks/dist-node/index.js:493:31)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at middleware (/var/task/node_modules/@octokit/webhooks/dist-node/index.js:621:5)
at Server.<anonymous> (/opt/rust/nodejs.js:1:10461)
at Server.<anonymous> (/opt/rust/nodejs.js:7:3888) {
event: Error: [@octokit/webhooks] signature does not match event payload and secret
at verifyAndReceive (/var/task/node_modules/@octokit/webhooks/dist-node/index.js:490:19)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at middleware (/var/task/node_modules/@octokit/webhooks/dist-node/index.js:621:5)
at Server.<anonymous> (/opt/rust/nodejs.js:1:10461)
at Server.<anonymous> (/opt/rust/nodejs.js:7:3888) {

Any idea why?

@skywarth
Copy link

skywarth commented Jul 3, 2024

Just my two cents, it might help:

  • If this error is not present in your local, verify whether you install the dependencies via npm install or npm ci. If there is no error on local, this might mean you're installing with npm install which could essentially differ dependency versions and cause this error
  • Do you have PRIVATE_KEY, WEBHOOK_SECRET and other similar .env values set in production? Verify them please.

@mrousavy
Copy link
Author

mrousavy commented Jul 4, 2024

Actually the problem was that Vercel was doing some verifications/parsing on webhook requests - I disabled that and now it works! Thanks

@mrousavy mrousavy closed this as completed Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants