v2rayN and v2rayNG Crash on Startup: Fix Missing Runtimes, Permission Issues, and Corrupt Configs

Troubleshoot startup crashes by checking .NET runtimes and extraction paths on Windows, VPN permissions and battery restrictions on Android, then resetting corrupt configs.

At a glance

First identify whether the main window closes, the core fails to start, or a background service stops. On Windows, check the runtime, complete extraction, and folder write permissions in that order. On Android, confirm VPN permission first, then check background battery restrictions. Reset the config only if a clean setup starts normally but restoring the old one causes the app to close. Back up first, and change one thing at a time.

1. Identify When the App Exits Before Clearing Data

Note when it happens, then reproduce the issue once. A true startup crash means the main window or entire process disappears as soon as you open the app. An error after tapping Connect, pages that won't load, or a connection that drops after locking the screen are different problems. v2rayN is a desktop client; its core is a separate program that handles network connections. If the core exits while the main window stays open, the client itself hasn't necessarily crashed. Windows steps below use Windows as the example.

Main app starts Config loads Core loads Proxy takes over Runs in background
What you observeCheck firstDon't do this yet
No window appears after double-clicking, or it closes immediatelyRuntime, app architecture, application error logsKeep changing subscriptions
Main window works; an error appears only after you click ConnectCore files, ports, node configAssume the desktop runtime is missing
On Android, tapping Connect returns to a disconnected stateVPN permission, other VPN apps, service logsClear app storage immediately
Connection stops after the screen has been locked for a whileBackground activity and battery restrictionsTreat it as a crash on first launch

On Windows, check whether the app icon is still in the taskbar notification area, then look for the process under Task Manager → Details. If the process remains after you close the window, the app may simply be minimized to the notification area. Note the client version, Windows or Android version, and whether it closes on launch or only when connecting. These details can quickly narrow down the cause.

2. v2rayN Won't Open? Check the .NET Desktop Runtime and Architecture

If a startup message says .NET needs to be installed, address that first. .NET is the runtime environment required by managed apps; Windows desktop apps commonly use the Desktop Runtime. Having only the SDK or a different runtime installed doesn't mean this app's requirements are met. If the package is self-contained and includes its own runtime, this step may not apply.

  1. Read the startup message

    Note the Framework, Version, and Architecture in the message. For example, if it asks for Microsoft.WindowsDesktop.App, 8.0.0, and x64, check for the matching .NET 8 Desktop Runtime rather than installing an arbitrary newer major version.

  2. Check installed runtimes

    Open Terminal or PowerShell and run the command below. Look for the version listed under Microsoft.WindowsDesktop.App. If the command itself isn't available, check the package documentation and startup message too; the missing command alone doesn't prove the app is broken.

  3. Check the app architecture

    Go to Windows Settings → System → About and check System type. Make sure the client package and runtime match the architecture you're actually running. x64 and ARM64 aren't interchangeable just because both are 64-bit.

  4. Install and try again

    Install the required Microsoft Desktop Runtime as specified in the release notes, close any existing process, then reopen the app. Major runtime versions aren't generally interchangeable; compatibility across major versions depends on the app's runtime configuration.

dotnet --list-runtimes

If the app folder contains v2rayN.runtimeconfig.json, you can open it in a text editor to check the declared framework and version, but don't edit it just to dismiss the message. The .NET 8 version above is an example of how to read the prompt, not a requirement for every v2rayN release. If no prompt appears, press Win + R, enter eventvwr.msc, and go to Windows Logs → Application. Check for entries from .NET Runtime or Application Error around the time of the crash.

3. Extract All Files Before Running; Check Permissions and Core Files

Extract the complete archive to a separate folder your account can write to, such as C:\Users\Public\Documents\v2rayN-test, then launch the main program from there. Don't run it directly from the archive preview or copy just the executable. The main app may depend on files, resources, and core binaries in the same folder; a missing file can stop startup.

If the app starts from a clean folder but not the original one, the system runtime is likely usable; compare the old config and files next. If both copies exit at the same startup stage, check the runtime, architecture, and system error logs first. There's no need to rush into restoring the subscription.

4. Follow the Actual Error; Don't Mistake Connection Failures for Crashes

Keep the first error and a few lines around it. A string of shutdown messages that follows may only be a consequence of the original failure. The errors below may include a file path, port, or exception prefix; use the actual log to investigate rather than searching only for the last line.

Error: You must install or update .NET to run this application.

Cause: The required .NET runtime wasn't found. Fix: Check the framework name, version, and architecture in the same message, install the matching runtime, then restart the app.

Error: Access to the path is denied.

Cause: The process can't access the specified file or folder. Fix: Check whether the path belongs to the config or log folder, try a writable location, and review protection history and file permissions.

Error: Only one usage of each socket address (protocol/network address/port) is normally permitted.

Cause: Another process is already using the address and port the app needs to listen on. Fix: Identify the process and close any duplicate instance. If you change the port, update the settings of apps that use this local proxy too.

Error: System.Text.Json.JsonException

Cause: The JSON data doesn't match the expected format, or the config structure may be incompatible with this version. Fix: Use the path and position in the exception to identify the file. Back it up and test with a fresh config; don't delete the entire user folder.

If the log explicitly says binding to local port 10808 failed, run the query below in Terminal. This port is just an example for troubleshooting, not a fixed default for every version. The last column is the PID, or process ID; find the matching app under Task Manager → Details. Don't terminate an unknown system process.

netstat -ano | findstr :10808

If you confirm that the client was opened twice, keep just one instance running. If you need to run multiple instances, go to v2rayN Settings → Parameter Settings and change the local listening port for your version to another free port, then restart the core. Note the old value first. If system proxy settings or other apps still point to the old port, you'll get a new problem: the app stays open but can't connect.

5. v2rayNG Exits After You Tap Connect? Check VPN Permission First

v2rayNG is an Android client that uses the Xray core. It routes device traffic through Android's VPN service. The system VPN connection prompt asks for permission on this device; it's not a subscription login. If you tapped Cancel the first time you connected, the service usually won't start, but that alone doesn't mean the app's main process crashed.

  1. Stop other VPN connections

    Stop other apps using the system VPN connection before opening v2rayNG. Typically, only one service can control the regular VPN connection for an Android user or work profile at a time.

  2. Request permission again

    Select a valid config and tap Connect. When the system's Network connection request appears, read the prompt and confirm. If it doesn't appear, check for an existing connection in the system VPN settings.

  3. Check always-on VPN settings

    On stock Android 14, go to Settings → Network & internet → VPN and check whether another app has Always-on VPN or Block connections without VPN enabled. Note the original settings before changing them, and adjust only as needed.

  4. Tell the two types of exit apart

    If the main screen stays open after a connection fails, check the service or core error first. If the main screen disappears and you're returned to the home screen, note the app version, system version, and crash time. Menu names vary by manufacturer; search for VPN in system settings if needed.

If the app closes as soon as you open it, before connecting, VPN permission usually isn't the first thing to check. Confirm that the package architecture suits your device, there's enough free storage, and whether the problem started just after an upgrade or data restore. Back up any exportable config before testing another package; uninstalling can erase useful diagnostic clues.

6. Connection Stops After Screen Lock? Check Battery and Background Restrictions Separately

Test for about five minutes with the screen on, then lock it for the same amount of time and note whether the connection notification disappears. This is a comparison test, not a promise of device performance. If the connection stops only when the screen locks or the app goes into the background, check system background restrictions first—not .NET or the node protocol.

Where do I change settings if the connection drops as soon as I lock the screen?

On stock Android 14, go to Settings → Apps → See all apps → v2rayNG → App battery usage and select Unrestricted. Some manufacturers call this Allow background activity. Reconnect, then compare behavior with the screen on and locked.

How can I tell if Battery Saver is causing the problem?

Temporarily turn off Battery Saver and retest without changing anything else. If the issue goes away, check whether your device lets you relax background restrictions for v2rayNG specifically. Don't change every battery setting at once.

The notification disappeared. Does that mean the service crashed?

Open the app and check its connection status, then check the system VPN status. On Android 13 and later, notification permissions affect whether notifications appear; a missing notification doesn't mean the service stopped. Check permission under Settings → Apps → v2rayNG → Notifications.

The connection drops after I swipe the app away from Recents. Is that a crash?

That's different from a crash during normal use. Some systems restrict background services when clearing recent apps. Don't swipe the app away yet; run a screen-lock test first, then check your manufacturer's background activity and auto-start settings.

Battery optimization affects whether the app stays alive in the background; it won't fix a malformed node config. If the log already shows authentication failure or a connection timeout, check node settings, the network path, and subscription status instead. Don't blame every Android connection issue on the system killing background apps.

7. Reset the Config Only as a Last Resort; Restore One Item at a Time

Suspect a corrupt or incompatible config only if a clean config starts but restoring the old one reliably makes the app exit. A subscription is an address for retrieving a list of nodes, not a backup of all client settings; saving the subscription link alone usually won't preserve routing, UI options, or custom settings. Backups may contain connection credentials, so store them somewhere secure.

  1. Keep an untouched backup

    On desktop, exit the main app and core first. For a portable install, you can copy the entire program folder. If that version stores data in your user folder, back up the actual data location as described in the logs or release notes; copying only the main program isn't enough.

  2. Set up a clean environment

    On desktop, test with a separate new folder and fresh data without importing the old database right away. Note that a new folder may still reuse user-level data. On Android, export the needed config if you can open the main screen. If you can't export it, don't clear storage yet.

  3. Restore one item at a time

    Restore one known-good node first, then test starting and stopping. Add the subscription next, followed by custom routing and TUN settings. Restart after each change and note the step that first reproduces the crash.

  4. Verify each restore

    Check that the main screen opens, a connection can be established, and the app can start again after stopping. On Android, also test with the screen locked. On Windows, check that the system proxy points to the current listening port.

If the app still crashes in a clean environment, gathering evidence is more useful than resetting it repeatedly. Note the version, architecture, OS version, exit time, and steps to reproduce. On Windows, include the relevant event log; on Android, include any crash details you can retrieve. Before sharing, redact subscription addresses, user IDs, server credentials, and private file paths. This information can help determine whether you need a missing runtime, a permissions fix, or a fix for a version-specific bug.

Download the client