clockworklabs/SpacetimeDB · error · UnresolvedTypeException
Could not resolve type {type}
Error message
Could not resolve type {type} What it means
Error "Could not resolve type {type}" thrown in clockworklabs/SpacetimeDB.
Source
Thrown at crates/bindings-csharp/BSATN.Codegen/Utils.cs:153
SpecialType.System_Double => "SpacetimeDB.BSATN.F64",
SpecialType.System_String => "SpacetimeDB.BSATN.String",
SpecialType.None => GetTypeInfoForNamedType(namedType),
_ => throw new InvalidOperationException(
$"Unsupported special type {type} ({type.SpecialType})"
),
},
IArrayTypeSymbol { ElementType: var elementType } => elementType.SpecialType
== SpecialType.System_Byte
? "SpacetimeDB.BSATN.ByteArray"
: $"SpacetimeDB.BSATN.Array<{elementType}, {GetTypeInfo(elementType)}>",
_ => throw new InvalidOperationException($"Unsupported type {type}"),
};
static string GetTypeInfoForNamedType(INamedTypeSymbol type)
{
if (type.TypeKind == Microsoft.CodeAnalysis.TypeKind.Error)
{
throw new UnresolvedTypeException(type);
}
if (type.TypeKind == Microsoft.CodeAnalysis.TypeKind.Enum)
{
if (
!type.GetAttributes()
.Any(a => a.AttributeClass?.ToString() == "SpacetimeDB.TypeAttribute")
)
{
throw new InvalidOperationException(
$"Enum {type} does not have a [SpacetimeDB.Type] attribute"
);
}
return $"SpacetimeDB.BSATN.Enum<{SymbolToName(type)}>";
}
var result = type.OriginalDefinition.ToString() switch
{
// {U/I}{128/256} are not treated by C# as regular primitives, so we need to match them by type name.
"System.Int128" => "SpacetimeDB.BSATN.I128",View on GitHub (pinned to 524b4487d9)
When it happens
Trigger: Thrown at crates/bindings-csharp/BSATN.Codegen/Utils.cs:153 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of clockworklabs/SpacetimeDB@524b4487d9 (2026-08-16).
Data as JSON: /api/errors/da15f801c8b9e5e9.
Report an issue: GitHub.