mihomo-party-org/clash-party · warning
[ProfileUpdater] Failed to init profile ${item.name}:
Error message
[ProfileUpdater] Failed to init profile ${item.name}: What it means
In initProfileUpdater, when autoUpdateProfileOnStart is enabled, each profile item is initialized via addProfileItem(item); a rejection is caught and logged with this warning including the profile name. The profile's initial on-start refresh failed, but updater registration (addProfileUpdater) already succeeded, so future scheduled updates still occur.
Source
Thrown at src/main/core/profileUpdater.ts:129
)
}
export async function initProfileUpdater(): Promise<void> {
const { autoUpdateProfileOnStart = true } = await getAppConfig()
const { items = [], current } = await getProfileConfig()
const currentItem = await getCurrentProfileItem()
for (const item of items.filter((i) => i.id !== current)) {
await auditPluginProfileVault(item)
if (item.type === 'remote' && item.autoUpdate && item.interval) {
await addProfileUpdater(item)
if (autoUpdateProfileOnStart) {
try {
await addProfileItem(item)
} catch (e) {
await logger.warn(`[ProfileUpdater] Failed to init profile ${item.name}:`, e)
}
}
}
if (item.type === 'plugin' && item.autoUpdate && item.interval) {
await addProfileUpdater(item)
}
}
await auditPluginProfileVault(currentItem)
if (currentItem?.type === 'remote' && currentItem.autoUpdate && currentItem.interval) {
const currentId = currentItem.id
await addProfileUpdater(currentItem)
if (autoUpdateProfileOnStart) {
try {
await addProfileItem(currentItem)View on GitHub (pinned to 911e090537)
Solutions
- Identify the failing item via ${item.name} in the message and test its update URL manually.
- Correct or re-import the profile item if its URL/fields are stale or invalid.
- Once the network is available, trigger a manual profile update to recover; scheduled updates remain active regardless.
Defensive patterns
Strategy: validation
Validate before calling
for (const item of items) {
if (item.type === 'remote' && !item.url) {
logger.warn(`skipping ${item.name}: remote item missing url`)
continue
}
} Type guard
const isUpdatableRemote = (i: IProfileItem): boolean => i.type === 'remote' && typeof i.url === 'string' && /^https?:\/\//.test(i.url)
Try / catch
try {
await addProfileItem(item)
} catch (e) {
logger.warn(`[ProfileUpdater] Failed to init profile ${item.name}:`, e)
} Prevention
- Validate profile items (url present and well-formed) at import time, not at update time.
- Defer on-start updates until the network is confirmed up.
- Test failing items' URLs manually to separate auth vs network vs content issues.
When it happens
Trigger: App startup with auto-update-on-start enabled and addProfileItem rejects for a specific item: remote URL unreachable, HTTP error, content validation failure, or item stored with stale/invalid fields (e.g. missing url for type 'remote').
Common situations: First launch after import with no network yet; imported profile with malformed or expired subscription URL; proxy/auth changes invalidating old requests; plugin items whose source vanished.
Related errors
- [ProfileUpdater] Failed to update ${logLabel}:
- [ProfileUpdater] Failed to update current profile:
- [ProfileUpdater] Failed to init current profile:
- Subscription failed: Profile is not a valid YAML
- Subscription failed: Profile missing proxies or providers
AI-assisted analysis of mihomo-party-org/clash-party@911e090537 (2026-08-30).
Data as JSON: /api/errors/f67d786bd08c83f9.
Report an issue: GitHub.