{"record":{"id":"bc2d40a2b8f223d3","repo":"nodejs/node","slug":"unrecognized-platform-string-s","errorCode":null,"errorMessage":"unrecognized platform string \"%s\"","messagePattern":"unrecognized platform string \"(.+?)\"","errorType":"exception","errorClass":"MBErr","httpStatus":null,"severity":"error","filePath":"deps/v8/tools/mb/mb.py","lineNumber":404,"sourceCode":"      ]\n    if self.args.extra_args:\n      cmd += ['--'] + self.args.extra_args\n    ret, _, _ = self.Run(cmd, force_verbose=True, buffer_output=False)\n    return ret\n\n  def _DefaultDimensions(self):\n    if not self.args.default_dimensions:\n      return []\n\n    # This code is naive and just picks reasonable defaults per platform.\n    if self.platform == 'darwin':\n      os_dim = ('os', 'Mac-10.12')\n    elif self.platform.startswith('linux'):\n      os_dim = ('os', 'Ubuntu-16.04')\n    elif self.platform == 'win32':\n      os_dim = ('os', 'Windows-10')\n    else:\n      raise MBErr('unrecognized platform string \"%s\"' % self.platform)\n\n    return [('pool', 'Chrome'),\n            ('cpu', 'x86-64'),\n            os_dim]\n\n  def CmdBuildbucket(self):\n    self.ReadConfigFile()\n\n    self.Print('# This file was generated using '\n               '\"tools/mb/mb.py gerrit-buildbucket-config\".')\n\n    for luci_tryserver in sorted(self.luci_tryservers):\n      self.Print('[bucket \"luci.%s\"]' % luci_tryserver)\n      for bot in sorted(self.luci_tryservers[luci_tryserver]):\n        self.Print('\\tbuilder = %s' % bot)\n\n    for builder_group in sorted(self.builder_groups):\n      if builder_group.startswith('tryserver.'):","sourceCodeStart":386,"sourceCodeEnd":422,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/deps/v8/tools/mb/mb.py#L386-L422","documentation":"mb.py's _DefaultDimensions() computes Swarming/bot dimensions for buildbucket configs. It only recognizes sys.platform values 'darwin', anything starting with 'linux', and 'win32'. Any other platform string (e.g. 'cygwin', 'aix', 'win-amd64 variants) raises MBErr('unrecognized platform string \"%s\"'). This only fires when default_dimensions are being emitted (CmdBuildbucket path).","triggerScenarios":"Running `mb.py buildbucket-config` (or any path invoking _DefaultDimensions) on a host where sys.platform is not darwin/linux*/win32. The chain of elif checks falls through to the unconditional raise.","commonSituations":"Running mb under Cygwin/MSYS (sys.platform='cygwin'); on AIX/Solaris; or with a Python build reporting an unusual platform string. Most common is Windows users under a non-win32 Python interpreter.","solutions":["Run mb.py under the native Python for your OS (CPython on Windows reports 'win32', on Linux reports 'linux*').","If on Cygwin/MSYS, use a native Windows or WSL Python instead.","Extend _DefaultDimensions() with an elif branch for your platform string returning the correct ('os', <dim>) tuple before the raise."],"exampleFix":"// before\n    else:\n      raise MBErr('unrecognized platform string \"%s\"' % self.platform)\n// after\n    elif self.platform == 'win32' or self.platform == 'cygwin':\n      os_dim = ('os', 'Windows-10')\n    else:\n      raise MBErr('unrecognized platform string \"%s\"' % self.platform)","handlingStrategy":"validation","validationCode":"import sys\n_supported = {'darwin'} | {p for p in ('linux', 'linux2') if p.startswith('linux')} | {'win32'}\nif sys.platform not in _supported and args.default_dimensions:\n    sys.exit(f'mb default-dimensions unsupported on sys.platform={sys.platform!r}')","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Run mb.py with the native CPython for the OS (win32 on Windows, linux* on Linux).","Avoid Cygwin/MSYS Python for buildbucket-config generation; use WSL or native.","If supporting a new platform, extend _DefaultDimensions() with a real ('os', <dim>) branch."],"tags":["mb","platform","swarming","buildbucket","v8-build"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}