hashicorp/nomad · error
unsupported plugin type %q
Error message
unsupported plugin type %q
What it means
Negotiation looks up the loader's supportedVersions table keyed by the plugin type reported by the plugin. If the type is not registered (no supported API versions known for it), selectApiVersion returns this error and the plugin is skipped.
Source
Thrown at helper/pluginutils/loader/init.go:189
// version or an error if the plugins response is malformed. If there is no
// overlap, an empty string is returned.
func (l *PluginLoader) selectApiVersion(i *base.PluginInfoResponse) (string, error) {
if i == nil {
return "", fmt.Errorf("nil plugin info given")
}
if len(i.PluginApiVersions) == 0 {
return "", fmt.Errorf("plugin provided no compatible API versions")
}
pluginVersions, err := convertVersions(i.PluginApiVersions)
if err != nil {
return "", fmt.Errorf("plugin provided invalid versions: %v", err)
}
// Lookup the supported versions. These will be sorted highest to lowest
supportedVersions, ok := l.supportedVersions[i.Type]
if !ok {
return "", fmt.Errorf("unsupported plugin type %q", i.Type)
}
for _, sv := range supportedVersions {
for _, pv := range pluginVersions {
if sv.Equal(pv) {
return pv.Original(), nil
}
}
}
return "", nil
}
// convertVersions takes a list of string versions and returns a sorted list of
// versions from highest to lowest.
func convertVersions(in []string) ([]*version.Version, error) {
converted := make([]*version.Version, len(in))
for i, v := range in {View on GitHub (pinned to 482b49bf1a)
Solutions
- Set the plugin's Type to a supported type constant (base.PluginTypeCSI, base.PluginTypeDevice, base.PluginTypeDriver, etc.)
- Upgrade Nomad if the plugin uses a newer plugin type this version doesn't support
- Fix the type string if it was misspelled or left empty
Example fix
// before
&base.PluginInfoResponse{Type: "csi-driver", ...}
// after
&base.PluginInfoResponse{Type: base.PluginTypeCSI, ...} Defensive patterns
Strategy: validation
Validate before calling
switch info.Type {
case base.PluginTypeCSI, base.PluginTypeDevice, base.PluginTypeDriver:
// ok
default:
return fmt.Errorf("unsupported plugin type %q", info.Type)
} Type guard
func typeSupported(t string) bool {
switch t {
case base.PluginTypeCSI, base.PluginTypeDevice, base.PluginTypeDriver:
return true
}
return false
} Try / catch
if err := loader.Init(...); err != nil {
if strings.Contains(err.Error(), "unsupported plugin type") {
// plugin's Type isn't in this Nomad build's supportedVersions
}
} Prevention
- Use the exported base.PluginType* constants, never raw strings
- Keep plugin and Nomad versions in sync when new plugin types are introduced
- Check supportedVersions for the target Nomad release before registering a new type
When it happens
Trigger: PluginInfoResponse.Type is empty, custom, or misspelled, so l.supportedVersions[i.Type] lookup fails during initInternal/fingerprint/dispense.
Common situations: Plugin built with a plugin type this Nomad build doesn't know (e.g. a new plugin type added upstream); typo'd type string in a custom plugin.
Related errors
- PluginInfo info failed for internal plugin %s: %v
- failed to parse version %q for internal plugin %s: %v
- failed to validate API versions %v for internal plugin %s: %
- failed to retrieve config schema for internal plugin %s: %v
- nil plugin info given
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/3c40baab94cd00ab.
Report an issue: GitHub.