mihomo-party-org/clash-party · info
Direct remote profile fetch failed id=${id} url=${redactSubs
Error message
Direct remote profile fetch failed id=${id} url=${redactSubscriptionUrl(profileUrl)}; trying proxy fallback What it means
When creating a profile from a remote subscription URL, the app first tries a direct fetch. If it fails, it logs this warning (with the profile id and redacted URL) before automatically retrying through a proxy/substore fallback. Note the message is a logger.warn argument, not a thrown Error — users see it in logs; a thrown error only occurs if the proxy fallback also fails.
Source
Thrown at src/main/config/profile.ts:498
url: profileUrl,
mixedPort,
userAgent: item.userAgent || userAgent || `mihomo.party/v${app.getVersion()} (clash.meta)`,
ageSecretKey: newItem.ageSecretKey,
authToken: item.authToken,
substore: newItem.substore || false
}
const fetchSub = (useProxy: boolean, timeout: number): Promise<FetchResult> =>
fetchAndValidateSubscription({ ...baseOptions, useProxy, timeout })
let result: FetchResult
if (newItem.useProxy || newItem.substore) {
result = await fetchSub(Boolean(newItem.useProxy), userItemTimeoutMs)
} else {
try {
result = await fetchSub(false, userItemTimeoutMs)
} catch (directError) {
await profileLogger.warn(
`Direct remote profile fetch failed id=${id} url=${redactSubscriptionUrl(
profileUrl
)}; trying proxy fallback`,
directError
)
try {
// smart fallback
result = await fetchSub(true, subscriptionTimeout)
} catch {
throw directError
}
}
}
const { data, headers } = result
if (headers['content-disposition'] && newItem.name === 'Remote File') {
newItem.name = parseFilename(headers['content-disposition'])View on GitHub (pinned to 911e090537)
Solutions
- Nothing to fix if the proxy fallback succeeds — this warning is informational; check subsequent log lines for the fallback result.
- Enable 'use proxy' or substore option for the profile so the first fetch goes through the proxy.
- Verify the subscription URL is correct and still valid (test in a browser).
- Ensure the app's proxy settings point at a working local proxy core, then retry creating the profile.
Example fix
// before (log noise from repeated direct failures) const result = await fetchSub(false, timeoutMs) // after const result = await fetchSub(Boolean(newItem.useProxy), timeoutMs) // with useProxy enabled in profile settings
Defensive patterns
Strategy: fallback
Validate before calling
// Pre-validate the subscription URL before creating the profile:
try {
new URL(profileUrl)
} catch {
throw new Error('Invalid subscription URL')
}
const reachable = await fetch(profileUrl, { method: 'HEAD', signal: AbortSignal.timeout(5000) }).then(r => r.ok).catch(() => false)
if (!reachable) console.warn('Subscription unreachable directly — proxy fallback will be used') Try / catch
try {
result = await fetchSub(false, timeoutMs)
} catch (directError) {
logger.warn('Direct fetch failed; using proxy fallback', directError)
result = await fetchSub(true, timeoutMs) // fall back to proxy path
} Prevention
- Enable the proxy/substore option for profiles hosted behind blocked or geo-restricted URLs.
- Keep a working local proxy running so the fallback path succeeds.
- Verify subscription URLs periodically (they expire / rate-limit).
- Treat this log line as informational; only act if the subsequent proxy fetch also fails.
When it happens
Trigger: The subscription host is unreachable directly: DNS failure, TLS interception, GFW/regional blocking, server blocks non-proxied requests, wrong URL, or the machine has no direct internet access but a proxy is configured.
Common situations: Users in censored networks fetching blocked subscription URLs; subscription servers that geo-block or rate-limit; expired subscription links returning errors; corporate networks requiring a proxy for all outbound HTTP.
Related errors
- Request failed with status ${res.status}: ${url}
- Invalid latest.yml from update source
- Get device failed
- unreachable
- Plugin URL must use a public host
AI-assisted analysis of mihomo-party-org/clash-party@911e090537 (2026-08-30).
Data as JSON: /api/errors/02ac031654d1927c.
Report an issue: GitHub.