libnyanpasu/clash-nyanpasu · warning · StepLogEntry

member has no `proxies`, contributed nothing

Error message

member {member_id} has no `proxies`, contributed nothing

What it means

During config composition, a member profile has no `proxies` key at all. append_proxies logs this warning and the member contributes an empty list. This is expected for config-only members (rules/dns fragments) but a warning when proxy definitions were intended.

Solutions

  1. If the member should define proxies, add a `proxies` list to it or fix the key spelling
  2. If the member intentionally has no proxies (rules-only fragment), ignore or suppress this warning
  3. Verify the subscription source still includes the proxies section after updates
  4. Check member_id in the warning to locate the offending profile

Example fix

# before (member fragment missing proxies)
rules:
  - MATCH,DIRECT
# after
proxies: []
rules:
  - MATCH,DIRECT
Defensive patterns

Strategy: validation

Validate before calling

fn member_has_proxies(member: &ConfigValue) -> bool { obj_get(member, "proxies").is_some() }

Try / catch

// Ignore expected warning for rules-only fragments
if !member_has_proxies(&member) && member_requires_proxies(member_id) {
    return Err(anyhow!("member {member_id} must define proxies"));
}

Prevention

When it happens

Trigger: run_composition → append_proxies: obj_get(member, "proxies") returns None for a member in the composition chain.

Common situations: A member profile that only contains rules or proxy-groups (legitimately no proxies) triggering the warning; a subscription update that lost its proxy section; a typo like `proxy:` instead of `proxies:`.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


AI-assisted analysis of libnyanpasu/clash-nyanpasu@f7dbce2997 (2026-09-08). Data as JSON: /api/errors/fb7104c41949d404. Report an issue: GitHub.

Appendix: source

Thrown at backend/nyanpasu-config/src/runtime/executor/compose.rs:138

/// 建列表;非序列 → WARN + 跳过,保留用户数据)。
pub(super) fn append_proxies(
    working: &ConfigValue,
    member: &ConfigValue,
    member_id: &ProfileId,
    logs: &mut Vec<StepLogEntry>,
) -> ConfigValue {
    let extracted: Vec<ConfigValue> = match obj_get(member, "proxies") {
        Some(value) => match value.as_array_arc() {
            Some(items) => items.to_vec(),
            None => {
                logs.push(StepLogEntry::warn(format!(
                    "member {member_id} `proxies` is not a sequence, contributed nothing"
                )));
                Vec::new()
            }
        },
        None => {
            logs.push(StepLogEntry::warn(format!(
                "member {member_id} has no `proxies`, contributed nothing"
            )));
            Vec::new()
        }
    };

    match obj_get(working, "proxies") {
        Some(value) => match value.as_array_arc() {
            Some(items) => {
                let mut next = items.to_vec();
                next.extend(extracted);
                obj_insert(working, "proxies", ConfigValue::Array(Arc::from(next)))
            }
            None => {
                logs.push(StepLogEntry::warn(
                    "working config `proxies` is not a sequence, append skipped",
                ));
                working.clone()

View on GitHub (pinned to f7dbce2997)