{"record":{"id":"2c19b3359eda1ea0","repo":"hyperledger/fabric","slug":"configvalue-not-found-at-value-path-s","errorCode":null,"errorMessage":"ConfigValue not found at value path: %s","messagePattern":"ConfigValue not found at value path: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/configtx/configmap.go","lineNumber":141,"sourceCode":"\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])\n\t}\n\n\t// This is a really very hacky fix to facilitate upgrading channels which were constructed","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/common/configtx/configmap.go#L123-L159","documentation":"When a 'values/<path>/<key>' entry is found, its comparable must wrap a real cb.ConfigValue. This error means the entry exists under a value path but comparable.ConfigValue is nil — the wrong union member (or an empty comparable) was stored at that key. It is thrown immediately before cloning the value into the reconstructed ConfigGroup.","triggerScenarios":"recurseConfigMap finding a configMap entry at the computed valuePath whose ConfigValue field is nil — e.g. a ConfigGroup or ConfigPolicy stored under a 'values/...' key, or a zero-value comparable placeholder.","commonSituations":"Prefix/kind mismatches when constructing the map manually; code that inserts comparables without setting the payload; shared map building utilities reused across kinds with wrong arguments.","solutions":["Store comparable{ConfigValue: ...} for every 'values/...' key in the map.","Prefer configtx.NewComparableConfig over manual map construction to keep kinds and prefixes aligned.","Audit any helper that builds comparables and assert the payload kind matches the key prefix.","Dump the comparable at the reported path to identify which wrong member was set."],"exampleFix":"// before\nconfigMap[\"values/Orderer/values/BatchSize\"] = comparable{ConfigPolicy: policy}\n// after\nconfigMap[\"values/Orderer/values/BatchSize\"] = comparable{ConfigValue: batchSizeValue}","handlingStrategy":"validation","validationCode":"func valueEntryIsValue(configMap map[string]configtx.Comparable, path, key string) bool {\n\tc, ok := configMap[\"values/\"+path+\"/\"+key]\n\treturn ok && c.ConfigValue != nil\n}","typeGuard":"func asConfigValue(c comparable) (*cb.ConfigValue, bool) {\n\tif c.ConfigValue == nil {\n\t\treturn nil, false\n\t}\n\treturn c.ConfigValue, true\n}","tryCatchPattern":"// errors are returned, not panicked\nconfig, err := configtx.ConfigMapToConfig(configMap)\nif err != nil {\n\treturn fmt.Errorf(\"non-value payload under value path: %w\", err)\n}","preventionTips":["Store ConfigValue payloads under 'values/' keys only","Prefer configtx.NewComparableConfig over manual comparable construction","Assert payload-kind/prefix consistency in unit tests for map builders"],"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"}