Significant-Gravitas/AutoGPT · warning · HTTPException

Webhook ping timed out

Error message

Webhook ping timed out

What it means

After triggering a provider-side ping (webhook_manager.trigger_ping), the endpoint waits up to 10 seconds via wait_for_webhook_event(webhook_id, event_type='ping') for the resulting ingress to arrive. If no ping event lands in that window, it raises HTTP 504 'Webhook ping timed out'. This tests the full round trip: provider sends ping -> ingress endpoint receives it -> event recorded.

Source

Thrown at autogpt_platform/backend/backend/api/features/integrations/router.py:803

        # Treat a webhook the caller doesn't own as if it doesn't exist, so this
        # endpoint can't be used to enumerate webhook IDs or ping others' webhooks.
        raise HTTPException(
            status_code=status.HTTP_404_NOT_FOUND, detail="Webhook not found"
        )
    webhook_manager = get_webhook_manager(webhook.provider)

    credentials = (
        await creds_manager.get(user_id, webhook.credentials_id)
        if webhook.credentials_id
        else None
    )
    try:
        await webhook_manager.trigger_ping(webhook, credentials)
    except NotImplementedError:
        return False

    if not await wait_for_webhook_event(webhook_id, event_type="ping", timeout=10):
        raise HTTPException(
            status_code=status.HTTP_504_GATEWAY_TIMEOUT, detail="Webhook ping timed out"
        )

    return True


async def _execute_webhook_node_trigger(
    node: NodeModel,
    webhook: WebhookWithRelations,
    webhook_id: str,
    event_type: str,
    payload: dict,
) -> None:
    """Execute a webhook-triggered node."""
    logger.debug(f"Webhook-attached node: {node}")
    if not node.is_triggered_by_event_type(event_type):
        logger.debug(f"Node #{node.id} doesn't trigger on event {event_type}")
        return

View on GitHub (pinned to 9c8bb5550f)

Solutions

  1. Verify the URL registered at the provider (webhook.url) is publicly reachable — use a tunnel (ngrok/cloudflared) in local dev and set the correct public base URL when registering.
  2. Check backend logs for a concurrent signature-verification failure or 404 on ingress: the ping may be arriving but being rejected, which also times out the wait.
  3. Confirm the provider actually supports/queues pings — some managers raise NotImplementedError and the endpoint returns False instead; a 504 means the trigger was sent but no event came back.
  4. Retry once after verifying reachability; if delivery consistently exceeds 10s, test the round trip manually by POSTing a signed event to the ingress URL.

Example fix

# before: registering webhook with loopback URL (provider can't deliver back)
POST /integrations/github/webhooks {"address": "http://localhost:8000/..."}

# after: expose ingress publicly first
ngrok http 8000   # then register with the https URL it prints
Defensive patterns

Strategy: retry

Validate before calling

# Pre-flight: confirm the registered URL is publicly reachable
wh = await get_webhook_by_id(webhook_id)
probe = await client.head(wh["url"])   # from outside the network
assert probe.status_code < 500, "ingress URL not reachable — ping will time out"

Try / catch

try:
    ok = await client.post(f"/integrations/webhooks/{webhook_id}/ping")
    ok = ok.json()
except (httpx.TimeoutException, httpx.HTTPStatusError):
    ok = False
if not ok:  # endpoint returns false (no ping support) or 504 (timeout)
    verify_public_url(webhook_id)  # then retry once — delivery may just be slow

Prevention

When it happens

Trigger: The provider accepted the ping API call but delivery back to AutoGPT exceeds 10s (slow provider, network egress restrictions); the ingress URL registered at the provider is unreachable (localhost URLs in dev, missing public hostname); the webhook secret/URL at the provider is stale so delivery fails; providers that queue pings asynchronously (delivery later than the timeout).

Common situations: Local development behind NAT — the provider cannot reach your ingress URL; docker-compose deployments without a public tunnel (ngrok etc.); provider-side delivery backlogs; ping delivered but rejected by signature verification so it never counts as an event.

Understand the failure class

Related errors


AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14). Data as JSON: /api/errors/24c4d712ba9cfb52. Report an issue: GitHub.