matrix-org / matrix-org/matrix-hookshot

[Error]: signature does not match event payload and secret

Open
#842 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

X-Needs-Info
Dominant language
TypeScript
Stars
450
Forks
95
Avg merge
1d 2h
Merged PRs (30d)
23

Description

Hi, just set up hookshot, tried to send 2 events but got errors. Should webhook secret be a random value or a secrete generated by GitHub app aka "client secrets"?

ERROR 00:34:46:245 [Webhooks] Failed handle GitHubEvent: AggregateError: 
    Error: [@octokit/webhooks] signature does not match event payload and secret
        at verifyAndReceive (/usr/bin/matrix-hookshot/node_modules/@octokit/webhooks/dist-node/index.js:259:19)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
ERROR 00:37:50:204 [Webhooks] Failed handle GitHubEvent: AggregateError: 
    Error: [@octokit/webhooks] signature does not match event payload and secret
        at verifyAndReceive (/usr/bin/matrix-hookshot/node_modules/@octokit/webhooks/dist-node/index.js:259:19)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

What should be the content type of the webhook(application/json or application/x-www-form-url-encoded)?

Do I need to specify room for registration? And if I do do I keep the exclamation mark, i.e. !yVrxYIBfoOPIdTwbEX ?

Can someone share their configs for GitHub please, the registration file for synapse and the registration/configuration for hookshot. I do not understand what I should be putting in url for registration configs.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the GitHub webhook handling path identified in the report, especially @octokit/webhooks verifyAndReceive and the hookshot registration/configuration values. Check how the secret, content type, room, and registration URL are expected to be supplied; done means documenting or correcting the configuration so signed GitHub events are accepted.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, typescript
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.