{"record":{"id":"9dc3b4a00b3b1d50","repo":"hyperledger/fabric","slug":"unknown-type-t-v","errorCode":null,"errorMessage":"Unknown type: %T:%v","messagePattern":"Unknown type: %T:(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/cauthdsl/cauthdsl.go","lineNumber":90,"sourceCode":"\t\t\t\t}\n\t\t\t\tif cauthdslLogger.IsEnabledFor(zapcore.DebugLevel) {\n\t\t\t\t\t// Unlike most places, this is a huge print statement, and worth checking log level before create garbage\n\t\t\t\t\tcauthdslLogger.Debugf(\"%p processing identity %d - %v\", signedData, i, sd.GetIdentifier())\n\t\t\t\t}\n\t\t\t\terr := sd.SatisfiesPrincipal(signedByID)\n\t\t\t\tif err != nil {\n\t\t\t\t\tcauthdslLogger.Debugf(\"%p identity %d does not satisfy principal: %s\", signedData, i, err)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tcauthdslLogger.Debugf(\"%p principal evaluation succeeds for identity %d\", signedData, i)\n\t\t\t\tused[i] = true\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tcauthdslLogger.Debugf(\"%p principal evaluation fails\", signedData)\n\t\t\treturn false\n\t\t}, nil\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"Unknown type: %T:%v\", t, t)\n\t}\n}\n","sourceCodeStart":72,"sourceCodeEnd":93,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/common/cauthdsl/cauthdsl.go#L72-L93","documentation":"Policy evaluation hit an identity type in the signed data that the compiled signature-policy evaluator has no case for — an unrecognized msp.Identity implementation was presented, so it cannot be matched against any principal.","triggerScenarios":"Evaluating a SignaturePolicy proto whose oneof Type is nil or set to a variant the cauthdsl compiler does not implement (e.g. a future/unknown variant produced by a different Fabric version), typically reached via provider.NewPolicy -> compile.","commonSituations":"Binary incompatibility where a policy was written by a newer Fabric runtime with additional rule types; proto payload where the oneof field was never set; fuzzed or tampered policy bytes that still unmarshal cleanly.","solutions":["Confirm the policy was produced by a compatible Fabric version whose SignaturePolicy variants this evaluator supports","Check the rule oneof is explicitly set (SignedBy or NOutOf) before serialization","Upgrade the evaluator/library to a version that knows the new rule type"],"exampleFix":"// before\nrule := &cb.SignaturePolicy{} // Type oneof unset\n// after\nrule := &cb.SignaturePolicy{Type: &cb.SignaturePolicy_SignedBy{SignedBy: 0}}","handlingStrategy":"validation","validationCode":"if env.Rule == nil || env.Rule.Type == nil {\n    return errors.New(\"SignaturePolicy oneof Type must be set (SignedBy or NOutOf)\")\n}","typeGuard":"func isKnownRuleType(r *cb.SignaturePolicy) bool {\n    switch r.GetType().(type) {\n    case *cb.SignaturePolicy_SignedBy, *cb.SignaturePolicy_NOutOf_:\n        return true\n    }\n    return false\n}","tryCatchPattern":"compiled, err := compile(env.Rule, env.Identities)\nif err != nil {\n    if strings.Contains(err.Error(), \"Unknown type\") {\n        return fmt.Errorf(\"policy uses an unsupported rule variant: %w\", err)\n    }\n    return err\n}","preventionTips":["Pin Fabric tooling and runtime to the same version","Never serialize a SignaturePolicy without explicitly setting the oneof","Reject unknown rule types at policy-authoring time"],"tags":["policy","signature-policy","unknown-type"],"backgroundTag":"unknown-proto-oneof-type","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"}