nodejs/node · warning · WebParameterError

Could not open dump '%s'

Error message

Could not open dump '%s'

What it means

After a dump name passes the DUMP_FILE_RE format check, grokdump.py's get_dump_formatter() constructs an InspectionWebFormatter for it (opening os.path.join(dumppath, name)). If that file cannot be opened, Python raises IOError, which is caught and re-raised as WebParameterError("Could not open dump '%s'"). So the name was well-formed but the file is missing or unreadable on disk.

Source

Thrown at deps/v8/tools/grokdump.py:3715

    descfile = open(fname, "w")
    descfile.write(description)
    descfile.close()
    return True

  def get_dump_formatter(self, name):
    if name is None:
      return self.default_formatter
    else:
      if not DUMP_FILE_RE.match(name):
        raise WebParameterError("Invalid name '%s'" % name)
      formatter = self.formatters.get(name, None)
      if formatter is None:
        try:
          formatter = InspectionWebFormatter(
              self.switches, os.path.join(self.dumppath, name), self)
          self.formatters[name] = formatter
        except IOError:
          raise WebParameterError("Could not open dump '%s'" % name)
      return formatter

  def output_dumps(self, f):
    f.write(WEB_DUMPS_HEADER)
    f.write("<h3>List of available dumps</h3>")
    f.write("<table class=\"dumplist\">\n")
    f.write("<thead><tr>")
    f.write("<th>Name</th>")
    f.write("<th>File time</th>")
    f.write("<th>Comment</th>")
    f.write("</tr></thead>")
    dumps_by_time = {}
    for fname in os.listdir(self.dumppath):
      if DUMP_FILE_RE.match(fname):
        mtime = os.stat(os.path.join(self.dumppath, fname)).st_mtime
        fnames = dumps_by_time.get(mtime, [])
        fnames.append(fname)
        dumps_by_time[mtime] = fnames

View on GitHub (pinned to 1b2de5e052)

Solutions

  1. Confirm the .dmp file actually exists under the server's dumppath directory (`ls <dumppath>/<name>`).
  2. Check file permissions — the web server process must have read access to the .dmp.
  3. Restart the web UI so the dumps list refreshes, then select only currently-available dumps.

Example fix

// before
  ?name=old-run.dmp   // 400 Could not open dump 'old-run.dmp' (deleted)
// after
  ?name=current.dmp   // exists in dumppath and is readable
Defensive patterns

Strategy: validation

Validate before calling

import os
full = os.path.join(dumppath, name)
if not os.path.isfile(full) or not os.access(full, os.R_OK):
    return f"dump '{name}' missing or unreadable under {dumppath}", 400

Type guard

null

Try / catch

null

Prevention

When it happens

Trigger: An HTTP request names a `.dmp` file that is not present in the configured dumppath directory, or is present but unreadable due to permissions. The open() inside InspectionWebFormatter raises IOError.

Common situations: Listing/selecting a dump that was deleted between list and open; running the web server as a user without read permission on the .dmp; pointing dumppath at the wrong directory; a stale UI link to a rotated-out dump.

Related errors


AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13). Data as JSON: /api/errors/180026864f89f1f2. Report an issue: GitHub.