stride3d/stride · error · InvalidOperationException
Unable to find the base [{AssetItem.Asset.Archetype.Location
Error message
Unable to find the base [{AssetItem.Asset.Archetype.Location}] of asset [{AssetItem.Location}]. What it means
AssetPropertyGraph.RefreshBase throws this InvalidOperationException when the asset declares an Archetype but the owning AssetContainer (Quantum graph container) has no property graph for that archetype's Id. This means the referenced base asset is not loaded/registered in the same session, so override tracking cannot link to its nodes. It protects the internal invariant that every archetype referenced by an asset is present in the container.
Solutions
- Restore or reload the missing base/archetype asset into the container before refreshing
- Re-point the derived asset's Archetype reference to an existing asset and resave
- Rebuild/reimport the package so graph registrations are consistent
- Clear the Archetype link on the asset if base-linking is no longer needed
Example fix
// before
derivedAsset.Archetype = loadOldArchetypeReference(); // asset no longer in container
// after
derivedAsset.Archetype = container.Assets.Values.OfType<Asset>().FirstOrDefault(a => a.Id == archetypeId)
?? throw new InvalidOperationException("Load the archetype asset into the container first"); Defensive patterns
Strategy: try-catch
Validate before calling
if (asset.Archetype is not null && container.TryGetGraph(asset.Archetype.Id) is null)
Console.Error.WriteLine($"Archetype {asset.Archetype.Location} not loaded; fix the reference before refreshing"); Type guard
bool baseAvailable = asset.Archetype is not null && Container.TryGetGraph(asset.Archetype.Id) is not null;
Try / catch
try { graph.RefreshBase(); } catch (InvalidOperationException ex) when (ex.Message.StartsWith("Unable to find the base")) { // restore archetype or clear Archetype link and re-save } Prevention
- Never delete base/archetype assets while derived assets reference them
- Load complete package hierarchies together
- Re-save derived assets after moving/renaming base assets
When it happens
Trigger: Calling RefreshBase (directly or via Initialize/ClearAllOverrides) when AssetItem.Asset.Archetype.Id has no corresponding graph in Container.TryGetGraph — the archetype asset was deleted, is in another package not loaded, or the container was partially loaded.
Common situations: Renaming/moving a base asset so references break; deleting an archetype while derived assets still point to it; loading only part of a package hierarchy; asset DB desync after a failed save or merge.
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
- Unable to find the graph corresponding to the base part
- The base is unset for the current node.
- An IObjectNode was expected when processing the path [{path}
- An IMemberNode was expected when processing the path [{path}
- No Collection item identifier associated to the given collec
AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14).
Data as JSON: /api/errors/6d72a374879b3b88.
Report an issue: GitHub.
Appendix: source
Thrown at sources/assets/Stride.Core.Assets.Quantum/AssetPropertyGraph.cs:195
{
IsInitializing = true;
RefreshBase();
ReconcileWithBase();
FinalizeInitialization();
}
finally
{
IsInitializing = false;
}
IsInitialized = true;
}
public virtual void RefreshBase()
{
if (AssetItem.Asset.Archetype is not null)
{
Archetype = Container.TryGetGraph(AssetItem.Asset.Archetype.Id)
?? throw new InvalidOperationException($"Unable to find the base [{AssetItem.Asset.Archetype.Location}] of asset [{AssetItem.Location}].");
}
// Unlink previously linked nodes
ClearAllBaseLinks();
// Link nodes to the new base.
// Note: in case of composition (prefabs, etc.), even if baseAssetGraph is null, each part (entities, etc.) will discover
// its own base by itself via the FindTarget method.
LinkToBase(RootNode, Archetype?.RootNode);
}
public virtual void RefreshBase(IAssetNode node, IAssetNode? baseNode)
{
UnlinkFromBase(node);
LinkToBase(node, baseNode);
}
public void ReconcileWithBase()View on GitHub (pinned to 96fad776d2)