nodejs/node · error · MBErr

Config "%s" not found in %s

Error message

Config "%s" not found in %s

What it means

When the -c config value is NOT a // path (it's a named config), mb.py checks `config in self.configs`. The configs dict is loaded from mb_config.pyl. If the named config is absent, it raises MBErr('Config "%s" not found in %s') naming the config and the config file path.

Source

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

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

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

View on GitHub (pinned to 1b2de5e052)

Solutions

  1. List available configs: `mb.py list -f <mb_config.pyl>` or grep the `configs = {` block in the file, then use the exact name.
  2. If using a custom config file, pass `-f <path>` so the right configs are loaded.
  3. Add the missing config to mb_config.pyl (composed from mixins) if it should exist.

Example fix

// before
  mb.py gen -c x64_rel out/Default      // name not in configs
// after
  mb.py gen -c x64.release out/Default   // exact key from mb_config.pyl
Defensive patterns

Strategy: validation

Validate before calling

configs = ast.literal_eval(open(mb_config_path).read())['configs']
if not config.startswith('//') and config not in configs:
    sys.exit(f'Config {config!r} not in {mb_config_path}; available: {sorted(configs)[:10]}...')

Type guard

null

Try / catch

null

Prevention

When it happens

Trigger: Running `mb.py gen -c X64.release.debug out/Default` where 'X64.release.debug' is not a key in the configs section of mb_config.pyl. The membership test fails and MBErr is raised.

Common situations: Misspelled config name; using a config that exists only on another branch; referencing a config that was renamed/removed; forgetting to pass -f to point at a custom mb_config.pyl that defines it.

Related errors


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