siyuan-note/siyuan · error
encrypted notebook attribute view snapshot is plaintext [%s]
Error message
encrypted notebook attribute view snapshot is plaintext [%s]
What it means
Thrown by decryptHistoricalAttributeView when the inferred boxID refers to an encrypted notebook (IsEncryptedBox true) but the AV file content is plaintext (IsCiphertext false). For an encrypted notebook, stored AV objects are expected to be ciphertext, so plaintext signals an inconsistent state.
Source
Thrown at kernel/model/attribute_view_render.go:1273
return
}
func decryptHistoricalAttributeView(boxID, avID string, data []byte) ([]byte, error) {
ciphertext := util.IsCiphertext(data)
if boxID == "" {
if ciphertext {
return nil, errors.New("encrypted attribute view snapshot is missing notebook context")
}
return data, nil
}
if !IsEncryptedBox(boxID) {
if ciphertext {
return nil, fmt.Errorf("encrypted attribute view snapshot has no matching notebook [%s]", boxID)
}
return data, nil
}
if !ciphertext {
return nil, fmt.Errorf("encrypted notebook attribute view snapshot is plaintext [%s]", boxID)
}
return av.DecryptAVData(boxID, avID, data)
}
View on GitHub (pinned to 251596fc0d)
Solutions
- Re-trigger encryption of the notebook's stored objects so the AV file is encrypted consistently.
- If encryption was enabled in error, either disable it for the notebook or accept that the plaintext file must be migrated.
- Restore from a backup that matches the notebook's current encryption state.
Defensive patterns
Strategy: try-catch
Try / catch
data, err := decryptHistoricalAttributeView(boxID, avID, data)
if err != nil {
if strings.Contains(err.Error(), "is plaintext") {
// encrypted notebook holds a plaintext AV; re-encrypt or migrate
}
return err
} Prevention
- After enabling notebook encryption, ensure all pre-existing AV files are re-encrypted.
- Do not restore old plaintext objects into an encrypted notebook without migrating them.
- Run the notebook encryption pass to completion and verify object states.
When it happens
Trigger: A notebook is marked encrypted, yet its storage/av/<avID>.json file is plaintext. Happens when the AV was written before encryption was enabled and never re-encrypted, or when a partial migration left some objects unencrypted.
Common situations: Enabling notebook encryption on a notebook that already had plaintext AV files, followed by an incomplete encryption pass; or restoring an old plaintext object into an encrypted notebook from history.
Related errors
- encrypted attribute view snapshot is missing notebook contex
- encrypted attribute view snapshot has no matching notebook [
- attribute view history context is ambiguous [%s]
- encrypted notebook metadata verification failed after write
- Encrypted notebooks do not support this operation
AI-assisted analysis of siyuan-note/siyuan@251596fc0d (2026-08-12).
Data as JSON: /api/errors/4cd91d7aa327967e.
Report an issue: GitHub.