{"record":{"id":"cee8dbacd689c281","repo":"siyuan-note/siyuan","slug":"encrypted-attribute-view-in-global-storage-s","errorCode":null,"errorMessage":"encrypted attribute view in global storage: %s","messagePattern":"encrypted attribute view in global storage: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/asset_relink.go","lineNumber":312,"sourceCode":"\t\t\tcontinue\n\t\t}\n\t\tabs := filepath.Join(dir, entry.Name())\n\t\tif err = p.observe(abs); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tp.reportProgress(abs)\n\t\tif entry.Type()&os.ModeSymlink != 0 {\n\t\t\treturn fmt.Errorf(\"symbolic attribute view is not supported: %s\", id)\n\t\t}\n\t\tif err = validateRelinkStoragePath(abs); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdata, err := filelock.ReadFile(abs)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif util.IsCiphertext(data) {\n\t\t\treturn fmt.Errorf(\"encrypted attribute view in global storage: %s\", id)\n\t\t}\n\t\tif !json.Valid(data) {\n\t\t\treturn fmt.Errorf(\"invalid attribute view JSON: %s\", id)\n\t\t}\n\t\tif !p.mayContainReferences(data) {\n\t\t\tcontinue\n\t\t}\n\t\tp.parsedViews++\n\t\tcache.RemoveAVData(id)\n\t\tview, err := av.ParseAttributeViewByPath(abs)\n\t\tif err != nil || view == nil || view.ID != id {\n\t\t\treturn fmt.Errorf(\"cannot parse attribute view %s: %v\", id, err)\n\t\t}\n\t\tbefore := len(p.result.References)\n\t\tif err = p.attributeView(view, apicontract.AssetReference{AvID: id, Path: \"storage/av/\" + entry.Name()}); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif len(p.result.References) > before {","sourceCodeStart":294,"sourceCodeEnd":330,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/9f775e8a12daef8255556097396f9b2739078892/kernel/model/asset_relink.go#L294-L330","documentation":"Global attribute-view definitions under data/storage/av must be plaintext JSON. If filelock.ReadFile returns data detected as ciphertext (encrypted content), the relink scan aborts because it cannot parse or safely rewrite references inside an encrypted view definition.","triggerScenarios":"scanViews reads storage/av/<id>.json and util.IsCiphertext(data) is true — i.e. the AV definition file was stored (or corrupted into) encrypted form in the global storage directory.","commonSituations":"Files copied from an encrypted notebook store into global storage by mistake; a custom sync tool encrypted storage/av contents; corruption that coincidentally looks like ciphertext.","solutions":["Restore the plaintext .json definition from backup or history","Re-sync the workspace from a source that has the plaintext definition","Recreate the attribute view and re-enter/relink its data if no backup exists"],"exampleFix":"// before\n// data/storage/av/20240101120000-abc123.json contains ciphertext\n// after\n// restore plaintext from history dir\ncp(\"history/.../20240101120000-abc123.json\", \"data/storage/av/20240101120000-abc123.json\")","handlingStrategy":"validation","validationCode":"// check AV definitions are plaintext JSON before relinking\ndata, _ := os.ReadFile(filepath.Join(dataDir, \"storage\", \"av\", id+\".json\"))\nif util.IsCiphertext(data) || !json.Valid(data) {\n\t// restore from backup before proceeding\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Do not copy encrypted notebook internals into global storage/av","Ensure sync tools do not encrypt files under data/storage/av","Keep plaintext backups of AV definitions"],"tags":["encryption","attribute-view","json","storage"],"backgroundTag":"invalid-json-response","analyzedSha":"9f775e8a12daef8255556097396f9b2739078892","analyzedAt":"2026-09-19T03:17:15.984Z","contentChangedAt":"2026-09-19T03:17:15.984Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}