mihomo-party-org/clash-party · warning
[ProfileUpdater] Failed to update current profile:
Error message
[ProfileUpdater] Failed to update current profile:
What it means
scheduleDelayedCurrentUpdate sets a setTimeout that calls updateProfile(itemId) for the currently selected profile shortly after app start, catching rejections and logging this warning. The delayed refresh of the current profile failed; the app continues with the existing on-disk profile.
Source
Thrown at src/main/core/profileUpdater.ts:107
try {
intervalPool[itemId] = new Cron(cronExpression, updateTask(itemId, logLabel))
} catch {
// ignore invalid cron
}
}
function scheduleDelayedCurrentUpdate(item: IProfileItem): void {
const delayMs = intervalDelayMs(item.interval)
if (!delayMs) return
const itemId = item.id
delayedUpdatePool[itemId] = setTimeout(
async () => {
delete delayedUpdatePool[itemId]
try {
await updateProfile(itemId)
} catch (e) {
await logger.warn(`[ProfileUpdater] Failed to update current profile:`, e)
}
},
Math.min(delayMs + 10000, MAX_TIMER_DELAY_MS)
)
}
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) {View on GitHub (pinned to 911e090537)
Solutions
- Read the captured error to distinguish network vs content failures, then retry the update from the UI.
- Increase the delay or make the update retry with backoff until the network is ready.
- Fix the underlying subscription URL/auth if the error is an HTTP failure.
Defensive patterns
Strategy: retry
Validate before calling
if (!(await isNetworkReady())) {
scheduleDelayedCurrentUpdate(item, 60_000) // retry later when network is up
return
} Try / catch
try {
await updateProfile(itemId)
} catch (e) {
logger.warn('[ProfileUpdater] Failed to update current profile:', e)
scheduleDelayedCurrentUpdate(item, NEXT_RETRY_DELAY_MS)
} Prevention
- Gate the delayed startup update on OS network-availability events.
- Make the delayed update exponential-backoff retrying instead of one-shot.
- Refresh after connectivity restoration rather than a fixed timer.
When it happens
Trigger: The delayed timer (delayMs+10s, capped at MAX_TIMER_DELAY_MS) fires and updateProfile(currentId) rejects — same causes as scheduled updates: network unreachable at startup, subscription endpoint error, or invalid content.
Common situations: App launches before network is up (Wi-Fi still connecting) so the delayed update fails; VPN/proxy not yet routed; subscription temporarily down right after app start.
Related errors
- [ProfileUpdater] Failed to init current profile:
- [ProfileUpdater] Failed to update ${logLabel}:
- [ProfileUpdater] Failed to init profile ${item.name}:
- Get device failed
- Request failed with status ${res.status}: ${url}
AI-assisted analysis of mihomo-party-org/clash-party@911e090537 (2026-08-30).
Data as JSON: /api/errors/e40c3a36f71c0e4c.
Report an issue: GitHub.