{"record":{"id":"56276fa6c22d4e3b","repo":"hyperledger/fabric","slug":"external-builder-at-path-s-has-no-name-attribute","errorCode":null,"errorMessage":"external builder at path %s has no name attribute","messagePattern":"external builder at path (.+?) has no name attribute","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/peer/config.go","lineNumber":307,"sourceCode":"\tif c.VMNetworkMode == \"\" {\n\t\tc.VMNetworkMode = \"host\"\n\t}\n\n\tc.ChaincodePull = viper.GetBool(\"chaincode.pull\")\n\tvar externalBuilders []ExternalBuilder\n\n\terr = viper.UnmarshalKey(\"chaincode.externalBuilders\", &externalBuilders, viper.DecodeHook(viperutil.YamlStringToStructHook(externalBuilders)))\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tc.ExternalBuilders = externalBuilders\n\tfor builderIndex, builder := range c.ExternalBuilders {\n\t\tif builder.Path == \"\" {\n\t\t\treturn errors.New(\"invalid external builder configuration, path attribute missing in one or more builders\")\n\t\t}\n\t\tif builder.Name == \"\" {\n\t\t\treturn fmt.Errorf(\"external builder at path %s has no name attribute\", builder.Path)\n\t\t}\n\t\tif builder.Environment != nil && len(builder.PropagateEnvironment) == 0 {\n\t\t\tc.ExternalBuilders[builderIndex].PropagateEnvironment = builder.Environment\n\t\t}\n\t}\n\n\tc.OperationsListenAddress = viper.GetString(\"operations.listenAddress\")\n\tc.OperationsTLSEnabled = viper.GetBool(\"operations.tls.enabled\")\n\tc.OperationsTLSCertFile = config.GetPath(\"operations.tls.cert.file\")\n\tc.OperationsTLSKeyFile = config.GetPath(\"operations.tls.key.file\")\n\tc.OperationsTLSClientAuthRequired = viper.GetBool(\"operations.tls.clientAuthRequired\")\n\n\tfor _, rca := range viper.GetStringSlice(\"operations.tls.clientRootCAs.files\") {\n\t\tc.OperationsTLSClientRootCAs = append(c.OperationsTLSClientRootCAs, config.TranslatePath(configDir, rca))\n\t}\n\n\tc.MetricsProvider = viper.GetString(\"metrics.provider\")\n\tc.StatsdNetwork = viper.GetString(\"metrics.statsd.network\")","sourceCodeStart":289,"sourceCodeEnd":325,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/core/peer/config.go#L289-L325","documentation":"Peer config load requires each externalBuilders entry to have a non-empty name; when a builder has a valid path but no name attribute, load() fails with this message that includes the offending path. The name is the builder identifier recorded in the chaincode package, so it cannot be blank. This is a startup-time YAML validation error.","triggerScenarios":"A core.yaml externalBuilders entry with path set but the name key missing or empty; a builder stanza whose name is provided only via an env-expanded variable that resolves to empty.","commonSituations":"Writing a builder entry by hand and omitting the name line; template rendering producing an empty name; copy/paste errors where the name was accidentally deleted; YAML indentation mistakes that push the name key into the wrong mapping.","solutions":["Add the name attribute to the builder entry whose path is named in the error, e.g. name: ccaas-builder, and restart the peer.","Check YAML indentation so name sits in the same list item mapping as path.","If name comes from a template value, fix the variable so it resolves to a non-empty identifier.","Remove the broken builder entry if the builder is not used."],"exampleFix":"# before\nexternalBuilders:\n  - path: /builders/ccaas_builder\n# after\nexternalBuilders:\n  - name: ccaas-builder\n    path: /builders/ccaas_builder","handlingStrategy":"validation","validationCode":"var cfg struct {\n    ExternalBuilders []struct {\n        Name string `yaml:\"name\"`\n        Path string `yaml:\"path\"`\n    } `yaml:\"externalBuilders\"`\n}\nif err := yaml.Unmarshal(coreYAML, &cfg); err != nil { return err }\nfor i, b := range cfg.ExternalBuilders {\n    if b.Name == \"\" {\n        return fmt.Errorf(\"externalBuilders[%d] at %s missing name\", i, b.Path)\n    }\n}","typeGuard":null,"tryCatchPattern":"if err := peer.Config(); err != nil {\n    if strings.Contains(err.Error(), \"has no name attribute\") {\n        return fmt.Errorf(\"add name to the builder at the reported path: %w\", err)\n    }\n    return err\n}","preventionTips":["Keep name as the first key of every externalBuilders entry for consistency.","Check YAML indentation when copying builder stanzas.","Render and validate config templates to ensure name variables never resolve empty."],"tags":["config","yaml","fabric","external-builder","startup"],"backgroundTag":"missing-config-field","analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}