{"record":{"id":"6ac62024e61ea5d7","repo":"flxzt/rnote","slug":"store-snapshot-has-no-value-chrono-components","errorCode":null,"errorMessage":"store snapshot has no value `chrono_components`.","messagePattern":"store snapshot has no value `chrono_components`\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/rnote-engine/src/fileformats/rnoteformat/maj0min6.rs","lineNumber":35,"sourceCode":"        let mut engine_snapshot = ijson::IObject::new();\n\n        let store_snapshot = value\n            .store_snapshot\n            .as_object_mut()\n            .ok_or_else(|| anyhow!(\"store snapshot is not a JSON object.\"))?;\n\n        engine_snapshot.insert(String::from(\"document\"), value.document);\n        engine_snapshot.insert(\n            String::from(\"stroke_components\"),\n            store_snapshot\n                .remove(\"stroke_components\")\n                .ok_or_else(|| anyhow!(\"store snapshot has no value `stroke_components`.\"))?,\n        );\n        engine_snapshot.insert(\n            String::from(\"chrono_components\"),\n            store_snapshot\n                .remove(\"chrono_components\")\n                .ok_or_else(|| anyhow!(\"store snapshot has no value `chrono_components`.\"))?,\n        );\n        engine_snapshot.insert(\n            String::from(\"chrono_counter\"),\n            store_snapshot\n                .remove(\"chrono_counter\")\n                .ok_or_else(|| anyhow!(\"store snapshot has no value `chrono_counter`.\"))?,\n        );\n\n        Ok(Self {\n            engine_snapshot: engine_snapshot.into(),\n        })\n    }\n}\n","sourceCodeStart":17,"sourceCodeEnd":49,"githubUrl":"https://github.com/flxzt/rnote/blob/bbc5354502ba2fc83eec2670b535348825e679a6/crates/rnote-engine/src/fileformats/rnoteformat/maj0min6.rs#L17-L49","documentation":"The maj0min5patch9 -> maj0min6 migration requires `store_snapshot.chrono_components` to exist, because it is moved into the new `engine_snapshot.chrono_components`. This error is thrown when that key is absent from the store snapshot object.","triggerScenarios":"Running `RnoteFileMaj0Min6::try_from` on a file whose store snapshot object has `stroke_components` but no `chrono_components` key.","commonSituations":"Hand-edited .rnote files with the key stripped, files from a tool that omitted chrono data, or truncated saves.","solutions":["Inspect the extracted JSON and add a `chrono_components` array (possibly empty) to the store snapshot.","Restore the file from a backup or autosave copy.","Re-save the document with the rnote version matching the stored format.","If editing manually, insert `\"chrono_components\": []` alongside `stroke_components` before migration."],"exampleFix":"// before\n\"store_snapshot\": { \"stroke_components\": [] }\n// after\n\"store_snapshot\": { \"stroke_components\": [], \"chrono_components\": [] }","handlingStrategy":"validation","validationCode":"// validate before migration\nfn has_chrono_components(doc: &serde_json::Value) -> bool {\n    doc[\"store_snapshot\"].get(\"chrono_components\").map_or(false, |v| v.is_array())\n}","typeGuard":"fn store_snapshot_has(doc: &serde_json::Value, key: &str) -> bool {\n    doc[\"store_snapshot\"].get(key).is_some()\n}","tryCatchPattern":"match RnoteFileMaj0Min6::try_from(prev) {\n    Ok(migrated) => /* use migrated */,\n    Err(e) if e.to_string().contains(\"no value `chrono_components`\") => {\n        // insert an empty chrono_components array and retry\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Keep `chrono_components` present in store snapshots even when empty.","Run a key-presence check on store_snapshot before upgrading file versions.","Maintain backups before migration.","Avoid manual removal of keys from .rnote JSON."],"tags":["file-format","json","migration","missing-field"],"backgroundTag":"missing-required-config-field","analyzedSha":"bbc5354502ba2fc83eec2670b535348825e679a6","analyzedAt":"2026-09-08T13:20:33.747Z","contentChangedAt":"2026-09-08T13:20:33.747Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}