hyperledger/fabric · error

invalid config: must contain application config

Error message

invalid config: must contain application config

What it means

ValidateJoinBlock guard: the config bundle from the join block has no application group, so it is not an application channel configuration. The channel participation API requires a config that defines an Application section.

Source

Thrown at orderer/common/channelparticipation/validator.go:62

	}

	cryptoProvider := factory.GetDefault()
	bundle, err := channelconfig.NewBundleFromEnvelope(envelope, cryptoProvider)
	if err != nil {
		return "", err
	}

	channelID = bundle.ConfigtxValidator().ChannelID()

	// Check channel type
	_, isSystemChannel := bundle.ConsortiumsConfig()
	if isSystemChannel {
		return "", errors.WithMessage(types.ErrSystemChannelNotSupported, "invalid config: contains consortiums")
	}

	_, isAppChannel := bundle.ApplicationConfig()
	if !isAppChannel {
		return "", errors.New("invalid config: must contain application config")
	}

	return channelID, err
}

// ValidateUpdateConfigEnvelope checks whether this envelope can be used as an update config for the channel participation API.
// It returns the channel ID.
// It verifies that it is not a system channel by checking that consortiums config does not exist.
// It verifies it is an application channel by checking that the application group exists.
// It returns an error when it cannot be used as a update config envelope.
func ValidateUpdateConfigEnvelope(env *cb.Envelope) (channelID string, err error) {
	payload, err := protoutil.UnmarshalPayload(env.Payload)
	if err != nil {
		return "", errors.New("bad payload")
	}

	if payload.Header == nil || payload.Header.ChannelHeader == nil {
		return "", errors.New("bad header")

View on GitHub (pinned to 2736b63f8f)

Solutions

  1. Use a config block that contains the Application group (an app-channel genesis or config block)
  2. Regenerate the channel genesis block with configtxgen for an application channel
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at orderer/common/channelparticipation/validator.go:62 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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