{"record":{"id":"44d7e2fb82f518d0","repo":"juicedata/juicefs","slug":"parse-name-s","errorCode":null,"errorMessage":"parse name: %s","messagePattern":"parse name: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/meta/dump.go","lineNumber":466,"sourceCode":"\tdec := json.NewDecoder(r)\n\tif _, err = dec.Token(); err != nil {\n\t\treturn\n\t}\n\n\tprogress := utils.NewProgress(false)\n\tbar := progress.AddCountBar(\"Loaded entries\", 1) // with root\n\tdm = &DumpedMeta{}\n\tcounters = &DumpedCounters{ // rebuild counters\n\t\tNextInode: 2,\n\t\tNextChunk: 1,\n\t}\n\tparents = make(map[Ino][]Ino)\n\trefs = make(map[chunkKey]int64)\n\tvar name json.Token\n\tfor dec.More() {\n\t\tname, err = dec.Token()\n\t\tif err != nil {\n\t\t\terr = fmt.Errorf(\"parse name: %s\", err)\n\t\t\treturn\n\t\t}\n\t\tswitch name {\n\t\tcase \"Setting\":\n\t\t\tif err = dec.Decode(&dm.Setting); err == nil {\n\t\t\t\t_, err = json.MarshalIndent(dm.Setting, \"\", \"\")\n\t\t\t}\n\t\tcase \"Counters\":\n\t\t\tif err = dec.Decode(&dm.Counters); err == nil {\n\t\t\t\tbar.SetTotal(dm.Counters.UsedInodes) // TODO\n\t\t\t}\n\t\tcase \"Sustained\":\n\t\t\terr = dec.Decode(&dm.Sustained)\n\t\tcase \"DelFiles\":\n\t\t\terr = dec.Decode(&dm.DelFiles)\n\t\tcase \"Quotas\":\n\t\t\terr = dec.Decode(&dm.Quotas)\n\t\tcase \"UserQuotas\":","sourceCodeStart":448,"sourceCodeEnd":484,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/pkg/meta/dump.go#L448-L484","documentation":"Wraps a json.Decoder.Token() failure while readFiles/readEntry parse the top-level fields of a dumped metadata file in pkg/meta/dump.go. It means the JSON stream broke while reading the next key name, not that a value was invalid.","triggerScenarios":"`juicefs load` on a dump file that is truncated mid-key, contains raw invalid JSON, or has binary corruption inside a field name.","commonSituations":"Interrupted dumps (partial file), corrupted transfer, editing a dump with a tool that re-encodes it incorrectly, loading a non-dump file by mistake.","solutions":["Re-dump the metadata with `juicefs dump` and load that complete file","Validate the file is well-formed JSON (e.g. `python -m json.tool dump.json`) to locate the breakage","Check the error wrapped after 'parse name:' for the exact JSON syntax problem"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// before load\nf, _ := os.Open(dumpPath)\nif err := json.NewDecoder(f).Token(); err != nil { return fmt.Errorf(\"not valid JSON: %w\", err) }","typeGuard":null,"tryCatchPattern":"if err := juicefsLoad(dumpFile); err != nil { if strings.Contains(err.Error(), \"parse name\") { /* file is truncated/invalid JSON: re-dump */ } }","preventionTips":["Ensure dumps complete fully before loading (avoid SIGINT during dump)","Checksum dumps after transfer","Do not load files that are not produced by `juicefs dump`"],"tags":["json","parsing","dump","load"],"backgroundTag":"json-parse-error","analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}