Error: This Webhook Is Already Registered
Issue
After changing a connection's authentication method, syncs fail with one of the following errors:
Hook already exists on this organizationThis webhook is already registered. Remove the existing webhook or choose another sync strategy.
Environment
Connector: GitHub
Resolution
To resolve this issue:
- In GitHub, go to the organization's or repository's webhook settings.
- Delete the existing Fivetran webhooks.
- In Fivetran, go to your GitHub connection page.
- Select the Settings tab.
- Click Edit connection.
- Click Authorize or Re-Authorize Connection, depending on your authentication method.
- Click Save & Test and confirm that the setup tests pass.
- Monitor the next few syncs.
For more information, see the GitHub Setup Guide.
Changing authentication methods and recreating the webhook doesn't trigger a historical sync. However, if the connection misses webhook events between deleting the old webhook and activating the new one, you may need to re-sync the affected data. For instructions, see How to Trigger Historical Re-Syncs.
If you prefer to keep the existing webhook, use one of these alternatives:
- Configure your connection to GitHub App authentication and set the Use Webhooks toggle to OFF. The connection uses polling instead, which results in slower syncing.
- Continue using OAuth or PAT authentication with the Use Webhooks toggle set to ON. Make sure the authenticated user has the
admin:org_hookandadmin:repo_hookpermissions required to maintain the existing webhook.
Cause
This issue occurs when you change authentication methods while an existing webhook still exists. GitHub App webhooks differ from the standard organization or repository webhooks created using OAuth or PAT authentication.
We track the IDs of the webhooks we create and can't reuse a webhook created under a different authentication method. When we try to register a new webhook while the old one still exists, GitHub reports that the webhook is already registered. This can occur even when we have permission to create and delete webhooks.
For more information, see Error: Failed To Connect to GitHub Webhooks: Lack of Access / Endpoint Not Found.