{"record":{"id":"baae6ce218e14200","repo":"bevyengine/bevy","slug":"23402","errorCode":"-23402","errorMessage":"Unknown component type: `{}`","messagePattern":"Unknown component type: `(.+?)`","errorType":"error_code","errorClass":"BrpError","httpStatus":null,"severity":"error","filePath":"crates/bevy_remote/src/builtin_methods.rs","lineNumber":1185,"sourceCode":"/// component.\npub fn process_remote_mutate_components_request(\n    In(params): In<Option<Value>>,\n    world: &mut World,\n) -> BrpResult {\n    let BrpMutateComponentsParams {\n        entity,\n        component,\n        path,\n        value,\n    } = parse_some(params)?;\n    let app_type_registry = world.resource::<AppTypeRegistry>().clone();\n    let type_registry = app_type_registry.read();\n\n    // Get the fully-qualified type names of the component to be mutated.\n    let component_type: &TypeRegistration = type_registry\n        .get_with_type_path(&component)\n        .ok_or_else(|| {\n            BrpError::component_error(anyhow!(\"Unknown component type: `{}`\", component))\n        })?;\n\n    // Get the reflected representation of the component.\n    let mut reflected = component_type\n        .data::<ReflectComponent>()\n        .ok_or_else(|| {\n            BrpError::component_error(anyhow!(\"Component `{}` isn't registered\", component))\n        })?\n        .reflect_mut(world.entity_mut(entity))\n        .ok_or_else(|| {\n            BrpError::component_error(anyhow!(\"Cannot reflect component `{}`\", component))\n        })?;\n\n    // Get the type of the field in the component that is to be\n    // mutated.\n    let value_type: &TypeRegistration = type_registry\n        .get_with_type_path(\n            reflected","sourceCodeStart":1167,"sourceCodeEnd":1203,"githubUrl":"https://github.com/bevyengine/bevy/blob/78002f65fa984ededb80915b4a5613f195bc864d/crates/bevy_remote/src/builtin_methods.rs#L1167-L1203","documentation":"BRP's `world.mutate_component` handler looks the component name up with `type_registry.get_with_type_path(&component)`. If no registered type matches the string (neither full path nor registered short alias), it returns this COMPONENT_ERROR (-23402). The lookup happens before any entity or field access, so the request never reaches the entity.","triggerScenarios":"A `world.mutate_component` request whose `component` string is not a registered type path: a typo, a short name that isn't registered, or a component type that was never registered for reflection.","commonSituations":"Sending `\"Transform\"` vs `\"bevy_transform::components::transform::Transform\"` and the short alias isn't registered; the component comes from a plugin/crate that doesn't call `app.register_type::<T>()`; a BRP client written against a different Bevy version where type paths moved.","solutions":["Use the exact fully-qualified type path (copy it from a `world.get_component` response or from `std::any::type_name` on the app side)","Ensure the component derives `Reflect` and is registered: `#[derive(Component, Reflect)]` plus `app.register_type::<T>()`","If the type lives in another crate, enable/verify that crate registers its types (most Bevy plugins do this in `Plugin::build`)"],"exampleFix":"// before (client payload)\n{ \"entity\": 12, \"component\": \"transform\", \"path\": \"translation\", \"value\": [0.0, 1.0, 0.0] }\n\n// after\n{ \"entity\": 12,\n  \"component\": \"bevy_transform::components::transform::Transform\",\n  \"path\": \"translation\",\n  \"value\": [0.0, 1.0, 0.0] }\n\n// app side, if still unknown:\n#[derive(Component, Reflect, Default)]\n#[reflect(Component)]\nstruct Health(f32);\napp.register_type::<Health>();","handlingStrategy":"validation","validationCode":"// App side (Rust): assert the type path resolves before the client uses it\nlet registry = app.world().resource::<AppTypeRegistry>().read();\nassert!(registry.get_with_type_path(\"my_game::Health\").is_some(),\n    \"BRP clients expect my_game::Health to be registered\");","typeGuard":null,"tryCatchPattern":"if (res.error?.code === -23402 && /Unknown component type/i.test(res.error.message)) {\n  const hint = await resolveTypePath(res.error.data); // e.g. ask user / fallback list\n  retryWithFullyQualifiedName(hint);\n}","preventionTips":["Always send fully-qualified type paths; build payloads from get_component responses","Register every component you expose to tooling: derive(Component, Reflect) + register_type","On app startup, dump the registry's type paths once and validate your client's component name list against it"],"tags":["bevy","brp","bevy-remote","components","reflection","type-registry"],"backgroundTag":null,"analyzedSha":"78002f65fa984ededb80915b4a5613f195bc864d","analyzedAt":"2026-08-16T09:07:20.800Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}