{"record":{"id":"c85925ff9437300e","repo":"FiloSottile/age","slug":"identity-encodings-not-supported","errorCode":null,"errorMessage":"identity encodings not supported","messagePattern":"identity encodings not supported","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/plugin.go","lineNumber":269,"sourceCode":"\t\tif p.recipient == nil {\n\t\t\treturn p.recipientError(i, fmt.Errorf(\"recipient encodings not supported\"))\n\t\t}\n\t\tr, err := p.recipient(data)\n\t\tif err != nil {\n\t\t\treturn p.recipientError(i, err)\n\t\t}\n\t\trecipients = append(recipients, r)\n\t}\n\tfor i, s := range identityStrings {\n\t\tname, data, err := ParseIdentity(s)\n\t\tif err != nil {\n\t\t\treturn p.identityError(i, err)\n\t\t}\n\t\tif name != p.name {\n\t\t\treturn p.identityError(i, fmt.Errorf(\"unsupported plugin name: %q\", name))\n\t\t}\n\t\tif p.idAsRecipient == nil {\n\t\t\treturn p.identityError(i, fmt.Errorf(\"identity encodings not supported\"))\n\t\t}\n\t\tr, err := p.idAsRecipient(data)\n\t\tif err != nil {\n\t\t\treturn p.identityError(i, err)\n\t\t}\n\t\tidentities = append(identities, r)\n\t}\n\n\t// Technically labels should be per-file key, but the client-side protocol\n\t// extension shipped like this, and it doesn't feel worth making a v2.\n\tvar labels []string\n\n\tstanzas := make([][]*age.Stanza, len(fileKeys))\n\tfor i, fk := range fileKeys {\n\t\tfor j, r := range recipients {\n\t\t\tss, ll, err := wrapWithLabels(r, fk)\n\t\t\tif p.broken {\n\t\t\t\treturn 2","sourceCodeStart":251,"sourceCodeEnd":287,"githubUrl":"https://github.com/FiloSottile/age/blob/b74dce4cdbe35b5e5f66c06d9612b72f89028758/plugin/plugin.go#L251-L287","documentation":"RecipientV1 was asked to treat an identity string as a recipient, but the plugin's IdAsRecipient callback is nil — the plugin cannot convert its identity format into a recipient. The library rejects the conversion rather than guessing.","triggerScenarios":"An identity string (not a recipient string) is passed where IdAsRecipient support is required, but the Plugin was constructed with IdAsRecipient nil; the plugin author never implemented identity-as-recipient conversion.","commonSituations":"Passing an identity file/argument to an encrypt flow via a plugin that only supports explicit recipients; using an older plugin version that lacks IdAsRecipient support.","solutions":["Set the Plugin.IdAsRecipient callback if the plugin should support identities as recipients","Use the plugin's recipient form instead of the identity when encrypting","Upgrade the plugin to a version that supports identity-as-recipient conversion"],"exampleFix":"// before\nplugin.New(name, newRecipient, nil)\n// after\nplugin.New(name, newRecipient, func(data []byte) (age.Recipient, error) { return idAsRecipient(data) })","handlingStrategy":"validation","validationCode":"// Before encrypting with an identity-as-recipient:\nif pluginIDAsRecipientUnsupported { // determined from plugin capabilities\n    return errors.New(\"plugin does not support identities as recipients\")\n}","typeGuard":null,"tryCatchPattern":"if err != nil {\n    if strings.Contains(err.Error(), \"identity encodings not supported\") {\n        // fall back to using the plugin's recipient form\n    }\n}","preventionTips":["Use recipient strings (not identities) unless the plugin documents IdAsRecipient support","Check plugin capabilities via --age-plugin=plugin-v1","Upgrade plugins to versions supporting identity-as-recipient"],"tags":["age","plugin","identity","configuration"],"backgroundTag":"plugin-encoding-not-supported","analyzedSha":"b74dce4cdbe35b5e5f66c06d9612b72f89028758","analyzedAt":"2026-08-31T23:59:31.627Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}