diegosouzapw/OmniRoute · error · Error

Sudo password required

Error message

Sudo password required

What it means

Input guard in runSudoShell: the caller-supplied sudo password is empty or whitespace-only after trimming. Every privileged Tailscale operation (daemon start, funnel setup) funnels through this helper, so a blank password cannot be passed to `sudo -S` and is rejected before any process spawns.

Solutions

  1. Provide the account's sudo password in the API request
  2. Ensure passwordless sudo is configured if prompting is undesirable
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/lib/tailscaleTunnel.ts:536 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/84bbf00fd8318ca2. Report an issue: GitHub.

Appendix: source

Thrown at src/lib/tailscaleTunnel.ts:536

  else if (!check.installed) phase = "not_installed";
  else if (running) phase = "running";
  else if (check.daemonRunning && !check.loggedIn) phase = "needs_login";
  else if (check.lastError) phase = "error";

  return {
    ...check,
    running,
    enabled,
    tunnelUrl,
    apiUrl: getTailscaleApiUrl(tunnelUrl),
    phase,
  };
}

async function runSudoShell(command: string, password: string) {
  const normalizedPassword = password.trim();
  if (!normalizedPassword) {
    throw new Error("Sudo password required");
  }
  await execFileWithPassword("sudo", ["-S", "sh", "-c", command], normalizedPassword);
}

export async function startTailscaleDaemon({
  sudoPassword,
}: {
  sudoPassword?: string;
} = {}) {
  const resolution = await resolveBinary();
  if (!resolution.binaryPath) {
    throw new Error("Tailscale is not installed");
  }

  // Invalidate socket cache so we re-probe the system socket
  invalidateSocketCache();

  // Check if the system daemon is already running (e.g. via systemd)

View on GitHub (pinned to a179ffed5b)