SeleniumHQ/selenium · error · ValueError
Fetch failed (HTTP {response.status}): {url}
Error message
Fetch failed (HTTP {response.status}): {url} What it means
Raised by fetch_and_save() in scripts/update_cdp.py when an HTTP GET to a URL returns non-200. This function downloads Chrome DevTools Protocol (CDP) .pdl files and saves them to disk. It is called from add_pdls() to download browser_protocol.pdl and js_protocol.pdl from the chromium/chromium and v8/v8 repositories on GitHub.
Source
Thrown at scripts/update_cdp.py:48
"https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions.json",
)
milestone = json.loads(r.data)["channels"][channel]["version"].split(".")[0]
r = http.request(
"GET",
"https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json",
)
versions = json.loads(r.data)["versions"]
return sorted(
filter(lambda v: v["version"].split(".")[0] == str(milestone), versions),
key=lambda v: parse(v["version"]),
)[-1]
def fetch_and_save(url, file_path):
response = http.request("GET", url)
if response.status != 200:
raise ValueError(f"Fetch failed (HTTP {response.status}): {url}")
with open(file_path, "wb") as file:
file.write(response.data)
def new_chrome(chrome_milestone):
return chrome_milestone["version"].split(".")[0]
def previous_chrome(chrome_milestone):
return str(int(new_chrome(chrome_milestone)) - 1)
def old_chrome(chrome_milestone):
return str(int(new_chrome(chrome_milestone)) - 3)
def flatten_browser_pdl(file_path, chrome_version):
"""Preserves the version block and concatenates all included domain .pdl files."""View on GitHub (pinned to aa36b38e69)
Solutions
- Retry the script — raw.githubusercontent.com failures are often transient.
- Verify the specific URL from the error message is accessible (curl -I).
- Check if the Chromium devtools protocol directory structure changed and update the URL pattern in update_cdp.py if so.
- Manually verify the Chrome version tag exists in the chromium/chromium repo.
Example fix
null
Defensive patterns
Strategy: retry
Validate before calling
import urllib3
http = urllib3.PoolManager()
r = http.request('HEAD', url)
if r.status != 200:
print(f'CDP file not available at {url}, deferring update_cdp') Type guard
null
Try / catch
try:
fetch_and_save(url, file_path)
except ValueError as e:
print(f'Failed to fetch CDP file: {e}')
# retry or report Prevention
- Verify the Chrome version tag exists in the chromium/chromium repo before running update_cdp.py.
- Retry on transient raw.githubusercontent.com failures.
- Check if the .pdl file paths changed in the Chromium repo.
When it happens
Trigger: Running update_cdp.py when a CDP .pdl file URL returns non-200: the file was moved/renamed in the Chromium repo (404), the Chrome version tag does not exist, GitHub raw content is temporarily unavailable, or network issues. The URLs point to raw.githubusercontent.com/chromium/chromium/{version}/...
Common situations: Chromium repo reorganization moving .pdl files; the Chrome version string in the JSON does not correspond to a valid git tag; transient GitHub CDN failure; network proxy blocking raw.githubusercontent.com; the v8_revision in DEPS points to a commit where js_protocol.pdl was at a different path.
Related errors
- Download unavailable (HTTP {r.status}): {url}
- Failed to download {url}: HTTP {r.status}
- No v8_revision found in DEPS for Chrome {chrome_milestone['v
- Failed to list {CDDL_PATH} at {commit}: HTTP {r.status}
- Failed to resolve {repo}@{branch}: HTTP {r.status}
AI-assisted analysis of SeleniumHQ/selenium@aa36b38e69 (2026-08-14).
Data as JSON: /api/errors/ad669762a64952a9.
Report an issue: GitHub.