{"record":{"id":"5ebb56611db22548","repo":"hyperledger/fabric","slug":"cannot-create-signed-proposal-due-to-s","errorCode":null,"errorMessage":"cannot create signed proposal, due to %s","messagePattern":"cannot create signed proposal, due to (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/peer/channel/joinbysnapshotstatus.go","lineNumber":84,"sourceCode":"\tinvocation := &pb.ChaincodeInvocationSpec{\n\t\tChaincodeSpec: &pb.ChaincodeSpec{\n\t\t\tType:        pb.ChaincodeSpec_Type(pb.ChaincodeSpec_Type_value[\"GOLANG\"]),\n\t\t\tChaincodeId: &pb.ChaincodeID{Name: \"cscc\"},\n\t\t\tInput:       &pb.ChaincodeInput{Args: [][]byte{[]byte(cscc.JoinBySnapshotStatus)}},\n\t\t},\n\t}\n\n\tvar prop *pb.Proposal\n\tc, _ := cc.cf.Signer.Serialize()\n\tprop, _, err = protoutil.CreateProposalFromCIS(common2.HeaderType_ENDORSER_TRANSACTION, \"\", invocation, c)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"cannot create proposal, due to %s\", err)\n\t}\n\n\tvar signedProp *pb.SignedProposal\n\tsignedProp, err = protoutil.GetSignedProposal(prop, cc.cf.Signer)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"cannot create signed proposal, due to %s\", err)\n\t}\n\n\tproposalResp, err := cc.cf.EndorserClient.ProcessProposal(context.Background(), signedProp)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed sending proposal, due to %s\", err)\n\t}\n\n\tif proposalResp.Response == nil || proposalResp.Response.Status != http.StatusOK {\n\t\treturn nil, fmt.Errorf(\"received bad response, status %d: %s\", proposalResp.Response.Status, proposalResp.Response.Message)\n\t}\n\n\tjoinbysnapshotStatus := &pb.JoinBySnapshotStatus{}\n\terr = proto.Unmarshal(proposalResp.Response.Payload, joinbysnapshotStatus)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"cannot query joinbysnapshot status, due to %s\", err)\n\t}\n\treturn joinbysnapshotStatus, nil\n}","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/peer/channel/joinbysnapshotstatus.go#L66-L102","documentation":"Returned by joinBySnapshotStatus when signing the proposal fails. After the proposal is built, protoutil.GetSignedProposal signs it with the local signer's private key; any cryptographic or marshaling failure is wrapped here.","triggerScenarios":"protoutil.GetSignedProposal(prop, cc.cf.Signer) errors — the signer cannot sign the proposal bytes, typically because the signing identity or its private key is unavailable/invalid.","commonSituations":"MSP directory missing the keystore/private key; expired or revoked enrollment certificate; wrong --mspdir passed to the peer CLI; crypto material permissions prevent reading the key file.","solutions":["Read the wrapped cause to identify whether signing or marshaling failed","Check that the MSP directory contains a valid keystore (private key) and signcerts for the identity","Re-enroll or re-register the client identity if certificates are expired/revoked","Fix file permissions on the crypto material so the CLI can read the private key"],"exampleFix":"// before: empty keystore -> GetSignedProposal fails\n// peer channel joinbysnapshot ... --mspdir /path/msp  (keystore empty)\n// after: ensure key exists before invoking\nif _, err := os.Stat(filepath.Join(mspDir, \"keystore\")); os.IsNotExist(err) {\n    return fmt.Errorf(\"private key missing in MSP keystore: %w\", err)\n}","handlingStrategy":"try-catch","validationCode":"// pre-flight: keystore must contain a private key\nentries, _ := os.ReadDir(filepath.Join(mspDir, \"keystore\"))\nif len(entries) == 0 { return errors.New(\"no private key in MSP keystore\") }","typeGuard":null,"tryCatchPattern":"signedProp, err := protoutil.GetSignedProposal(prop, signer)\nif err != nil {\n    return nil, fmt.Errorf(\"cannot create signed proposal, due to %s\", err)\n}","preventionTips":["Re-enroll identities before certificates expire","Keep keystore/signcerts pairs together in one MSP directory","chmod 600 private keys and ensure the CLI user can read them","Test signing with a simple `peer channel list` before longer workflows"],"tags":["fabric","peer-cli","signing","msp"],"backgroundTag":"proposal-signing-failed","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"}