Start with the logs: distinguish an app exit from a core exit
Check the system tray or menu bar first, then Task Manager or Activity Monitor. If the window disappears but the tray menu still opens, the client may simply be set to minimize on startup. If the interface remains open while the logs repeatedly show the core exiting, check the core logs first. If both the app and core processes disappear, check the client logs; if no new client log was created, check the system crash reports.
Where to find the logs
- If the client still opens: Check the “Logs” section in the sidebar first. Some versions of Clash Verge Rev also let you open the log folder from “Log Directory” under “Settings.” Core logs help identify configuration parsing, listener, and TUN initialization issues. Client logs show which program was launched and which configuration file it received.
- Windows: Press Win + R, enter
eventvwr.msc, and open “Windows Logs” → “Application.” Find errors matching the client process name and crash time, then check the faulting module and exception code. A normal exit may not leave an Application error. - macOS: Open “Applications” → “Utilities” → “Console,” then look in “Crash Reports” by time and process name. You can also use Finder’s “Go to Folder” to open
~/Library/Logs/DiagnosticReports/and check for a matching report. - Linux: Launch the installed client from a terminal and capture standard error. You can also run
journalctl --user -b --since "10 minutes ago"to find the user's logs from the last ten minutes of the current boot. Output from desktop launchers may not be sent to the logging system.
| Error snippet | Check first |
|---|---|
bind: address already in use | The listening address, port, and protocol reported in the logs |
yaml: line 17 | Line 17 of the configuration file actually loaded, plus the preceding section |
exec: no such file or directory | The kernel path named in the error; if it exists, check the runtime environment |
permission denied | Which operation failed: executing a program, writing a file, or creating a TUN interface |
Port conflict: find the process listening on the reported port
If you see listen tcp 127.0.0.1:7890: bind: address already in use, check TCP port 7890 first instead of changing every port. mixed-port is the shared HTTP and SOCKS proxy listener; external-controller is a separate listener for the control interface. The example below uses 7890; use the port shown in your logs when troubleshooting.
Windows: Find the port and PID
Get-NetTCPConnection -LocalPort 7890 -State Listen |
Select-Object LocalAddress, LocalPort, OwningProcess
In Task Manager’s “Details” tab, match the PID against OwningProcess. If the log reports UDP, run Get-NetUDPEndpoint -LocalPort 7890; an empty TCP query doesn’t mean the port is free. On macOS, run lsof -nP -iTCP:7890 -sTCP:LISTEN; on Linux, run ss -ltnp 'sport = :7890'. The process details you can see depend on your account permissions.
- If another proxy client is using the port, exit it from its tray menu and try again. If it’s a background service from an older client, confirm which app owns it, then stop it through that client’s service management settings.
- If you need to keep both programs running, change the conflicting setting in the current client’s port settings or persistent overrides. For example, change
mixed-portfrom7890to the confirmed-available7891, then update the proxy port in any manually configured system proxy, browser, or terminal settings. - After restarting, check the new logs and listening process. If the conflicting setting is
external-controller, change only the control interface and its clients. Keep the existing bind scope and authentication settings; there’s no need to change the browser proxy port.
YAML configuration errors: check the file actually passed to the core
The original subscription, client overrides, and final runtime configuration passed to the core may all differ. Find the configuration path in the startup logs, back up the subscription and override files, then locate the problem. Use the runtime config for comparison; if it’s regenerated at every startup, apply the fix to a local override or the original configuration instead.
did not find expected key: Check the reported line and the lines above it. Use spaces for indentation and align items at the same level. Also look for missing quotes, colons, or hyphens before list items. The parser’s reported location may be different from where the mistake was made.cannot unmarshal: The syntax may be valid, but a field has the wrong type. For example,mixed-portshould be an integer andrulesshould be a list. Don’t append another top-level key with the same name at the end of the file to override the existing value.- Policy group not found: Check that the policy name at the end of the rule matches a defined group. If a subscription update removed the
PROXYgroup, update any local rule such asMATCH,PROXYas well.
Validate a local copy with the same version of mihomo
If the client uses mihomo, prepare a test directory writable only by your account, and use the same core version as the client. The PowerShell example below assumes the current directory contains the matching mihomo.exe and the file to test, check.yaml, and that you’ve created a check-data directory. If the configuration references local files such as rule sets, preserve their relative paths in the test directory; otherwise, missing-file errors may be caused by the test setup.
.\mihomo.exe -t -d .\check-data -f .\check.yaml
$LASTEXITCODE
If the original configuration fails and the cause isn’t clear, save a copy of the baseline configuration below and test it first. It uses only DIRECT to distinguish basic configuration issues from subscription problems; it does not test nodes. Passing the -t check doesn’t confirm that a port can be bound or that TUN permissions are available. Those require an actual startup.
mixed-port: 7890
allow-lan: false
mode: rule
log-level: info
rules:
- MATCH,DIRECT
Missing core files: check the path and system architecture
If the client log gives an executable path and reports file not found, check whether the file exists in that directory. Don’t search only for mihomo.exe: some clients bundle a renamed core or install a separate service component. Compare the install locations before and after the upgrade, confirm the shortcut points to the current version, and distinguish a missing core file from a configuration file the core can’t find after it starts.
- The file is missing: Back up your subscription, override files, and any required local rules. Then restore the core through the client’s core management settings, or reinstall a client version that includes a compatible core. Don’t rename an executable from another distribution and overwrite the existing one; the client may rely on specific launch arguments and a particular control interface.
- The file exists but won’t run: On Windows, open “Settings” → “System” → “About” and check the system type to distinguish x64 from ARM64. On macOS, open the Apple menu → “About This Mac” to see whether it has Apple silicon or an Intel processor. On Linux, run
uname -mto check the architecture. If the path exists but the system still reports that the file can’t be found, a missing dynamic loader may be the cause. - The file disappears after installation: Check your security software’s quarantine history and confirm the exact file path and time. Don’t disable system protection as a fix. Verify the software’s source, then follow your operating system’s or organization’s security procedures.
Permission errors: distinguish data directory access from TUN
open ... permission denied and operation not permitted when creating a TUN interface occur at different stages. For the former, check the file or parent directory named in the error. For the latter, first confirm that a standard proxy can start. Always running the client as an administrator can mask ownership problems and cause another failure when it’s later launched as a regular user.
- Can’t open the configuration or write to the cache: Confirm that your account can read the configuration and create a test file in the data directory named in the logs. If an old data directory has the wrong owner, back it up first, then move any data supported by the client into a directory your account can write to. Don’t recursively loosen permissions across the installation or system directories.
- Fails only when TUN is enabled: If the client opens, look for the “TUN Mode” toggle near “System Proxy” or the network settings, turn it off, and try again. The exact label varies by client. To test mihomo with a local copy, set
enabletofalsein the existingtunsection; don’t add a secondtunsection. If the standard proxy starts, check the service mode or system authorization steps provided by the client. - Linux TUN initialization fails: Check whether the error specifically mentions
/dev/net/tun, and distinguish a missing device from one that can’t be accessed or insufficient permission to modify routes. Containers and managed hosts may restrict these capabilities. Use the device and service configuration allowed by the platform instead of granting the client elevated privileges across the system.
Verify the fix: start the client, then restore features one at a time
Restore one setting at a time. Exit the old instance, start the client with the fixed configuration, and confirm that the UI opens, the core process stays running, and the expected port belongs to the current core. Then enable system proxy or TUN as needed, keeping the new logs from each step. If the client starts before you import a subscription but fails afterward, compare the final configurations and check newly added ports, policy groups, and rule references first.
If the standard proxy starts but the client exits as soon as TUN is enabled, revisit permissions and service settings. If even a minimal configuration won’t start and no core log is created, focus on the client’s crash reports and the core’s executable path. If your browser keeps trying to connect to an old local port after you close the client during testing, check the system proxy settings. Remove only the loopback address and port left over from this troubleshooting session; keep any existing corporate proxy settings.