AlistGo/alist · error
unsupported meta_format: %s
Error message
unsupported meta_format: %s
What it means
Configuration validation error from Chunker.validateOptions, called during storage initialization. The meta_format option controls how chunk metadata sidecar files are serialized; only simplejson (JSON metadata files) and none (no metadata, chunk-name-only reconstruction) are implemented. Any other value is rejected before the storage comes online.
Source
Thrown at drivers/chunker/util.go:36
"github.com/alist-org/alist/v3/internal/fs"
"github.com/alist-org/alist/v3/internal/model"
"github.com/alist-org/alist/v3/internal/op"
"github.com/alist-org/alist/v3/internal/stream"
"github.com/alist-org/alist/v3/pkg/http_range"
"github.com/alist-org/alist/v3/pkg/utils"
)
func (d *Chunker) validateOptions() error {
if strings.TrimSpace(d.RemotePath) == "" {
return errors.New("remote_path is required")
}
if d.ChunkSize <= 0 {
return errors.New("chunk_size must be positive")
}
switch d.MetaFormat {
case "simplejson", "none":
default:
return fmt.Errorf("unsupported meta_format: %s", d.MetaFormat)
}
switch d.HashType {
case "none", "md5", "sha1":
default:
return fmt.Errorf("unsupported hash_type: %s", d.HashType)
}
if d.MetaFormat == "none" && d.HashType != "none" {
return fmt.Errorf("hash_type %q requires meta_format=simplejson", d.HashType)
}
return nil
}
func (d *Chunker) configuredRemotePaths() []string {
seen := map[string]struct{}{}
paths := make([]string, 0, 1)
addPath := func(p string) {
p = strings.TrimSpace(p)
if p == "" {View on GitHub (pinned to 843d9dc814)
Solutions
- Set meta_format to "simplejson" (or "none" if no metadata files are wanted) exactly, lowercase, no extra whitespace
- If metadata sidecars are desired, prefer simplejson since hash_type other than none requires it
Example fix
// before "meta_format": "json" // after "meta_format": "simplejson"
Defensive patterns
Strategy: validation
Validate before calling
var validMetaFormats = map[string]bool{"simplejson": true, "none": true}
if !validMetaFormats[strings.TrimSpace(cfg.MetaFormat)] {
return fmt.Errorf("reject config before init: bad meta_format %q", cfg.MetaFormat)
} Type guard
func isValidMetaFormat(v string) bool {
switch v {
case "simplejson", "none":
return true
}
return false
} Try / catch
if err := storage.Init(ctx); err != nil {
if strings.Contains(err.Error(), "unsupported meta_format") {
// fix the field and re-init once, then give up
cfg.MetaFormat = "simplejson"
}
} Prevention
- Offer meta_format as a dropdown limited to simplejson/none in UI wrappers
- Trim whitespace before comparing option values
- Document allowed values next to the config field
When it happens
Trigger: Creating or updating a Chunker storage with meta_format set to anything other than exactly "simplejson" or "none" — e.g. "json", "simple-json", "SimpleJson", or an empty string.
Common situations: Hand-editing the driver addition JSON; guessing option names from other drivers; case or spelling mistakes; upgrading from a fork that supported a different meta format value.
Related errors
- unsupported hash_type: %s
- hash_type %q requires meta_format=simplejson
- directory separator prohibited
- name token must come before chunk token
- pattern must contain one name token: {name}
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/84263a3f82288c70.
Report an issue: GitHub.