Panniantong/Agent-Reach · warning · SystemExit

No cookies found. Make sure you're logged into the platforms

Error message

No cookies found. Make sure you're logged into the platforms in {browser}.

What it means

After a --from-browser extraction run, if every platform attempt reports failure (found_any stays False), the CLI prints 'No cookies found. Make sure you're logged into the platforms in <browser>.' and exits 1. The per-platform '-- <platform>: <message>' lines above it carry the specific reasons.

Source

Thrown at agent_reach/cli.py:1435

                targets = getattr(result, "targets", ())
            else:
                legacy_result = cast(tuple[str, bool, str], result)
                result_platform, success, message = legacy_result
                targets = ()
            if success:
                print(f"  ✅ {result_platform}: {message}")
                if targets:
                    print(f"     写入:{', '.join(targets)}")
                found_any = True
            else:
                print(f"  -- {result_platform}: {message}")

        print()
        if found_any:
            print("✅ Cookies configured! Run `agent-reach doctor` to see updated status.")
        else:
            print(f"No cookies found. Make sure you're logged into the platforms in {browser}.")
            raise SystemExit(1)
        return

    # ── Manual configure ──
    if not args.key:
        print("Usage: agent-reach configure <key> [--stdin]")
        print("   Omit the value to enter it through a hidden prompt.")
        print(
            "   or: agent-reach configure --from-browser chrome "
            "--platform xueqiu"
        )
        return

    value = _read_configure_value(args)
    if not value:
        print(f"Missing value for {args.key}")
        raise SystemExit(1)

    if args.key == "proxy":

View on GitHub (pinned to 93ae1d18c3)

Solutions

  1. Log in to the target platform(s) in the named browser, quit the browser completely, then re-run
  2. Read the per-platform '--' lines above the error — they state the actual failure per platform
  3. If you use multiple profiles, re-run with --profile matching the profile that has the logins
  4. Fall back to manual configuration via Cookie-Editor export and `agent-reach configure <key> --stdin`
Defensive patterns

Strategy: validation

Validate before calling

# Pre-flight in the shell before extraction:
#   1. browser fully quit? (pgrep -x chrome && echo 'close chrome first')
#   2. logged in? open the platform in that browser and confirm the session
#   3. correct profile? ls ~/Library/Application\ Support/Google/Chrome/ | grep ^Profile

Try / catch

# Treat exit 1 + 'No cookies found' as a soft failure with a hint, then fall back:
#   agent-reach configure --from-browser chrome --platform xueqiu \
#     || agent-reach configure xhs-cookies --stdin < cookie-editor-header.txt

Prevention

When it happens

Trigger: `agent-reach configure --from-browser chrome` while not logged into any requested platform in that browser, or while every extraction path fails (locked cookie store, unsupported platform combination), so no platform yields a success result.

Common situations: User is logged in under a different Chrome profile than the default one scanned; browser was running and its cookie DB was locked; user asked for --platform xueqiu but is only logged in on Firefox; Safari on newer macOS requiring full-disk access for the terminal.

Related errors


AI-assisted analysis of Panniantong/Agent-Reach@93ae1d18c3 (2026-08-14). Data as JSON: /api/errors/d5c3996e32105d3d. Report an issue: GitHub.