spacedriveapp/spacedrive · error
ContentIdentity missing UUID
Error message
ContentIdentity missing UUID
What it means
The content_identity row was found but its uuid column is NULL. The proxy generator keys generated artifacts off content_uuid (stable across path changes), so a NULL uuid makes proxy generation impossible. Rows without uuid come from partial inserts, older schema versions before the column existed without backfill, or write paths that skip uuid assignment.
Solutions
- Backfill content_identity.uuid for existing rows (generate v4 uuids) via migration
- Audit all content_identity insert paths to confirm uuid is always set
- Skip and re-identify affected entries so a fresh, complete identity row is written
Example fix
-- before: rows like (id, uuid=NULL, ...) -- after: backfill migration UPDATE content_identity SET uuid = random_blob(16) WHERE uuid IS NULL; -- sqlite example; use proper uuid generation
Defensive patterns
Strategy: type-guard
Validate before calling
// Skip identities lacking a uuid and queue them for re-identification
let usable = ci.as_ref().map_or(false, |c| c.uuid.is_some());
if !usable { /* re-identify entry instead of proxying */ } Type guard
fn has_content_uuid(ci: &content_identity::Model) -> bool {
ci.uuid.is_some()
} Try / catch
let content_uuid = match ci.uuid {
Some(u) => u,
None => return Ok(ProcessorResult::failure("ContentIdentity missing UUID".to_string())),
}; Prevention
- Backfill content_identity.uuid in migrations that introduce the column
- Assert uuid is set on every content_identity insert path (and in tests)
- Audit restored/imported databases for NULL uuids before enabling proxies
When it happens
Trigger: Database migrated from a version where content_identity.uuid was not populated; a code path inserting content_identity without setting uuid; an interrupted update that cleared the column.
Common situations: Upgrades without uuid backfill migrations; mixed-version clients writing to one library; hand-crafted or restored rows missing the column value.
Related errors
- ContentIdentity not found
- ContentIdentity not found
- Entry has no content_id
- Failed to initialize core: error code
- Failed to query library devices
AI-assisted analysis of spacedriveapp/spacedrive@6dfeccf211 (2026-08-16).
Data as JSON: /api/errors/9f1bbbc0a4a726d1.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/ops/media/proxy/processor.rs:120
entry: &ProcessorEntry,
) -> Result<ProcessorResult> {
if !self.enabled {
return Ok(ProcessorResult::success(0, 0));
}
// Get content UUID
let content_uuid = if let Some(content_id) = entry.content_id {
use crate::infra::db::entities::content_identity;
use sea_orm::{ColumnTrait, EntityTrait, QueryFilter};
let ci = content_identity::Entity::find()
.filter(content_identity::Column::Id.eq(content_id))
.one(db)
.await?
.ok_or_else(|| anyhow::anyhow!("ContentIdentity not found"))?;
ci.uuid
.ok_or_else(|| anyhow::anyhow!("ContentIdentity missing UUID"))?
} else {
return Ok(ProcessorResult::failure(
"Entry has no content_id".to_string(),
));
};
debug!("→ Generating scrubbing proxy for: {}", entry.path.display());
// Call shared generation function
let count = super::generate_proxy_for_file(
&self.library,
&content_uuid,
&entry.path,
&[self.variant.clone()],
self.use_hardware_accel,
&self.preset,
false, // Don't regenerate in processor
)View on GitHub (pinned to 6dfeccf211)