hyperledger/fabric · error
bad channel ID: %s
Error message
bad channel ID: %s
What it means
Returned by NewValidatorImpl when ValidateChannelID rejects the supplied channel ID (empty, too long, or containing illegal characters). The underlying validation error is wrapped with this prefix, tying the failure to the ID/config binding.
Source
Thrown at common/configtx/validator.go:112
if len(matched) != len(channelID) {
return errors.Errorf("'%s' contains illegal characters", channelID)
}
return nil
}
// NewValidatorImpl constructs a new implementation of the Validator interface.
func NewValidatorImpl(channelID string, config *cb.Config, namespace string, pm policies.Manager) (*ValidatorImpl, error) {
if config == nil {
return nil, errors.Errorf("nil config parameter")
}
if config.ChannelGroup == nil {
return nil, errors.Errorf("nil channel group")
}
if err := ValidateChannelID(channelID); err != nil {
return nil, errors.Errorf("bad channel ID: %s", err)
}
configMap, err := mapConfig(config.ChannelGroup, namespace)
if err != nil {
return nil, errors.Errorf("error converting config to map: %s", err)
}
return &ValidatorImpl{
namespace: namespace,
pm: pm,
sequence: config.Sequence,
configMap: configMap,
channelID: channelID,
configProto: config,
}, nil
}
// ProposeConfigUpdate takes in an Envelope of type CONFIG_UPDATE and produces aView on GitHub (pinned to 2736b63f8f)
Solutions
- Fix the channel ID per the wrapped error (non-empty, <=Maxlength, allowed chars only)
- Use a conforming channel name when creating or joining the channel
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at common/configtx/validator.go:112 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/d674316c95ea3ae6.
Report an issue: GitHub.