stride3d/stride · error · FileNotFoundException
Could not find bundle
Error message
Could not find bundle
What it means
LoadBundleFromUrl reads the bundle header at the given URL; if ReadBundleHeader returns null (file missing/unreadable), it throws FileNotFoundException with message 'Could not find bundle'. The bundle file simply wasn't accessible at the provided bundleUrl.
Solutions
- Check FileExists(bundleUrl) on the VirtualFileSystem before loading and surface a clear user-facing error.
- Redeploy/repair the data folder so every bundle referenced by the content index exists.
- Verify read permissions and that the storage provider hosting the bundle is mounted.
Example fix
// before
await backend.LoadBundle(bundleName, indexMap, bundleUrl);
// after
if (!virtualFileProvider.FileExists(bundleUrl))
throw new FileNotFoundException($"Bundle file missing: {bundleUrl}");
await backend.LoadBundle(bundleName, indexMap, bundleUrl); Defensive patterns
Strategy: validation
Validate before calling
if (!virtualFileProvider.FileExists(bundleUrl))
throw new FileNotFoundException($"Bundle file not accessible: {bundleUrl}"); Try / catch
try
{
await backend.LoadBundle(bundleName, indexMap, bundleUrl);
}
catch (FileNotFoundException ex) when (ex.Message == "Could not find bundle")
{
logger.LogError(ex, "Bundle missing at {Url}", bundleUrl);
throw;
} Prevention
- Pre-check bundle file existence before LoadBundle and fail with a clear message.
- Ensure storage providers hosting bundles are mounted before loading.
- Compare shipped bundle file list against the build manifest in CI.
When it happens
Trigger: LoadBundle -> LoadBundleFromUrl with a bundleUrl pointing to a non-existent or unreadable file — wrong path in the content index, file deleted after index creation, or insufficient read permissions.
Common situations: Partial deployments where index entries exist but .bundle files were stripped; USB/CDN-delivered data not mounted; antivirus or permission issues blocking read.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- Package file [ ] was not found
- Unable to find the file
- Bundle could not be resolved
- Font file not found
- File doesn't appear to be a valid package
AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14).
Data as JSON: /api/errors/db4aed5a44c668eb.
Report an issue: GitHub.
Appendix: source
Thrown at sources/core/Stride.Core.Serialization/Storage/BundleOdbBackend.cs:172
{
currentBundle.ReferenceCount++;
return;
}
}
}
// Resolve package
var vfsUrl = await ResolveBundle(bundleName, true);
await LoadBundleFromUrl(bundleName, objectDatabaseContentIndexMap, vfsUrl);
}
public async Task LoadBundleFromUrl(string bundleName, ObjectDatabaseContentIndexMap objectDatabaseContentIndexMap, string bundleUrl, bool ignoreDependencies = false)
{
var bundle = ReadBundleHeader(bundleUrl, out var files);
if (bundle == null)
throw new FileNotFoundException("Could not find bundle", bundleUrl);
// Read and resolve dependencies
if (!ignoreDependencies)
{
foreach (var dependency in bundle.Dependencies)
{
await LoadBundle(dependency, objectDatabaseContentIndexMap);
}
}
LoadedBundle? loadedBundle = null;
lock (loadedBundles)
{
foreach (var currentBundle in loadedBundles)
{
if (currentBundle.BundleName == bundleName)
{
loadedBundle = currentBundle;View on GitHub (pinned to 96fad776d2)