First, distinguish a window crash from a core startup failure
Clash clients typically have two components: the graphical interface manages settings and displays status, while the core listens on local ports, handles connections, and applies rules. If the window disappears immediately, the core may still be running. Likewise, an open interface doesn’t mean the proxy port is working. Some clients keep running in the system tray or menu bar after the window closes. Try reopening the app from there, then check running processes.
- Both the window and tray icon disappear: On Windows, open Event Viewer → Windows Logs → Application, then look for an error matching the client executable and startup time. On macOS, open Console → Crash Reports and search by app name and time. These system crash reports help identify which process exited.
- The interface stays open, but reports that the core failed to start: Open the client’s log view and note the first error from that startup attempt. Later messages about refused connections or an unavailable control interface are often just consequences of the core failing to launch.
- It usually starts, but exits after switching a subscription or enabling TUN: Note the last change you made. Compare startup with the previous config and with TUN disabled. Don’t change ports, switch cores, and reinstall all at once, or it’ll be hard to tell what fixed the issue.
Back up your local config and custom overrides before troubleshooting. If you ask for help, include the error type, timestamp, and port. Remove subscription URLs, control interface secrets, and node credentials before sharing logs.
Step 1: Check YAML syntax and core compatibility
If Clash crashes right after a subscription update, check the config currently being loaded—not just the original subscription. Clients that support config merging may combine the subscription, global settings, and local overrides into a file for the core. The original subscription can be valid while the final config is not. If you can’t open the interface, find the config directory in the client documentation and copy the files before inspecting them. Don’t clear the entire directory.
Check indentation and fields around the reported line
For an error like yaml: line 18, check line 18 and the few lines above it. A parser may not detect a missing colon until the next line. Make sure indentation uses spaces, not tabs; align list-item hyphens at the same level; and check that booleans and numbers aren’t accidentally quoted as strings. If an error refers to a missing proxy group, compare the group name in your rules with the names under proxy-groups. If a downloaded subscription starts with <html>, check whether the response is a login or error page.
Validate a copy of the config with the same core
If you use mihomo, run the command below in a terminal with the same core version as the client. Save a copy of the config as test.yaml in the current directory, and create a separate profile-check directory. On Windows, replace the start of the command with .\mihomo.exe. If the client uses an older Clash core, check that core’s help output and supported fields. Passing validation with mihomo doesn’t prove that an older core can read the config.
./mihomo -t -d ./profile-check -f ./test.yaml
If the error points to a missing rule-set or geodata file, check that the test directory contains the resources required by the config before concluding that the config itself is faulty. If the client supports importing local configs, create a separate minimal config like the one below for comparison. This example uses local port 17890, disables TUN, and includes only a direct rule. It’s for testing startup, not replacing your everyday subscription. First, make sure the example port is free.
mixed-port: 17890
allow-lan: false
bind-address: "127.0.0.1"
mode: rule
log-level: info
tun:
enable: false
rules:
- MATCH,DIRECT
Step 2: Check whether the actual listening port is in use
If the log shows bind: address already in use, note the full listening address. mixed-port is the mixed proxy entry point; external-controller is the control interface. They serve different purposes. Check the port named in the error, not just the commonly cited 7890. The examples below use TCP port 7890. If the log says 9090, substitute 9090.
Windows: Find the process listening on a port by PID
Get-NetTCPConnection -LocalPort 7890 -State Listen |
Select-Object LocalAddress, LocalPort, OwningProcess
In Task Manager → Details, match the PID to the OwningProcess column. If the listener is an old client that’s still running, quit it from its tray menu, then run the check again. If the process belongs to software you still need, change only the conflicting port in Clash.
macOS and Linux: Identify the process listening on a port
lsof -nP -iTCP:7890 -sTCP:LISTEN
Use COMMAND and PID in the output to identify the process. A regular user may not see listeners owned by other accounts; no command output doesn’t prove that the port is free. The commands above check TCP. If the log specifically reports a UDP bind failure, use Get-NetUDPEndpoint -LocalPort 7890 on Windows or lsof -nP -iUDP:7890 on macOS or Linux.
If you change the mixed port from 7890 to 17890, update any browser, terminal, or system proxy settings where you entered the old address manually. If the control interface failed, make sure the client dashboard uses the new address too. Save your changes, restart once, then check the log and listening process again. If the window opens but your browser still uses the old port, that’s a separate issue.
Step 3: Check the core file, installer architecture, and version
If the interface starts but the log says the core can’t be executed, find the exact file path shown in the log. The file could be the core itself or a config file it needs during startup. A message like “file not found” alone doesn’t tell you whether to reinstall the app or correct the config path.
file not foundorno such file or directory- Check whether the file named in the log exists. If the core is missing, use the client’s built-in update or repair option if available. If an old shortcut points to a portable folder that has been moved, launch the app from its fully extracted directory instead.
exec format errororbad CPU type in executable- Check the processor architecture supported by the installer and core. On macOS, open Apple menu → About This Mac. For Apple Silicon models showing a Chip entry, choose an ARM64 package; for Intel models, choose an x64 package. On Windows 11, find your system type under Settings → System → About.
unknown fieldor a field type mismatch- Note the client version and the core version shown at the top of the log. Updating the interface doesn’t necessarily update the core. First verify that the core version supports the field named in the error, then decide whether to change the config or update to a core supported by the client.
If the problem started after an update, back up your files and use an installer provided by the same project to repair the installation. For a portable version, extract the entire package to a new directory before launching it. Don’t replace just one executable in the old directory, as that can leave a new interface running with an old core or helper program.
Step 4: Distinguish config directory permissions from TUN permissions
permission denied only means that a specific operation was blocked. Check whether the error occurred while reading the config, writing a cache, executing the core, or creating a virtual network interface. The first cases usually involve file or directory permissions; check TUN and the client’s helper service first only for the last one.
- The log points to a config or cache: Make sure your account can read the file and write to the working directory specified by the client. If a portable version is in a protected installation directory, move it to a location your account can write to, as described in the project documentation, then test it without elevated privileges.
- It fails only when TUN is enabled: Turn off TUN and start the client once with the same config. If the local proxy port listens normally, focus on virtual network adapter and routing permissions. For clients that use a service mode, check the client documentation to confirm that the helper service is installed and can start. On a work- or school-managed device, ask your administrator to check the device policies.
- The system blocks the app: On Windows, check Windows Security → Virus & threat protection → Protection history. On macOS, check system alerts under System Settings → Privacy & Security. First verify the download source and that the app supports your OS version. Handle quarantine or block notices through your device administrator’s process. Don’t disable system protection just to test a startup crash.
If you only need the system proxy, leave TUN off for now and confirm the client starts reliably. Once normal startup and subscription loading work again, test TUN separately. This helps avoid mistaking a virtual network adapter issue for a subscription problem.
Step 5: Check for leftover services and startup conflicts
After uninstalling an old version or moving a portable directory, an old service, login item, or tray process may still be launching the core. Common signs include a port becoming occupied again right after you quit manually, or a listener appearing after reboot before you open the client. Repeatedly ending the process usually won’t help because the service that starts it is still running.
- Quit the current client from the tray first, then check the PID using the conflicting port again. If it’s still listening, inspect the executable’s file path to identify which client it belongs to. Don’t rely on the process name alone.
- On Windows, run
services.mscand compare the executable path in the service properties. Then check Task Manager → Startup apps for an old version set to launch at startup. On macOS, check for old apps and background items under System Settings → General → Login Items. - Only remove items you’ve confirmed belong to an old client. Prefer the client’s service uninstall option or the project’s uninstaller. Disable the corresponding old login item and reboot once. Check the port before launching the current client on its own. Don’t delete services or virtual network adapters if you can’t confirm what they belong to.
Restore your config one change at a time
Start with a minimal config and confirm that the interface opens, the core is running, and the expected port is listening on the current core. Then restore only the original subscription and see if it starts. Next, restore local overrides, then enable the system proxy and TUN as needed. If an error returns, save the first log entry from that step and undo that change. If the graphical interface still crashes with an empty config, include your OS and client versions, installation method, and system crash report when filing a bug. That’s much more helpful than simply saying the app won’t open.