nodejs/node · error · MBErr
args file "%s" not found
Error message
args file "%s" not found
What it means
In mb.py Lookup()/ConfigFromArgs(), when the resolved config string starts with '//' it is treated as a GN-style path to an args file (relative to src). mb checks self.Exists(self.ToAbsPath(config)); if that file is absent it raises MBErr('args file "%s" not found'). This is the //path/to/args.gn form of -c.
Source
Thrown at deps/v8/tools/mb/mb.py:533
if self.Exists(gn_args_path):
args_contents = self.ReadFile(gn_args_path)
gn_args = []
for l in args_contents.splitlines():
fields = l.split(' ')
name = fields[0]
val = ' '.join(fields[2:])
gn_args.append('%s=%s' % (name, val))
return ' '.join(gn_args)
def Lookup(self):
vals = self.ReadIOSBotConfig()
if not vals:
self.ReadConfigFile()
config = self.ConfigFromArgs()
if config.startswith('//'):
if not self.Exists(self.ToAbsPath(config)):
raise MBErr('args file "%s" not found' % config)
vals = self.DefaultVals()
vals['args_file'] = config
else:
if not config in self.configs:
raise MBErr('Config "%s" not found in %s' %
(config, self.args.config_file))
vals = self.FlattenConfig(config)
return vals
def ReadIOSBotConfig(self):
if not self.args.builder_group or not self.args.builder:
return {}
path = self.PathJoin(self.chromium_src_dir, 'ios', 'build', 'bots',
self.args.builder_group, self.args.builder + '.json')
if not self.Exists(path):
return {}
contents = json.loads(self.ReadFile(path))View on GitHub (pinned to 1b2de5e052)
Solutions
- Verify the // path resolves to a real file: `ls <src-root>/<path-without-//>`.
- Correct the typo in the -c argument or commit/restore the missing args file.
- Confirm you are running mb from the intended source root (chromium_src_dir / V8 root).
Example fix
// before mb.py gen -c //build/arg/my.gn out/Default // typo 'arg' // after mb.py gen -c //build/args/my.gn out/Default // matches actual file
Defensive patterns
Strategy: validation
Validate before calling
if config.startswith('//'):
abs_path = os.path.join(src_root, config[2:].replace('/', os.sep))
if not os.path.isfile(abs_path):
sys.exit(f'args file not found: {abs_path}') Type guard
null
Try / catch
null
Prevention
- Resolve // paths against the source root and ls-check them before invoking mb.
- Keep args files under version control so they aren't silently missing.
- Prefer named configs (-c <name>) over raw // paths when possible to get clearer errors.
When it happens
Trigger: Running `mb.py gen -c //build/args/my.gn` (or lookup/analyze) where the // path does not resolve to an existing file under the source root. The ToAbsPath + Exists check fails.
Common situations: Typo in the // path; the args file was deleted or never committed; running mb from a checkout where the referenced build config lives on a different branch; wrong src root.
Related errors
- mb config file %s has problems:
- Config "%s" not found in %s
- config file not found at %s
- Failed to parse config file "%s": %s
- unrecognized platform string "%s"
AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13).
Data as JSON: /api/errors/e81044d36a7eaef1.
Report an issue: GitHub.