phacility/phabricator · error · PhabricatorWorkerPermanentFailureException
Associated hook ("%s") for webhook request ("%s") has invali
Error message
Associated hook ("%s") for webhook request ("%s") has invalid fetch URI: %s What it means
The hook's URI must pass PhabricatorEnv::requireValidRemoteURIForFetch(): protocol must be http or https, the domain must be present and DNS-resolvable, and no resolved address may sit on the outbound blacklist (loopback, link-local, and other internal ranges) unless allowlisted. On failure the request is marked ERROR_URI and the task permanently fails, embedding the underlying reason from the caught exception.
Source
Thrown at src/applications/herald/worker/HeraldWebhookWorker.php:72
'Associated hook ("%s") for webhook request ("%s") is disabled.',
$hook->getPHID(),
$request_phid));
}
$uri = $hook->getWebhookURI();
try {
PhabricatorEnv::requireValidRemoteURIForFetch(
$uri,
array(
'http',
'https',
));
} catch (Exception $ex) {
$this->failRequest(
$request,
HeraldWebhookRequest::ERRORTYPE_HOOK,
HeraldWebhookRequest::ERROR_URI);
throw new PhabricatorWorkerPermanentFailureException(
pht(
'Associated hook ("%s") for webhook request ("%s") has invalid '.
'fetch URI: %s',
$hook->getPHID(),
$request_phid,
$ex->getMessage()));
}
$object_phid = $request->getObjectPHID();
$object = id(new PhabricatorObjectQuery())
->setViewer($viewer)
->withPHIDs(array($object_phid))
->executeOne();
if (!$object) {
$this->failRequest(
$request,
HeraldWebhookRequest::ERRORTYPE_HOOK,View on GitHub (pinned to 5720a38cfe)
Solutions
- Read the embedded reason (%s from the exception) -- it names the exact failed check (protocol, unresolvable domain, or blacklisted address).
- Point the hook at a resolvable, non-blacklisted https endpoint reachable from the Phabricator host.
- If the target must be an internal address, allowlist the exact URI by setting 'phabricator.allowed-uris' (checked inside requireValidRemoteURIForFetch) and re-test.
- Fix DNS resolution on the Phabricator host if the domain fails to resolve there.
Defensive patterns
Strategy: validation
Validate before calling
// Validate the hook URI exactly as the worker will, before saving/queueing:
try {
PhabricatorEnv::requireValidRemoteURIForFetch(
$uri,
array('http', 'https'));
} catch (Exception $ex) {
$errors[] = $ex->getMessage(); // show to the admin at edit time
} Prevention
- Validate webhook URIs with requireValidRemoteURIForFetch() in the hook edit form, not just at delivery time.
- Remember the check is SSRF-aware: loopback/link-local/private targets are rejected unless allowlisted via phabricator.allowed-uris.
- Test DNS resolution from the Phabricator host, since gethostbynamel() runs there.
When it happens
Trigger: Webhook URI set to something like http://localhost:9000/hooks, https://10.0.0.5/hook, a domain that resolves to 127.0.0.1, or a non-http(s) scheme; DNS for the target domain not resolvable from the Phabricator host.
Common situations: Pointing webhooks at internal/dev endpoints on the same network or host (blocked as SSRF protection); containerized installs where DNS differs from the operator's machine; scheme typos like 'htt://' or 'ftp://'.
Related errors
- Specify a webhook to call with "--id".
- Specified "--count" must be larger than 0.
- Unable to load specified webhook ("%s").
- Unable to load specified object ("%s").
- Unable to load webhook request ("%s"). It may have been garb
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/769b179dba863025.
Report an issue: GitHub.