clockworklabs/SpacetimeDB · error

unknown misc export

Error message

unknown misc export

What it means

After procedure exports are sorted out earlier in the pipeline, check_non_procedure_misc_exports (crates/schema/src/def/validate/v9.rs:1620) handles only ColumnDefaultValue; the Procedure arm is unreachable!() (proving the list is pre-filtered) and every other misc-export variant hits unimplemented!(). The branch exists to catch module ABIs carrying export kinds this host cannot interpret.

Source

Thrown at crates/schema/src/def/validate/v9.rs:1620

        }
    }

    ErrorStream::add_extra_errors(Ok((reducers_map, procedures_map, views_map)), errors)
}

fn check_non_procedure_misc_exports(
    misc_exports: Vec<RawMiscModuleExportV9>,
    validator: &ModuleValidatorV9,
    tables: &mut IdentifierMap<TableDef>,
) -> Result<()> {
    misc_exports
        .into_iter()
        .map(|export| match export {
            RawMiscModuleExportV9::ColumnDefaultValue(cdv) => process_column_default_value(&cdv, validator, tables),
            RawMiscModuleExportV9::Procedure(_proc) => {
                unreachable!("Procedure defs should already have been sorted out of `misc_exports`")
            }
            _ => unimplemented!("unknown misc export"),
        })
        .collect_all_errors::<()>()
}

fn process_column_default_value(
    cdv: &RawColumnDefaultValueV9,
    validator: &ModuleValidatorV9,
    tables: &mut IdentifierMap<TableDef>,
) -> Result<()> {
    // Validate the default value
    let validated_value = validator.validate_column_default_value(tables, cdv)?;

    let table_name = validator.core.resolve_identifier_with_case(cdv.table.clone())?;
    let table = tables
        .get_mut(&table_name)
        .ok_or_else(|| ValidationError::TableNotFound {
            table: cdv.table.clone(),
        })?;

View on GitHub (pinned to 524b4487d9)

Solutions

  1. Align versions: update the host, or pin the SDK to the host's version, then rebuild the module and republish
  2. Disable/remove preview module features that emit new export kinds
  3. Verify with spacetime version that module toolchain and host agree before publishing
Defensive patterns

Strategy: validation

Validate before calling

# Gate publish on version compatibility:
HOST=$(spacetime version)
SDK=$(cargo tree -p spacetimedb --depth 0 | grep -o 'spacetimedb v[0-9.]*')
# fail the pipeline if SDK major.minor > HOST major.minor before calling spacetime publish

Prevention

When it happens

Trigger: Publishing a module whose ABI contains a misc export other than a column default value or a procedure — typically a module produced by a newer SDK enabling a feature the host predates.

Common situations: Version skew: module built with a preview/newer spacetimedb SDK while the server runs an older minor; enabling experimental module features in Rust and publishing to a stable cluster.

Related errors


AI-assisted analysis of clockworklabs/SpacetimeDB@524b4487d9 (2026-08-16). Data as JSON: /api/errors/a52137c2b2d545ed. Report an issue: GitHub.