libnyanpasu/clash-nyanpasu · warning · StepLogEntry

member `proxies` is not a sequence, contributed nothing

Error message

member {member_id} `proxies` is not a sequence, contributed nothing

What it means

During config composition, a member profile's `proxies` field exists but is not an array/sequence (e.g. it is a string, mapping, or scalar). append_proxies logs this warning and the member contributes an empty list instead of failing the composition.

Solutions

  1. Open the offending member profile and make `proxies` a YAML/JSON list of proxy objects
  2. Validate profile schema before adding it to the composition
  3. Check the warning log to identify which member_id is malformed
  4. Re-export or re-download the profile from its subscription source

Example fix

# before (member profile)
proxies:
  name: my-proxy
  type: ss
# after
proxies:
  - name: my-proxy
    type: ss
Defensive patterns

Strategy: type-guard

Validate before calling

fn member_proxies_ok(member: &ConfigValue) -> bool {
    matches!(obj_get(member, "proxies"), None | Some(v) if v.as_array_arc().is_some())
}

Type guard

fn is_proxies_array(member: &ConfigValue) -> bool {
    obj_get(member, "proxies").map_or(true, |v| v.as_array_arc().is_some())
}

Try / catch

// append_proxies already degrades gracefully; assert at composition entry
assert!(member_proxies_ok(&member), "member {member_id} proxies must be a list");

Prevention

When it happens

Trigger: run_composition → append_proxies: obj_get(member, "proxies") returns Some(value) but value.as_array_arc() returns None — the member document declares `proxies` with a non-sequence value.

Common situations: A hand-edited YAML/JSON profile where `proxies:` is followed by an indented mapping instead of a list, or `proxies: ""` / a scalar; a broken merge that flattened the list into an object; importing a profile from a tool that emits a different schema.

Related errors


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

Appendix: source

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

        working = next;
    }

    Ok((builder, working))
}

/// 规则 3/4/7/8/9/10 + D11 宽容化(缺 proxies → WARN + 空;工作配置缺键 →
/// 建列表;非序列 → 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);

View on GitHub (pinned to f7dbce2997)