{"record":{"id":"e4809f53b4615a99","repo":"hyperledger/fabric","slug":"channel-does-not-exist-s","errorCode":null,"errorMessage":"Channel does not exist: %s","messagePattern":"Channel does not exist: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/endorser/support.go","lineNumber":64,"sourceCode":"func (s *SupportImpl) NewQueryCreator(channel string) (QueryCreator, error) {\n\tlgr := s.Peer.GetLedger(channel)\n\tif lgr == nil {\n\t\treturn nil, errors.Errorf(\"channel %s doesn't exist\", channel)\n\t}\n\treturn lgr, nil\n}\n\nfunc (s *SupportImpl) SigningIdentityForRequest(*pb.SignedProposal) (endorsement.SigningIdentity, error) {\n\treturn s.SignerSerializer, nil\n}\n\n// GetTxSimulator returns the transaction simulator for the specified ledger\n// a client may obtain more than one such simulator; they are made unique\n// by way of the supplied txid\nfunc (s *SupportImpl) GetTxSimulator(ledgername string, txid string) (ledger.TxSimulator, error) {\n\tlgr := s.Peer.GetLedger(ledgername)\n\tif lgr == nil {\n\t\treturn nil, errors.Errorf(\"Channel does not exist: %s\", ledgername)\n\t}\n\treturn lgr.NewTxSimulator(txid)\n}\n\n// GetHistoryQueryExecutor gives handle to a history query executor for the\n// specified ledger\nfunc (s *SupportImpl) GetHistoryQueryExecutor(ledgername string) (ledger.HistoryQueryExecutor, error) {\n\tlgr := s.Peer.GetLedger(ledgername)\n\tif lgr == nil {\n\t\treturn nil, errors.Errorf(\"Channel does not exist: %s\", ledgername)\n\t}\n\treturn lgr.NewHistoryQueryExecutor()\n}\n\n// GetTransactionByID retrieves a transaction by id\nfunc (s *SupportImpl) GetTransactionByID(chid, txID string) (*pb.ProcessedTransaction, error) {\n\tlgr := s.Peer.GetLedger(chid)\n\tif lgr == nil {","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/core/endorser/support.go#L46-L82","documentation":"SupportImpl.GetTxSimulator was asked for a transaction simulator for a ledger name that does not exist on this peer. Peer.GetLedger returned nil, so the endorser cannot create a tx simulator and returns this error instead of proceeding with endorsement simulation.","triggerScenarios":"Validate/ProcessProposal path calling Support.GetTxSimulator(ledgername, txid) where the proposal's ChannelID is not a channel this peer has joined, or the ledger has not been opened yet at peer startup.","commonSituations":"Client submitting a proposal to the wrong peer or with a wrong channel name; peer freshly started still loading channels; application config (channelName) mismatched with deployed network; peer joined the channel via config rather than join and genesis block invalid.","solutions":["Fix the channel name in the client/SDK configuration to match a joined channel","Join the peer to the channel if it should participate (peer channel join)","Check 'peer channel list' and peer logs to verify channel availability and startup completion","Retry after the peer finishes opening ledgers if the request raced startup"],"exampleFix":"// before\nconst channel = network.getChannel('mychannel-typo');\n// after — match the joined channel name exactly\nconst channel = network.getGateway().getNetwork('mychannel');","handlingStrategy":"validation","validationCode":"if (!peer.channels?.includes(ledgername)) throw new Error(`skip ${peer.name}: not joined to ${ledgername}`);","typeGuard":null,"tryCatchPattern":"try {\n  await contract.submitTransaction(...);\n} catch (e) {\n  if (e.message.startsWith('Channel does not exist')) {\n    // fix channel name / join peer, do not blind-retry\n  }\n  throw e;\n}","preventionTips":["Double-check channel name spelling in SDK network initialization","Add peer readiness/health checks that include channel membership","Use discovery-driven target selection for proposals","Confirm ledger open success in peer logs after every channel join"],"tags":["hyperledger-fabric","endorser","channel","ledger","simulator"],"backgroundTag":"channel-not-joined","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"}