{"record":{"id":"b63e3da035be15e2","repo":"hyperledger/fabric","slug":"transient-store-for-channel-s-was-not-initialized","errorCode":null,"errorMessage":"transient store for channel %s was not initialized","messagePattern":"transient store for channel (.+?) was not initialized","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/endorser/plugin_endorser.go","lineNumber":135,"sourceCode":"\tif err != nil {\n\t\treturn nil, err\n\t}\n\tpbc.channels2Plugins[channel] = plugin\n\treturn plugin, nil\n}\n\nfunc (pbc *pluginsByChannel) initPlugin(plugin endorsement.Plugin, channel string) (endorsement.Plugin, error) {\n\tvar dependencies []endorsement.Dependency\n\tvar err error\n\t// If this is a channel endorsement, add the channel state as a dependency\n\tif channel != \"\" {\n\t\tquery, err := pbc.pe.NewQueryCreator(channel)\n\t\tif err != nil {\n\t\t\treturn nil, errors.Wrap(err, \"failed obtaining channel state\")\n\t\t}\n\t\tstore := pbc.pe.TransientStoreRetriever.StoreForChannel(channel)\n\t\tif store == nil {\n\t\t\treturn nil, errors.Errorf(\"transient store for channel %s was not initialized\", channel)\n\t\t}\n\t\tdependencies = append(dependencies, &ChannelState{QueryCreator: query, Store: store})\n\t}\n\t// Add the SigningIdentityFetcher as a dependency\n\tdependencies = append(dependencies, pbc.pe.SigningIdentityFetcher)\n\terr = plugin.Init(dependencies...)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn plugin, nil\n}\n\n// PluginEndorser endorsers proposal responses using plugins\ntype PluginEndorser struct {\n\tsync.Mutex\n\tPluginMapper\n\tpluginChannelMapping map[PluginName]*pluginsByChannel\n\tChannelStateRetriever","sourceCodeStart":117,"sourceCodeEnd":153,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/core/endorser/plugin_endorser.go#L117-L153","documentation":"initPlugin could not find a transient store instance for the requested channel. The transient store keeps private data during endorsement; it is created per channel at channel initialization, so a nil store means the channel's transient store was never initialized on this peer.","triggerScenarios":"EndorseWithPlugin -> initPlugin where pe.TransientStoreRetriever.StoreForChannel(channel) returns nil for the proposal's channel — the channel context was never initialized on the peer (e.g. peer not fully joined, or peer restarted mid-configuration).","commonSituations":"Peer upgraded/restarted and channel service not fully initialized; private-data-enabled channel where transient store init raced the first endorsement; channel joined but peer's ledger/service initialization incomplete.","solutions":["Restart the peer and confirm startup completes without errors before sending endorsements","Confirm the peer has fully joined the channel and the channel service (including transient store) is initialized (check peer logs for channel startup)","Update to a Fabric version with fixes for transient-store initialization races","Re-check chaincode/channel configuration for private data collections and rejoin the channel if startup is wedged"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// no pre-call check exposed; rely on peer readiness\nawait waitForPeerHealth(peerUrl, { checkChannel: channelName });","typeGuard":null,"tryCatchPattern":"try {\n  return await endorse(proposal, channel);\n} catch (e) {\n  if (e.message.includes('transient store for channel')) {\n    await sleep(1000); return retry(endorse, 3); // transient init race\n  }\n  throw e;\n}","preventionTips":["Wait for peer startup logs to show the channel service fully initialized before sending endorsements","Avoid restarting peers during active private-data endorsements","Keep Fabric patched to versions fixing transient-store initialization races","Validate channel join completion with a lightweight query before heavy workloads"],"tags":["hyperledger-fabric","endorser","transient-store","plugin","channel"],"backgroundTag":"channel-not-initialized","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"}