{"record":{"id":"f114f2ac02cd005a","repo":"hyperledger/fabric","slug":"missing-value-at-path-s","errorCode":null,"errorMessage":"missing value at path: %s","messagePattern":"missing value at path: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/configtx/configmap.go","lineNumber":138,"sourceCode":"\t\treturn nil, errors.Errorf(\"ConfigGroup not found at group path: %s\", groupPath)\n\t}\n\n\tnewConfigGroup := protoutil.NewConfigGroup()\n\tproto.Merge(newConfigGroup, group.ConfigGroup)\n\n\tfor key := range group.Groups {\n\t\tupdatedGroup, err := recurseConfigMap(path+pathSeparator+key, configMap)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tnewConfigGroup.Groups[key] = updatedGroup\n\t}\n\n\tfor key := range group.Values {\n\t\tvaluePath := valuePrefix + path + pathSeparator + key\n\t\tvalue, ok := configMap[valuePath]\n\t\tif !ok {\n\t\t\treturn nil, errors.Errorf(\"missing value at path: %s\", valuePath)\n\t\t}\n\t\tif value.ConfigValue == nil {\n\t\t\treturn nil, errors.Errorf(\"ConfigValue not found at value path: %s\", valuePath)\n\t\t}\n\t\tnewConfigGroup.Values[key] = proto.Clone(value.ConfigValue).(*cb.ConfigValue)\n\t}\n\n\tfor key := range group.Policies {\n\t\tpolicyPath := policyPrefix + path + pathSeparator + key\n\t\tpolicy, ok := configMap[policyPath]\n\t\tif !ok {\n\t\t\treturn nil, errors.Errorf(\"missing policy at path: %s\", policyPath)\n\t\t}\n\t\tif policy.ConfigPolicy == nil {\n\t\t\treturn nil, errors.Errorf(\"ConfigPolicy not found at policy path: %s\", policyPath)\n\t\t}\n\t\tnewConfigGroup.Policies[key] = proto.Clone(policy.ConfigPolicy).(*cb.ConfigPolicy)\n\t\tlogger.Debugf(\"Setting policy for key %s to %+v\", key, group.Policies[key])","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/common/configtx/configmap.go#L120-L156","documentation":"For each value declared in a group's Values map, recurseConfigMap requires a corresponding 'values/<path>/<key>' entry in the flattened configMap. This error means a value key exists in the group's Values metadata but its entry is missing from the map. Like the group-path errors, it signals an incomplete or inconsistently built configMap.","triggerScenarios":"recurseConfigMap looking up valuePath = valuePrefix + path + '/' + key for every key in group.Values when the entry is absent — the group's Values map lists the value but the map builder skipped it.","commonSituations":"Partially copied/hand-built config maps; a map generated from a different (older/newer) group than the one being walked, so value keys diverge; concurrent modification removing entries mid-walk.","solutions":["Rebuild the configMap with configtx.NewComparableConfig(group) so every declared value has a map entry.","Compare group.Values keys against the map's 'values/...' keys for the reported path and add the missing one.","Ensure the root group passed to configMapToConfig matches the one the map was derived from.","Remove concurrent writers or snapshot the map before conversion."],"exampleFix":"// before\nconfigMap[\"values/Consortium\"] = comparable{ConfigValue: consortiumVal}\n// group also declares BatchSize but map lacks values/Orderer/values/BatchSize\n// after\nconfigMap := NewComparableConfig(ordererGroup) // all values included","handlingStrategy":"validation","validationCode":"func allValuesPresent(group *cb.ConfigGroup, configMap map[string]configtx.Comparable, path string) error {\n\tfor key := range group.Values {\n\t\tif _, ok := configMap[\"values/\"+path+\"/\"+key]; !ok {\n\t\t\treturn fmt.Errorf(\"value %q missing at %s\", key, path)\n\t\t}\n\t}\n\treturn nil\n}","typeGuard":null,"tryCatchPattern":"// errors are returned, not panicked\nconfig, err := configtx.ConfigMapToConfig(configMap)\nif err != nil {\n\treturn fmt.Errorf(\"value walk failed: %w\", err)\n}","preventionTips":["Derive the map from the exact same group tree you convert back","Use configtx.NewComparableConfig so every declared value gets an entry","Version-check configs before round-tripping so key sets don't diverge","Snapshot maps before concurrent conversion"],"tags":["hyperledger-fabric","configtx","config-values"],"backgroundTag":"missing-config-value-path","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"}