shadowsocks/shadowsocks-windows · warning · ArgumentException

Server IP can not be blank

Error message

Server IP can not be blank

What it means

ArgumentException thrown by CheckServer when the server address is null or empty. The remote Shadowsocks server IP or hostname is mandatory; without it the client cannot establish a connection. It is checked during server-config validation.

Source

Thrown at shadowsocks-csharp/Model/Configuration.cs:374

        }

        public static void CheckLocalPort(int port)
        {
            CheckPort(port);
            if (port == 8123)
                throw new ArgumentException(I18N.GetString("Port can't be 8123"));
        }

        private static void CheckPassword(string password)
        {
            if (string.IsNullOrEmpty(password))
                throw new ArgumentException(I18N.GetString("Password can not be blank"));
        }

        public static void CheckServer(string server)
        {
            if (string.IsNullOrEmpty(server))
                throw new ArgumentException(I18N.GetString("Server IP can not be blank"));
        }

        public static void CheckTimeout(int timeout, int maxTimeout)
        {
            if (timeout <= 0 || timeout > maxTimeout)
                throw new ArgumentException(
                    I18N.GetString("Timeout is invalid, it should not exceed {0}", maxTimeout));
        }
    }
}

View on GitHub (pinned to 891d971682)

Solutions

  1. Fill in the server IP or hostname (e.g. 1.2.3.4 or example.com).
  2. Re-import the full ss:// URL so the host is populated.
  3. Edit gui-config.json to set a non-empty server field and reload.

Example fix

// before
Configuration.CheckServer("");

// after
Configuration.CheckServer("example.com");
Defensive patterns

Strategy: validation

Validate before calling

if (string.IsNullOrEmpty(server)) {
    // block Save / report error before calling CheckServer
    return;
}

Try / catch

try { Configuration.CheckServer(server); }
catch (ArgumentException ex) { /* prompt the user for the server address */ }

Prevention

When it happens

Trigger: A server entry with a blank address field. An SS URL missing the host. The GUI Save action triggered before the server field was filled.

Common situations: Pasting only the password/port. The host field left at a default placeholder. Config import dropped the host segment.

Related errors


AI-assisted analysis of shadowsocks/shadowsocks-windows@891d971682 (2026-08-13). Data as JSON: /api/errors/e5b882804dc671b6. Report an issue: GitHub.