{"record":{"id":"887dc8842a77f6e6","repo":"bevyengine/bevy","slug":"32603","errorCode":"-32603","errorMessage":"Unexpected format of serialized resource value","messagePattern":"Unexpected format of serialized resource value","errorType":"exception","errorClass":"BrpError","httpStatus":null,"severity":"error","filePath":"crates/bevy_remote/src/builtin_methods.rs","lineNumber":718,"sourceCode":"        return Err(BrpError::resource_not_present(&resource_path));\n    };\n\n    // Use the `ReflectSerializer` to serialize the value of the resource;\n    // this produces a map with a single item.\n    let reflect_serializer = ReflectSerializer::new(reflected.as_partial_reflect(), &type_registry);\n    let Value::Object(serialized_object) =\n        serde_json::to_value(&reflect_serializer).map_err(BrpError::resource_error)?\n    else {\n        return Err(BrpError {\n            code: error_codes::RESOURCE_ERROR,\n            message: format!(\"Resource `{resource_path}` could not be serialized\"),\n            data: None,\n        });\n    };\n\n    // Get the single value out of the map.\n    let value = serialized_object.into_values().next().ok_or_else(|| {\n        BrpError::internal(anyhow!(\"Unexpected format of serialized resource value\"))\n    })?;\n    let response = BrpGetResourcesResponse { value };\n    serde_json::to_value(response).map_err(BrpError::internal)\n}\n\n/// Handles a `world.get_components+watch` request coming from a client.\npub fn process_remote_get_components_watching_request(\n    In(params): In<Option<Value>>,\n    world: &World,\n    mut removal_cursors: Local<HashMap<ComponentId, MessageCursor<RemovedComponentEntity>>>,\n) -> BrpResult<Option<Value>> {\n    let BrpGetComponentsParams {\n        entity,\n        components,\n        strict,\n    } = parse_some(params)?;\n\n    let app_type_registry = world.resource::<AppTypeRegistry>();","sourceCodeStart":700,"sourceCodeEnd":736,"githubUrl":"https://github.com/bevyengine/bevy/blob/a62cce8c05ceacd3bd102e678c83e2b42e5dfbe2/crates/bevy_remote/src/builtin_methods.rs#L700-L736","documentation":"BrpError (RESOURCE_ERROR) raised in the BRP get-resources handler: the serialized resource value did not have the expected object/map shape after ReflectSerializer, so it cannot be returned as a resource value.","triggerScenarios":"Thrown at crates/bevy_remote/src/builtin_methods.rs:655 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the resource's reflect serialization implementation produces a map","Verify the resource type is properly reflected and registered"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a62cce8c05ceacd3bd102e678c83e2b42e5dfbe2","analyzedAt":"2026-08-20T16:12:39.808Z","contentChangedAt":"2026-08-20T16:12:39.808Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}