hyperledger/fabric · error

transient store for channel %s was not initialized

Error message

transient store for channel %s was not initialized

What it means

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.

Source

Thrown at core/endorser/plugin_endorser.go:135

	if err != nil {
		return nil, err
	}
	pbc.channels2Plugins[channel] = plugin
	return plugin, nil
}

func (pbc *pluginsByChannel) initPlugin(plugin endorsement.Plugin, channel string) (endorsement.Plugin, error) {
	var dependencies []endorsement.Dependency
	var err error
	// If this is a channel endorsement, add the channel state as a dependency
	if channel != "" {
		query, err := pbc.pe.NewQueryCreator(channel)
		if err != nil {
			return nil, errors.Wrap(err, "failed obtaining channel state")
		}
		store := pbc.pe.TransientStoreRetriever.StoreForChannel(channel)
		if store == nil {
			return nil, errors.Errorf("transient store for channel %s was not initialized", channel)
		}
		dependencies = append(dependencies, &ChannelState{QueryCreator: query, Store: store})
	}
	// Add the SigningIdentityFetcher as a dependency
	dependencies = append(dependencies, pbc.pe.SigningIdentityFetcher)
	err = plugin.Init(dependencies...)
	if err != nil {
		return nil, err
	}
	return plugin, nil
}

// PluginEndorser endorsers proposal responses using plugins
type PluginEndorser struct {
	sync.Mutex
	PluginMapper
	pluginChannelMapping map[PluginName]*pluginsByChannel
	ChannelStateRetriever

View on GitHub (pinned to 2736b63f8f)

Solutions

  1. Restart the peer and confirm startup completes without errors before sending endorsements
  2. Confirm the peer has fully joined the channel and the channel service (including transient store) is initialized (check peer logs for channel startup)
  3. Update to a Fabric version with fixes for transient-store initialization races
  4. Re-check chaincode/channel configuration for private data collections and rejoin the channel if startup is wedged
Defensive patterns

Strategy: retry

Validate before calling

// no pre-call check exposed; rely on peer readiness
await waitForPeerHealth(peerUrl, { checkChannel: channelName });

Try / catch

try {
  return await endorse(proposal, channel);
} catch (e) {
  if (e.message.includes('transient store for channel')) {
    await sleep(1000); return retry(endorse, 3); // transient init race
  }
  throw e;
}

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Related errors


AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04). Data as JSON: /api/errors/b63e3da035be15e2. Report an issue: GitHub.