{"record":{"id":"db4aed5a44c668eb","repo":"stride3d/stride","slug":"could-not-find-bundle","errorCode":null,"errorMessage":"Could not find bundle","messagePattern":"Could not find bundle","errorType":"exception","errorClass":"FileNotFoundException","httpStatus":null,"severity":"error","filePath":"sources/core/Stride.Core.Serialization/Storage/BundleOdbBackend.cs","lineNumber":172,"sourceCode":"                {\n                    currentBundle.ReferenceCount++;\n                    return;\n                }\n            }\n        }\n\n        // Resolve package\n        var vfsUrl = await ResolveBundle(bundleName, true);\n\n        await LoadBundleFromUrl(bundleName, objectDatabaseContentIndexMap, vfsUrl);\n    }\n\n    public async Task LoadBundleFromUrl(string bundleName, ObjectDatabaseContentIndexMap objectDatabaseContentIndexMap, string bundleUrl, bool ignoreDependencies = false)\n    {\n        var bundle = ReadBundleHeader(bundleUrl, out var files);\n\n        if (bundle == null)\n            throw new FileNotFoundException(\"Could not find bundle\", bundleUrl);\n\n        // Read and resolve dependencies\n        if (!ignoreDependencies)\n        {\n            foreach (var dependency in bundle.Dependencies)\n            {\n                await LoadBundle(dependency, objectDatabaseContentIndexMap);\n            }\n        }\n\n        LoadedBundle? loadedBundle = null;\n        lock (loadedBundles)\n        {\n            foreach (var currentBundle in loadedBundles)\n            {\n                if (currentBundle.BundleName == bundleName)\n                {\n                    loadedBundle = currentBundle;","sourceCodeStart":154,"sourceCodeEnd":190,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/core/Stride.Core.Serialization/Storage/BundleOdbBackend.cs#L154-L190","documentation":"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.","triggerScenarios":"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.","commonSituations":"Partial deployments where index entries exist but .bundle files were stripped; USB/CDN-delivered data not mounted; antivirus or permission issues blocking read.","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."],"exampleFix":"// before\nawait backend.LoadBundle(bundleName, indexMap, bundleUrl);\n// after\nif (!virtualFileProvider.FileExists(bundleUrl))\n    throw new FileNotFoundException($\"Bundle file missing: {bundleUrl}\");\nawait backend.LoadBundle(bundleName, indexMap, bundleUrl);","handlingStrategy":"validation","validationCode":"if (!virtualFileProvider.FileExists(bundleUrl))\n    throw new FileNotFoundException($\"Bundle file not accessible: {bundleUrl}\");","typeGuard":null,"tryCatchPattern":"try\n{\n    await backend.LoadBundle(bundleName, indexMap, bundleUrl);\n}\ncatch (FileNotFoundException ex) when (ex.Message == \"Could not find bundle\")\n{\n    logger.LogError(ex, \"Bundle missing at {Url}\", bundleUrl);\n    throw;\n}","preventionTips":["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."],"tags":["bundles","file-not-found","io"],"backgroundTag":"file-not-found","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}