nodejs/node · error · MBErr

config file not found at %s

Error message

config file not found at %s

What it means

ReadConfigFile() first checks that the mb_config.pyl path exists via self.Exists(); if not, it raises MBErr('config file not found at %s'). This fires before any parsing, so it is purely a missing-file error for the main MB config (default infra/mb/mb_config.pyl unless -f overrides).

Source

Thrown at deps/v8/tools/mb/mb.py:560

  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))
    gn_args = ' '.join(contents.get('gn_args', []))

    vals = self.DefaultVals()
    vals['gn_args'] = gn_args
    return vals

  def ReadConfigFile(self):
    if not self.Exists(self.args.config_file):
      raise MBErr('config file not found at %s' % self.args.config_file)

    try:
      contents = ast.literal_eval(self.ReadFile(self.args.config_file))
    except SyntaxError as e:
      raise MBErr('Failed to parse config file "%s": %s' %
                 (self.args.config_file, e)) from e

    self.configs = contents['configs']
    self.luci_tryservers = contents.get('luci_tryservers', {})
    self.builder_groups = contents['builder_groups']
    self.mixins = contents['mixins']

  def ReadIsolateMap(self):
    if not self.args.isolate_map_files:
      self.args.isolate_map_files = [self.default_isolate_map]

    for f in self.args.isolate_map_files:
      if not self.Exists(f):

View on GitHub (pinned to 1b2de5e052)

Solutions

  1. Confirm the path: `ls <path>` for the value passed via -f (or infra/mb/mb_config.pyl by default).
  2. Run mb.py from the source root so the default relative path resolves, or pass an absolute -f path.
  3. Restore/regenerate mb_config.pyl via gclient sync if it's missing from the checkout.

Example fix

// before
  mb.py gen -f /wrong/mb_config.pyl ...
// after
  mb.py gen -f infra/mb/mb_config.pyl ...   // or absolute correct path
Defensive patterns

Strategy: validation

Validate before calling

import os
cfg = args.config_file or os.path.join(src_root, 'infra', 'mb', 'mb_config.pyl')
if not os.path.isfile(cfg):
    sys.exit(f'mb config file not found at {cfg}; run from src root or pass -f')

Type guard

null

Try / catch

null

Prevention

When it happens

Trigger: Running any mb.py subcommand when the -f config file path (or the default infra/mb/mb_config.pyl) does not exist on disk. The Exists() guard short-circuits to MBErr.

Common situations: First run before mb_config.pyl is generated; -f pointing at a typo'd or moved path; shallow checkout that excluded infra/; running mb outside the source tree so the relative default path doesn't resolve.

Related errors


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