{"record":{"id":"e7f2bd9e40d50d6a","repo":"bevyengine/bevy","slug":"could-not-find-an-asset-loader-matching-asset-typ","errorCode":null,"errorMessage":"Could not find an asset loader matching: Asset Type: {asset_type_id:?}; Path: {asset_path:?};","messagePattern":"Could not find an asset loader matching: Asset Type: (.+?); Path: (.+?);","errorType":"error_code","errorClass":"AssetLoadError::MissingAssetLoader","httpStatus":null,"severity":"error","filePath":"crates/bevy_asset/src/server/mod.rs","lineNumber":2234,"sourceCode":"    pub actual_asset_name: &'static str,\n    /// The loader name used to load the asset.\n    pub loader_name: &'static str,\n}\n\n/// An error that occurs during an [`Asset`] load.\n#[derive(Error, Debug, Clone)]\n#[expect(\n    missing_docs,\n    reason = \"Adding docs to the variants would not add information beyond the error message and the names\"\n)]\npub enum AssetLoadError {\n    #[error(\"Attempted to load an asset with an empty path \\\"{0}\\\".\")]\n    EmptyPath(AssetPath<'static>),\n    #[error(\"Asset path \\\"{0}\\\" is unapproved. See UnapprovedPathMode for details.\")]\n    UnapprovedPath(AssetPath<'static>),\n    #[error(transparent)]\n    RequestedHandleTypeMismatch(#[from] Box<RequestedHandleTypeMismatchError>),\n    #[error(\"Could not find an asset loader matching: Asset Type: {asset_type_id:?}; Path: {asset_path:?};\")]\n    MissingAssetLoader {\n        asset_type_id: Option<TypeId>,\n        asset_path: String,\n    },\n    #[error(transparent)]\n    MissingAssetLoaderForExtension(#[from] MissingAssetLoaderForExtensionError),\n    #[error(transparent)]\n    MissingAssetLoaderForTypeName(#[from] MissingAssetLoaderForTypeNameError),\n    #[error(transparent)]\n    MissingAssetLoaderForTypeIdError(#[from] MissingAssetLoaderForTypeIdError),\n    #[error(transparent)]\n    AssetReaderError(#[from] AssetReaderError),\n    #[error(transparent)]\n    MissingAssetSourceError(#[from] MissingAssetSourceError),\n    #[error(transparent)]\n    MissingProcessedAssetReaderError(#[from] MissingProcessedAssetReaderError),\n    #[error(\"Encountered an error while reading asset metadata bytes\")]\n    AssetMetaReadError,","sourceCodeStart":2216,"sourceCodeEnd":2252,"githubUrl":"https://github.com/bevyengine/bevy/blob/227d3a6c661b3bdf3020d3e8290b5a6ffd0226f7/crates/bevy_asset/src/server/mod.rs#L2216-L2252","documentation":"AssetLoadError::MissingAssetLoader is returned by the AssetServer when no registered AssetLoader handles the requested asset type for the given path. The server resolves loaders by asset type (when an asset type is specified) and cannot find one registered for that TypeId. This usually means the loader's plugin was never added to the app.","triggerScenarios":"Calling AssetServer::load::<MyAsset>(path) where no AssetLoader producing MyAsset was registered; loading a custom asset type whose loader plugin wasn't added; a type mismatch where the loaded handle's asset type differs from any registered loader's target type.","commonSituations":"Forgetting to add a plugin (e.g. GltfPlugin, ImagePlugin, or your own AssetLoader plugin) before loading; custom asset types where the loader registration (init_asset_loader) was missed; feature flags excluding the loader crate; renamed/moved asset types after a Bevy version upgrade so the registered type no longer matches.","solutions":["Add the plugin that registers the loader (e.g. .add_plugins(GltfPlugin::default()) or your custom plugin with init_asset_loader)","Ensure init_asset_loader / register_asset_loader is called for your custom asset type","Check that the asset type in load::<T>() matches what the loader actually produces","Enable the feature flag or add the dependency for the loader crate you need"],"exampleFix":"// before\nlet handle: Handle<MyFormatAsset> = server.load(\"assets/data.myformat\");\n// no loader registered -> MissingAssetLoader\n// after\nApp::new()\n    .add_plugins((DefaultPlugins, MyFormatAssetPlugin)) // registers the loader\n    .run();","handlingStrategy":"try-catch","validationCode":"// ensure the loader plugin is added before loading\nApp::new()\n    .add_plugins(MyFormatAssetPlugin)\n    .add_systems(Startup, setup);","typeGuard":"fn loader_registered<T: Asset>(server: &AssetServer) -> bool {\n    server.get_path_loader(&AssetPath::from_static(\"dummy\")).is_ok()\n        || std::any::TypeId::of::<T>() == std::any::TypeId::of::<T>() // load::<T> only after the T-producing plugin is added\n}","tryCatchPattern":"match server.load_checked::<MyFormatAsset>(\"assets/data.myformat\") {\n    Ok(handle) => handle,\n    Err(AssetLoadError::MissingAssetLoader { asset_type_id, asset_path }) => {\n        error!(\"no loader for {asset_type_id:?} at {asset_path}; is the plugin added?\");\n        Handle::default()\n    }\n    Err(e) => panic!(\"asset load failed: {e}\"),\n}","preventionTips":["Add every asset-loader plugin (built-in and custom) in app setup before any loading system","Keep a smoke test that loads one representative asset of each type","When introducing a custom asset type, register the loader in the same PR","Check Bevy upgrade notes for renamed asset types or moved loader plugins"],"tags":["bevy","assets","missing-loader","plugin-registration"],"backgroundTag":"missing-asset-loader","analyzedSha":"227d3a6c661b3bdf3020d3e8290b5a6ffd0226f7","analyzedAt":"2026-08-30T08:55:11.013Z","contentChangedAt":"2026-08-30T08:55:11.013Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}