Skip to content

[BUG] CLI authentication fails on Windows #706

@7ampon

Description

@7ampon

Description

Unable to log in via the Droid CLI on Windows. Selecting Login from the welcome screen results in an endless loop of "Authentication failed: Was there a typo in the url or port?".

Image

Environment

  • Droid version: 0.67.1
  • Bun version: 1.2.22 and 1.3.10 (tested on both)

Steps to Reproduce

  1. Install on Windows irm https://app.factory.ai/cli/windows | iex
  2. Run droid
  3. Select Login
  4. Authentication fails immediately with "Was there a typo in the url or port?"

What I've Tried

  • Fresh reinstall of latest version
  • Confirmed api.factory.ai and app.factory.ai are reachable
  • Set NODE_TLS_REJECT_UNAUTHORIZED=0
  • Set NODE_OPTIONS=--dns-result-order=ipv4first
  • Deleted ~/.factory and reinstalled

Relevant Logs

Authentication error:

MetaError: Authentication failed. Please log into Factory or set a valid FACTORY_API_KEY environment variable.
    at X6 (src/api/config.ts:30:13)
    at async z0 (../../packages/utils/src/api/fetch.ts:63:31)
    at async jIE (../../packages/droid-core/src/api/droid.ts:19:26)
    at async loadOrgLevel (../../packages/services/src/settings/SettingsManager.ts:547:39)
    at processTicksAndRejections (native:7:39)

and

ERROR: Failed to start authentication
 | Context: {"error":"Error: Was there a typo in the url or port?","tags":{"platform":"win32","version":"0.67.0","os":"win32 10.0.22631","terminal":"powershell","clientMode":"tui"}}

Telemetry socket failure

ERROR: Error flushing telemetry events to web: [Error: Was there a typo in the url or port?] {
  code: 'FailedToOpenSocket',
  path: 'https://api.factory.ai/api/telemetry/cli-ingest',
  errno: 0
}

Auto-update also fails:

ERROR: Failed to run auto-update | Context: {"error":"Error: Was there a typo in the url or port?"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions