Troubleshooting 8 min read
Clash Crashes on Startup? How to Find the Cause in Logs and Fix It
Check logs for four common startup issues: invalid configuration syntax, port conflicts, missing core files, and system permissions. Follow the Windows or macOS troubleshooting steps.
Start with the startup logs: distinguish an app exit from a core failure
Note when you click the client, launch it once, then check the system tray or menu bar. If the window disappears but the icon remains, the app may just be running in the background. If the interface opens but reports that the core failed to start, check the core logs first. If both the window and icon are gone and the client process has exited, look for an operating system crash report. A website failing to load does not, by itself, mean the client crashed.
Windows: app data folders and Event Viewer
- Press Win + R, then open
%APPDATA%and%LOCALAPPDATA%separately. Look for a folder named after the client or publisher, then check forlogsor recently modified.logfiles. Paths vary by client and portable build; for portable versions, also check the data folder beside the app. - If the app log has not been updated, press Win + R, enter
eventvwr.msc, and go to “Windows Logs” → “Application.” Find an error at the time you noted earlier. If there is a matchingApplication Error(often event ID1000), note the faulting application name, faulting module name, and exception code.
macOS: Library folders and Console reports
- In Finder, choose “Go” → “Go to Folder,” then check
~/Library/Application Support/and~/Library/Logs/separately. Look for files in the client’s folder that match the time you launched it. - Open Console and check the crash reports in the sidebar. You can also look for a
.ipsfile from the same time in~/Library/Logs/DiagnosticReports/. Check the process name and termination reason in the report to avoid attributing another app’s crash to Clash. A core that exits on its own may not generate a crash report.
Start at the beginning of the current startup log and look for the first clear error that caused the exit, along with its surrounding lines. A final “core stopped” message usually reports only the outcome. Before sharing logs, redact subscription URLs, tokens, node addresses, and controller secrets.
Configuration syntax errors: check the YAML the core actually reads
If the log shows yaml: line, did not find expected key, or cannot unmarshal, first check the file and line number named in the error. The client may combine subscriptions, overrides, and global settings before passing the configuration to the core. If the error points to a merged file, line 42 may not correspond to line 42 in the original subscription. Use the generated file to identify the field, then edit the source configuration or override.
- Indentation and punctuation: Check the line named in the error and the one above it. YAML uses spaces for indentation; align items at the same level. List items start with a hyphen followed by a space, and key-value pairs use a colon followed by a space. A missing quote on the previous line can trigger an error on the next line.
- Field types: For example,
mixed-port: 7890must use an integer, not a quoted string.rulesmust be a list of rules. If it is written as a single string, the YAML may parse successfully, but the core can still reject the structure. - Core compatibility: Valid YAML does not guarantee that your core supports every feature. If the log says a proxy type or field value is unsupported, check whether the running core is an older version of Clash or mihomo, and note its exact version. If the configuration requires mihomo features, use a compatible core version rather than deleting or changing fields at random.
If the interface still opens, switch back to the last known-good configuration, then restore recent overrides one at a time. If the interface will not open, back up the client data and user configuration, then fully exit the process. Move a recently changed user override out of its original folder for testing only after the logs confirm its path and you know what it is used for. Do not wipe the data folder or repeatedly edit files that are regenerated on every launch.
Port conflicts: identify the process using the port
If you see address already in use, a bind failure, or Windows socket error 10048, note the listening address, protocol, and port from the log. The examples below use TCP port 7890. Mixed proxy, controller, and DNS ports serve different purposes, so check the port named in the error.
Windows: find the process in PowerShell
Get-NetTCPConnection -LocalPort 7890 -State Listen |
Select-Object LocalAddress, LocalPort, OwningProcess
Compare the OwningProcess number with the PID shown in Task Manager → Details. For a UDP port conflict, check with Get-NetUDPEndpoint -LocalPort 7890, replacing the example with the port from the log.
macOS: find the listener in Terminal
lsof -nP -iTCP:7890 -sTCP:LISTEN
Check the COMMAND and PID in the output. For UDP, run lsof -nP -iUDP:7890, replacing the port as needed. If you confirm that another proxy client is using it, quit that app from its menu, then check again. Do not force-quit an unfamiliar system process.
If you need to keep both apps, change the conflicting mixed proxy port to one you have confirmed is unused, such as 7891. If the client sets the system proxy automatically, make sure it uses the new port after restarting. Update any browser or command-line tools where you configured a proxy manually. If the conflict is with the controller, change the controller port—not the mixed proxy port.
Missing core files: check the path, version, and architecture
If spawn is followed by ENOENT, or the log says an executable cannot be found, first check whether the core path shown in the error exists. Some clients bundle mihomo with the app; others keep the core in the data folder and update it through the client’s core management feature. Check the client’s release notes for the approved core source. Do not overwrite the file with a same-named executable from an unknown source.
- Windows: Go to Settings → System → About to check your system type, then choose an x64 or ARM64 package according to the client’s compatibility notes. If security software removed the core, check Windows Security → Virus & threat protection → Protection history. Do not disable protection to launch the client. If you cannot identify the cause, reinstall using an installer provided by the publisher.
- macOS: Check About This Mac in the Apple menu to see whether your Mac has Apple silicon or an Intel processor. If the log shows
Bad CPU type in executable, check the architecture of both the client and the core; the app opening successfully does not mean its core is compatible. Copy the app to Applications before launching it from there.
Save your logs and configuration before reinstalling. First launch with the default settings and confirm the core runs, then import a known-good configuration. Restoring all your old data immediately after reinstalling can bring back the startup issue along with an old override or core path.
System permissions and TUN: test a standard launch first
Interpret Access is denied, EACCES, or operation not permitted in context, using the path or operation that follows. Being unable to write to the log folder is different from being unable to create a TUN virtual network interface. First turn off automatic TUN mode, if the interface is available, and avoid taking over the system proxy while testing. Check whether the client and core can start reliably with their default settings.
- Windows: If the error points to writing configuration or logs, check that the data folder belongs to your account and is writable. If the failure occurs only when TUN is enabled, check the client’s documentation for any required service, then verify its status in Services. A standard launch does not require running the client as administrator long-term.
- macOS: If network access authorization fails, check the client’s documentation for the required permissions and review the prompts under System Settings → Privacy & Security; the exact path varies by macOS version. Grant permissions only to clients and helper components from a verified source. If macOS blocks the app from running, verify its publisher and compatibility rather than disabling security checks system-wide.
Once a standard launch is stable, restore rule mode and a known-good configuration, then check that the core logs show no new parsing or listener errors. Next, enable the system proxy and test a browser. Finally, enable TUN separately and watch for new permission or network interface errors. If only this last step fails, keep using the standard proxy and see Clash troubleshooting for network takeover issues. If the client still crashes, provide the OS version, client and core versions, steps to reproduce, and the first relevant error with sensitive details redacted. This is more useful for diagnosis than a crash screenshot alone.