{"record":{"id":"7111df10dd5baff5","repo":"mihomo-party-org/clash-party","slug":"i18next-t-mihomo-error-profilecheckfailed-7111df","errorCode":null,"errorMessage":"${i18next.t('mihomo.error.profileCheckFailed')}: ${error}","messagePattern":"\\$\\{i18next\\.t\\('mihomo\\.error\\.profileCheckFailed'\\)\\}: \\$\\{error\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/main/core/manager.ts","lineNumber":1003,"sourceCode":"        .filter((line) => line.includes('level=error') || line.includes('error'))\n        .map((line) => {\n          if (line.includes('level=error')) {\n            return line.split('level=error')[1]?.trim() || line\n          }\n          return line.trim()\n        })\n        .filter((line) => line.length > 0)\n\n      if (errorLines.length === 0) {\n        const allLines = stdout.split('\\n').filter((line) => line.trim().length > 0)\n        throw new Error(`${i18next.t('mihomo.error.profileCheckFailed')}:\\n${allLines.join('\\n')}`)\n      } else {\n        throw new Error(\n          `${i18next.t('mihomo.error.profileCheckFailed')}:\\n${errorLines.join('\\n')}`\n        )\n      }\n    } else {\n      throw new Error(`${i18next.t('mihomo.error.profileCheckFailed')}: ${error}`)\n    }\n  }\n}\n\n// 权限检查入口（从 permissions.ts 调用）\nexport async function checkAdminRestartForTun(): Promise<void> {\n  await checkAdminRestartForTunWithRestart(restartCore)\n}\n","sourceCodeStart":985,"sourceCodeEnd":1012,"githubUrl":"https://github.com/mihomo-party-org/clash-party/blob/911e090537acdf7c50bee1c3aebecc2ef119a8b5/src/main/core/manager.ts#L985-L1012","documentation":"Thrown when the profile-check process failed before producing stdout to classify — i.e. the child process itself errored (spawn failure, non-zero error object, permission problem) rather than the core reporting a config problem. The caught `error` value is stringified after the localized 'profileCheckFailed' prefix.","triggerScenarios":"The core executable could not be run at all during profile check: binary missing at the resolved core path, lacking execute permission, wrong architecture, or the spawn/exec call rejected with an error object instead of producing output.","commonSituations":"mihomo binary quarantined/blocked by antivirus or macOS Gatekeeper; core not executable after update (missing chmod +x); corrupted core download; ENOENT because the core path setting points to a removed file.","solutions":["Verify the mihomo core binary exists at the configured core path and is executable (chmod +x on Unix).","Reinstall/re-download the core — a truncated or quarantined binary is the usual culprit.","Check the stringified error suffix in the message (e.g. ENOENT, EACCES) and address that OS-level cause.","Re-check the core path setting; reset it to the app-bundled core if it was customized."],"exampleFix":"// before: binary not executable\n$ ls -l mihomo\n-rw-r--r-- mihomo\n\n// after\n$ chmod +x mihomo","handlingStrategy":"validation","validationCode":"// verify the core binary is runnable before invoking a check\nimport { accessSync, constants } from 'fs'\naccessSync(corePath, constants.F_OK | constants.X_OK) // throws ENOENT/EACCES early with a clear message","typeGuard":null,"tryCatchPattern":"try {\n  await checkProfile(configPath)\n} catch (e) {\n  if (/ENOENT|EACCES|spawn/i.test(String(e))) {\n    throw new Error(`Core binary missing or not executable at ${corePath}; reinstall the core`)\n  }\n  throw e\n}","preventionTips":["After every core update, re-check the binary exists and is executable.","Exclude the app/core directory from antivirus quarantine rules.","Never leave the core path setting pointing at a manually moved binary."],"tags":["mihomo","process-spawn","core-executable","profile-check"],"backgroundTag":"spawn-failed","analyzedSha":"911e090537acdf7c50bee1c3aebecc2ef119a8b5","analyzedAt":"2026-08-30T13:00:49.174Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}