SeleniumHQ/selenium · error · ValueError

No v8_revision found in DEPS for Chrome {chrome_milestone['v

Error message

No v8_revision found in DEPS for Chrome {chrome_milestone['version']}

What it means

Raised by add_pdls() in scripts/update_cdp.py when the Chromium DEPS file at the target Chrome version does not contain a line with 'v8_revision'. The function downloads DEPS from raw.githubusercontent.com/chromium/chromium/{version}/DEPS, searches for the first line containing 'v8_revision', and parses the V8 git revision from it to fetch js_protocol.pdl from the v8/v8 repo. If no such line exists, the DEPS format has changed.

Source

Thrown at scripts/update_cdp.py:113

    if not target_dir.is_dir() or not any(target_dir.iterdir()):
        os.makedirs(target_dir, exist_ok=True)
        if os.path.isdir(source_dir):
            shutil.copytree(source_dir, target_dir, dirs_exist_ok=True)

        fetch_and_save(
            f"https://raw.githubusercontent.com/chromium/chromium/{chrome_milestone['version']}/third_party/blink/public/devtools_protocol/browser_protocol.pdl",
            f"{target_dir}/browser_protocol.pdl",
        )

        flatten_browser_pdl(f"{target_dir}/browser_protocol.pdl", chrome_milestone["version"])

        deps_content = http.request(
            "GET",
            f"https://raw.githubusercontent.com/chromium/chromium/{chrome_milestone['version']}/DEPS",
        ).data.decode("utf-8")
        v8_revision_line = next((line for line in deps_content.split("\n") if "v8_revision" in line), None)
        if v8_revision_line is None:
            raise ValueError(f"No v8_revision found in DEPS for Chrome {chrome_milestone['version']}")
        v8_revision = v8_revision_line.split(": ")[1].strip("',")
        fetch_and_save(
            f"https://raw.githubusercontent.com/v8/v8/{v8_revision}/include/js_protocol.pdl",
            f"{target_dir}/js_protocol.pdl",
        )

        # javadocs does not like script tags
        with open(f"{target_dir}/browser_protocol.pdl", "r+") as file:
            script_replace = file.read().replace("`<script>`", "`script`")
            file.seek(0)
            file.write(script_replace)
            file.truncate()


def create_new_chrome_files(src_base, chrome_milestone):
    """Create new Chrome devtools files for a language binding.

    Java and .NET need to copy previous version directory into new version

View on GitHub (pinned to aa36b38e69)

Solutions

  1. Manually inspect the DEPS file at the target Chrome version (curl the raw URL) to find how V8 is now referenced.
  2. Update the search string and parsing logic in add_pdls() to match the new DEPS format.
  3. If the variable was renamed, update the next() filter and the split logic accordingly.
  4. Verify the DEPS file was fully downloaded (check for truncation).

Example fix

// before
v8_revision_line = next((line for line in deps_content.split('\n') if 'v8_revision' in line), None)
// after (hypothetical, if Chromium renamed the variable)
v8_revision_line = next((line for line in deps_content.split('\n') if 'v8_revision' in line or 'v8_branch' in line), None)
Defensive patterns

Strategy: validation

Validate before calling

import urllib3
http = urllib3.PoolManager()
deps_content = http.request('GET', f'https://raw.githubusercontent.com/chromium/chromium/{version}/DEPS').data.decode('utf-8')
if 'v8_revision' not in deps_content:
    print('WARNING: v8_revision not found in DEPS; DEPS format may have changed')

Type guard

null

Try / catch

try:
    v8_revision_line = next(line for line in deps_content.split('\n') if 'v8_revision' in line)
except StopIteration:
    print('v8_revision not found in DEPS — Chromium may have changed its format')

Prevention

When it happens

Trigger: Running update_cdp.py for a Chrome version where the DEPS file no longer contains a 'v8_revision' entry: Chromium changed how V8 is pinned (e.g., switched to a different variable name, moved V8 dependency metadata, or restructured DEPS format), or the DEPS file was fetched incorrectly (partial/truncated response).

Common situations: Chromium DEPS format evolution — the variable was renamed (e.g., 'v8_revision' to 'v8_branch' or similar); the DEPS parsing logic (split on ': ') no longer matches the format; a new Chromium version changed its dependency management approach; the DEPS file download was truncated and the v8_revision line was cut off.

Related errors


AI-assisted analysis of SeleniumHQ/selenium@aa36b38e69 (2026-08-14). Data as JSON: /api/errors/8f48e0351dc50a8b. Report an issue: GitHub.