{"record":{"id":"180026864f89f1f2","repo":"nodejs/node","slug":"could-not-open-dump-s","errorCode":null,"errorMessage":"Could not open dump '%s'","messagePattern":"Could not open dump '(.+?)'","errorType":"validation","errorClass":"WebParameterError","httpStatus":null,"severity":"warning","filePath":"deps/v8/tools/grokdump.py","lineNumber":3715,"sourceCode":"    descfile = open(fname, \"w\")\n    descfile.write(description)\n    descfile.close()\n    return True\n\n  def get_dump_formatter(self, name):\n    if name is None:\n      return self.default_formatter\n    else:\n      if not DUMP_FILE_RE.match(name):\n        raise WebParameterError(\"Invalid name '%s'\" % name)\n      formatter = self.formatters.get(name, None)\n      if formatter is None:\n        try:\n          formatter = InspectionWebFormatter(\n              self.switches, os.path.join(self.dumppath, name), self)\n          self.formatters[name] = formatter\n        except IOError:\n          raise WebParameterError(\"Could not open dump '%s'\" % name)\n      return formatter\n\n  def output_dumps(self, f):\n    f.write(WEB_DUMPS_HEADER)\n    f.write(\"<h3>List of available dumps</h3>\")\n    f.write(\"<table class=\\\"dumplist\\\">\\n\")\n    f.write(\"<thead><tr>\")\n    f.write(\"<th>Name</th>\")\n    f.write(\"<th>File time</th>\")\n    f.write(\"<th>Comment</th>\")\n    f.write(\"</tr></thead>\")\n    dumps_by_time = {}\n    for fname in os.listdir(self.dumppath):\n      if DUMP_FILE_RE.match(fname):\n        mtime = os.stat(os.path.join(self.dumppath, fname)).st_mtime\n        fnames = dumps_by_time.get(mtime, [])\n        fnames.append(fname)\n        dumps_by_time[mtime] = fnames","sourceCodeStart":3697,"sourceCodeEnd":3733,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/deps/v8/tools/grokdump.py#L3697-L3733","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Confirm the .dmp file actually exists under the server's dumppath directory (`ls <dumppath>/<name>`).","Check file permissions — the web server process must have read access to the .dmp.","Restart the web UI so the dumps list refreshes, then select only currently-available dumps."],"exampleFix":"// before\n  ?name=old-run.dmp   // 400 Could not open dump 'old-run.dmp' (deleted)\n// after\n  ?name=current.dmp   // exists in dumppath and is readable","handlingStrategy":"validation","validationCode":"import os\nfull = os.path.join(dumppath, name)\nif not os.path.isfile(full) or not os.access(full, os.R_OK):\n    return f\"dump '{name}' missing or unreadable under {dumppath}\", 400","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Before opening, list available dumps from the UI and only request those currently present.","Ensure the web server process has read permission on the .dmp directory and files.","Restart the UI after dump rotation to refresh the listing."],"tags":["web","file-io","grokdump","permissions"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}