· Troubleshooting · About 8 min read

Clash Subscription Import Failed or YAML Parse Error: Common Causes and Fixes

Troubleshoot failed Clash subscription imports caused by expired links, incompatible formats, YAML indentation errors, or network blocks with this step-by-step checklist.

Separate download, parsing, and loading issues

A subscription update has three steps: the client requests the subscription URL, reads the response, and then asks the core to validate and load the configuration. An “import failed” message can appear at any stage. In Clash Verge Rev, update only the affected item under “Subscriptions,” and note the message and time. If the error appears when you select a configuration, check the core logs around that time. Focus on the first specific error; “update failed” at the end is often just a summary.

SymptomCheck first
401、403、404Check your account with the service, the subscription URL, and the response type. A status code alone doesn’t prove the link has expired.
no such host、i/o timeout、x509Check the subscription host’s DNS, request path, or certificate validation first. These aren’t YAML indentation errors.
A message like yaml: line 12Confirm the response is actually YAML, then check indentation, quotes, and colons starting at the reported line and moving upward.
Download succeeds, but selecting the config reports a missing proxy group or proxyCheck the configuration actually passed to the core, especially name references changed by client-side overrides.

Expired subscription links, timeouts, and network blocks

Check the link first, then inspect the response

  1. Copy the complete Clash or mihomo subscription URL again from your service provider’s account page. Make sure you haven’t copied a webpage URL, dropped parameters after ?, or included leading or trailing spaces or line breaks.
  2. Check your account status and subscription expiration date in the provider’s dashboard. If you recently reset your subscription key, the old URL may no longer work. Keep the existing subscription and test the new URL separately under “Subscriptions” → “Add” in Clash Verge Rev. Replace the old entry only after the new one works.
  3. Note the HTTP status and response type. 401 usually means you should check your credentials; 403 may indicate a gateway or access policy denial; for 404, first compare the URL with the latest one in your dashboard. If you get 429, stop retrying and wait as directed by Retry-After (if present) or your provider’s instructions.

200 OK only means a response was received. A login page, maintenance page, or public Wi-Fi sign-in page may also return 200. If the body starts with <!doctype html> or <html>, resolve the login or network authentication issue first. Conversely, text/plain can still contain valid YAML, so don’t rely on the response header alone to identify the format. A URL opening in your browser doesn’t guarantee the client can update it: your browser may be signed in or using different proxy settings.

Distinguish timeouts from certificate errors

If the client repeatedly times out after about 10 seconds, that only tells you the request is being stopped at around the same point; it doesn’t indicate node latency. First check whether the client is configured to fetch subscriptions through a local proxy. If it points to 127.0.0.1:7890, confirm that this port is the proxy listener used by the current core. 7890 is just an example, not a standard port across clients. If you see connection refused, make sure the proxy is running and the port is correct instead of increasing the timeout.

For an x509 error, first check your system date, the subscription domain, and the specific certificate message. If the issue occurs only on an office network or public Wi-Fi, compare with a network you’re allowed to use and ask your network administrator or subscription provider to investigate. Don’t disable certificate verification just to import a subscription. Subscription updates and node connections use different paths; switching TUN or system proxy mode won’t fix an invalid subscription URL.

Subscription formats and core compatibility

A service may offer a Clash configuration, a proxy list for use with proxy-providers, and a list of generic share links. These serve different purposes. To import a full configuration, choose the Clash or mihomo option that the provider says is compatible with your client or core. Don’t rely on the downloaded file’s extension alone.

  • Full configuration: Common top-level fields include proxies, proxy-providers, proxy-groups, and rules. Not every configuration includes all of them. For example, nodes may come from proxy-providers rather than being listed directly under proxies.
  • Proxy list: A YAML proxy list may also have a top-level proxies field, but lack the policy groups and rules of a main configuration. Check the provider’s instructions first. If the file is intended for proxy-providers, reference it from your main configuration; don’t treat it as a subscription with a complete routing policy.
  • Share link list: A list with one vmess:// or ss:// link per line, or a block of Base64 text, doesn’t become a Clash configuration just because it’s named config.yaml. Choose the output format for your client in the provider’s dashboard.

Even valid syntax can include fields that your core doesn’t support. For example, an older Clash core may not recognize a node with type: hysteria2. When reporting the issue, include both the client version and the version of the core actually running. Maintainers need both to tell a downloader issue from a configuration compatibility issue. If you’re using mihomo, check the failing field against your core version; don’t change the node’s type to a different protocol name.

YAML indentation and policy group references

Syntax errors: check the lines above the reported line

Make a local copy before editing. YAML indentation uses spaces, not tabs, and fields at the same level must line up. If the error points to line 12, check the same block from that line upward: a missing quote or list hyphen on the previous line may not be caught until the parser reaches the next one. If the client generates an overridden configuration, the line number in the logs may refer to that generated file rather than the original subscription.

This local example is only for checking syntax and name references. It contains no remote nodes and shouldn’t replace your original subscription. The policy group name includes a colon followed by a space, so both the name and the rule string are quoted. Top-level fields are left-aligned, and list items are indented by two spaces.

mixed-port: 7890
allow-lan: false
mode: rule
proxy-groups:
  - name: "Route: Manual"
    type: select
    proxies:
      - DIRECT
rules:
  - "DOMAIN,example.com,Route: Manual"
  - MATCH,DIRECT

Validation errors: make sure rule targets match

If a routing rule still points to Route: Manual but an override renames the policy group to Route: Auto, the YAML may still be valid, but the core won’t find the rule target. Check the outbound target in rules, the member names in proxy-groups, and whether each group’s use entry matches a name under proxy-providers. Verify spaces, capitalization, and punctuation character by character.

If the original subscription works and the error appears only after enabling overrides, disable just the most recently added merge configuration or script, then select the configuration again. If that fixes it, add items back one at a time. Editing a cached copy of an automatically updated remote subscription is likely to be overwritten at the next update. If the server-side content is at fault, send the provider a redacted error. Keep local routing changes in a tested override.

Step-by-step troubleshooting checklist

  1. Keep a working configuration. Don’t delete the old subscription yet. Retry the failed entry on its own and determine whether the failure happens during the initial import, a scheduled update, or loading after selection.
  2. Check the request. If there’s an HTTP status code, check the URL and response. If the error is only about DNS, a connection, or a certificate, troubleshoot the request path first. Don’t inspect YAML before you’ve received a configuration.
  3. Check the format. If the response is a webpage or a list of share links, choose the right subscription option. If it’s YAML, confirm whether it’s a main configuration or just a proxy list.
  4. Check the core and overrides. Inspect the reported line and the few lines before it, then verify node types, policy group names, and rule targets. Change one thing at a time, select the configuration again, and check whether the same error is gone.
  5. Verify the result. Confirm that the client can update the subscription and load the selected configuration without errors. Then check under “Proxies” that the policy groups or nodes look as expected. Seeing nodes doesn’t mean traffic is using the intended route. If you later run into access or speed-test issues, check rule matching and node connectivity.

If you still can’t pinpoint the issue, report the client version, core version, failed step, first redacted error, and whether the same URL also fails on another network. This helps maintainers determine whether to investigate the downloader, server response, or core loading. Don’t include the full subscription URL, tokens, or complete proxy configuration.

Download Clash