{"record":{"id":"ca53135a1c124707","repo":"bevyengine/bevy","slug":"retrynextupdate","errorCode":"RetryNextUpdate","errorMessage":"The bind group could not be generated","messagePattern":"The bind group could not be generated","errorType":"error_code","errorClass":"AsBindGroupError","httpStatus":null,"severity":"warning","filePath":"crates/bevy_render/src/render_resource/bind_group.rs","lineNumber":642,"sourceCode":"    /// be used. `ExtendedMaterial` uses this in order to ensure that the base\n    /// material doesn't use bindless mode if the extension doesn't.\n    fn bind_group_layout_entries(\n        render_device: &RenderDevice,\n        force_no_bindless: bool,\n    ) -> Vec<BindGroupLayoutEntry>\n    where\n        Self: Sized;\n\n    fn bindless_descriptor() -> Option<BindlessDescriptor> {\n        None\n    }\n}\n\n/// An error that occurs during [`AsBindGroup::as_bind_group`] calls.\n#[derive(Debug, Error)]\npub enum AsBindGroupError {\n    /// The bind group could not be generated. Try again next frame.\n    #[error(\"The bind group could not be generated\")]\n    RetryNextUpdate,\n    #[error(\"Create the bind group via `as_bind_group()` instead\")]\n    CreateBindGroupDirectly,\n    #[error(\"At binding index {0}, the provided image sampler `{1}` does not match the required sampler type(s) `{2}`.\")]\n    InvalidSamplerType(u32, String, String),\n}\n\n/// A prepared bind group returned as a result of [`AsBindGroup::as_bind_group`].\npub struct PreparedBindGroup {\n    pub bindings: BindingResources,\n    pub bind_group: BindGroup,\n}\n\nimpl PreparedBindGroup {\n    pub(crate) fn unprepare(&self) -> BindGroupBuilder {\n        let mut data_buffer = vec![];\n        BindGroupBuilder {\n            binding_resources: UnpreparedBindingResources(","sourceCodeStart":624,"sourceCodeEnd":660,"githubUrl":"https://github.com/bevyengine/bevy/blob/396ca727080776bd313bb892423b7d94e03b81b4/crates/bevy_render/src/render_resource/bind_group.rs#L624-L660","documentation":"AsBindGroupError::RetryNextUpdate is the documented 'not ready yet' signal from AsBindGroup::as_bind_group: a dependency (typically an image/texture asset) is not yet loaded or prepared, and the caller should try again on a later frame (bind_group.rs doc, line ~107). Bevy's material preparation treats it as transient - the material is re-queued and retried next update instead of failing fatally.","triggerScenarios":"A material's bind group references an asset that has not finished loading/preparing (image still decoding, GPU resource not yet created); as_bind_group returns RetryNextUpdate and material preparation (material_bind_groups.rs:2817) converts it into PrepareAssetError::RetryNextUpdate, keeping the material queued.","commonSituations":"Materials with file-loaded textures during the first frames after startup; switching a material's texture handle to a newly-created asset at runtime; slow asset IO; an asset whose loader path or server configuration is broken (then the retry never succeeds).","solutions":["No action needed in normal flows - the engine retries automatically; a few of these during initial asset load are expected.","If it persists indefinitely, check that the referenced asset path/handle actually loads (look for AssetServer load errors) and the asset's RenderAssetPlugin is registered.","In custom code calling as_bind_group, match this variant and defer to the next frame instead of aborting."],"exampleFix":"// before\nlet prepared = material.as_bind_group(&layout, render_device, render_queue, &mut param)?;\n\n// after\nmatch material.as_bind_group(&layout, render_device, render_queue, &mut param) {\n    Ok(prepared) => { /* use prepared.bind_group */ }\n    Err(AsBindGroupError::RetryNextUpdate) => { /* asset not ready; try again next frame */ }\n    Err(e) => error!(\"bind group failed: {e}\"),\n}","handlingStrategy":"retry","validationCode":"// If you can cheaply check the dependency before calling:\nif gpu_images.contains(image_handle.id()) {\n    let prepared = material.as_bind_group(&layout, device, queue, &mut param)?;\n}","typeGuard":null,"tryCatchPattern":"match material.as_bind_group(&layout, render_device, render_queue, &mut param) {\n    Ok(prepared) => { /* bind */ }\n    Err(AsBindGroupError::RetryNextUpdate) => {\n        // dependency not ready; re-queue and try again next frame\n    }\n    Err(e) => error!(\"bind group error: {e}\"),\n}","preventionTips":["Treat this variant as expected during initial asset load; do not crash on it.","Preload/track dependent assets so you know when retries should succeed.","If retries never succeed, audit asset paths, loaders, and plugin registration rather than the bind group code."],"tags":["bevy","bind-group","async-asset","retry","material"],"backgroundTag":"asset-not-ready-retry","analyzedSha":"396ca727080776bd313bb892423b7d94e03b81b4","analyzedAt":"2026-08-20T16:12:39.808Z","contentChangedAt":"2026-08-20T16:12:39.808Z","schemaVersion":2},"datasetVersion":"2026-09-09T01:17:15.007Z"}