bevyengine/bevy · error
Requested non-send data {} does not exist in the `World`.
Error message
Requested non-send data {} does not exist in the `World`.
Did you forget to add it using `app.insert_non_send` / `app.init_non_send`?
Non-send data can also be added by plugins. What it means
Error "Requested non-send data {} does not exist in the `World`. Did you forget to add it using `app.insert_non_send` / `app.init_non_send`? Non-send data can also be added by plugins." thrown in bevyengine/bevy.
Source
Thrown at crates/bevy_ecs/src/world/deferred_world.rs:496
pub fn get_resource_mut<R: Resource<Mutability = Mutable>>(&mut self) -> Option<Mut<'_, R>> {
// SAFETY: &mut self ensure that there are no outstanding accesses to the resource
unsafe { self.world.get_resource_mut() }
}
/// Gets a mutable reference to the non-send data of the given type, if it exists.
///
/// # Panics
///
/// Panics if the data does not exist.
/// Use [`get_non_send_mut`](World::get_non_send_mut) instead if you want to handle this case.
///
/// This function will panic if it isn't called from the same thread that the data was inserted from.
#[inline]
#[track_caller]
pub fn non_send_mut<R: 'static>(&mut self) -> Mut<'_, R> {
match self.get_non_send_mut() {
Some(x) => x,
None => panic!(
"Requested non-send data {} does not exist in the `World`.
Did you forget to add it using `app.insert_non_send` / `app.init_non_send`?
Non-send data can also be added by plugins.",
DebugName::type_name::<R>()
),
}
}
/// Gets a mutable reference to non-send data of the given type, if it exists.
/// Otherwise returns `None`.
///
/// # Panics
/// This function will panic if it isn't called from the same thread that the data was inserted from.
#[inline]
pub fn get_non_send_mut<R: 'static>(&mut self) -> Option<Mut<'_, R>> {
// SAFETY: &mut self ensure that there are no outstanding accesses to the data
unsafe { self.world.get_non_send_mut() }
}View on GitHub (pinned to 396ca72708)
Solutions
- Add the non-send data via app.insert_non_send(...) / app.init_non_send::<R>()
- Use get_non_send_mut() and handle the Option instead of panicking
- Only access non-send data from the main thread
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at crates/bevy_ecs/src/world/deferred_world.rs:496 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of bevyengine/bevy@396ca72708 (2026-08-20).
Data as JSON: /api/errors/e4ec139d0d609884.
Report an issue: GitHub.