affaan-m/ECC · error

--no-browser is valid only for ecc ito login; auth is valida

Error message

--no-browser is valid only for ecc ito login; auth is validation-only.

What it means

Thrown by parseArgs at scripts/ito.js:170-172 when the command is 'auth' and --no-browser is present in the remaining args. Per the help text (ito.js:45), `ecc ito auth` is validation-only and never starts device login, so a browser-suppression flag is meaningless for it. --no-browser is only valid for `ecc ito login`, which is the device-authorization flow that opens the Itô verification page by default.

Source

Thrown at scripts/ito.js:171

      "Itô compute has no paper or dry-run success mode. No CLI operation was invoked."
    );
  }

  const jsonIndexes = args
    .map((value, index) => (value === "--json" ? index : -1))
    .filter((index) => index >= 0);
  if (jsonIndexes.length > 1) {
    throw new Error("--json may only be provided once");
  }
  const withoutJson = args.filter((value) => value !== "--json");
  const command = withoutJson.shift();
  if (!SUPPORTED_COMMANDS.includes(command)) {
    throw new Error(
      `Unsupported Itô command "${command || "(missing)"}"; ECC permits only login, logout, auth, find, status, and evals.`
    );
  }
  if (command === "auth" && withoutJson.includes("--no-browser")) {
    throw new Error("--no-browser is valid only for ecc ito login; auth is validation-only.");
  }
  if (command === "evals") {
    validateNodeQualificationArgs(withoutJson, environment);
  }

  return Object.freeze({
    help: false,
    invocationArgs: Object.freeze([
      ...(jsonIndexes.length === 1 ? ["--json"] : []),
      command,
      ...withoutJson,
    ]),
  });
}

function resolveItoExecutable(environment = process.env) {
  const configured = environment[EXECUTABLE_OVERRIDE]?.trim();
  if (!configured) {

View on GitHub (pinned to 01e15490f0)

Solutions

  1. Drop --no-browser when running auth: `ecc ito auth` (validation-only, no browser is ever opened).
  2. If you actually want device login without a browser handoff, use `ecc ito login --no-browser`.

Example fix

// before
$ ecc ito auth --no-browser
// after
$ ecc ito auth
Defensive patterns

Strategy: validation

Validate before calling

function buildItoArgs(command, extra) {
  if (command === 'auth' && extra.includes('--no-browser')) {
    throw new Error('--no-browser is not valid for auth; use it only with login');
  }
  return [command, ...extra];
}

Prevention

When it happens

Trigger: `ecc ito auth --no-browser`; `ecc ito --json auth --no-browser`. Any invocation where command === 'auth' and withoutJson.includes('--no-browser').

Common situations: Operator runs `ecc ito auth --no-browser` thinking auth also opens a browser; or copies the login invocation and only swaps the subcommand. Auth-only scripts sometimes blindly pass --no-browser to suppress UI on every ito subcommand.

Related errors


AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13). Data as JSON: /api/errors/46b0c844ab59533f. Report an issue: GitHub.