Skip to content

bug: superset auth login hangs silently on headless servers when xdg-open is missing #3949

Closed

Description

@johrld

Summary

superset auth login hangs forever on headless Linux servers (the typical CLI use case). The user sees only:

┌  superset auth login
│
◒  Waiting for browser authorization...

…and the spinner spins indefinitely with no actionable hint.

Reproduce

  1. Install Superset CLI on a headless Linux box where xdg-open is not in $PATH (Hetzner ARM, AWS Graviton, Pi, vanilla Ubuntu Server, etc.).
  2. Run superset auth login.
  3. Observe: spinner runs, no URL printed, login never completes.

Root cause

packages/cli/src/lib/auth.ts:

async function openBrowser(url: string): Promise<void> {
  const { exec } = await import("node:child_process");
  switch (process.platform) {
    case "darwin": exec(`open "${url}"`); break;
    case "win32":  exec(`start "" "${url}"`); break;
    default:       exec(`xdg-open "${url}"`); break;
  }
}

exec(...) is fire-and-forget — its error is never observed. On systems without xdg-open it silently fails and the login URL is never surfaced.

Proposed fix

Surface the URL through a new optional onAuthUrl(url) callback on login(). The command layer prints it via p.log.info(...) right before the browser is launched — works on TTY (clack interleaves with the spinner) and headless alike. Browser auto-launch is unchanged for GUI users.

PR with the fix coming next.

Workaround until merged

mkdir -p /tmp/wrap
printf '%s\n' '#!/bin/bash' 'echo "AUTH_URL: $1"' > /tmp/wrap/xdg-open
chmod +x /tmp/wrap/xdg-open
PATH=/tmp/wrap:$PATH superset auth login

Then ssh -L 51789:localhost:51789 <host> from your workstation and paste the printed URL into your local browser; the OAuth loopback callback completes through the tunnel.

Related

Activity

  1. added a commit that references this issue on May 1, 2026
  2. johrld commented on May 2, 2026

    @johrld
    Author

    Looks like #3965 (cross-device login via OAuth code + PKCE, merged 2026-05-01) ships exactly the URL-surfacing this issue asked for — plus a paste-back fallback for SSH/CI. onAuthorizationUrl(url, mode) callback prints "If the browser didn't open, visit: <url>" via p.log.message. Closing as fixed by #3965.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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