Automation

Troubleshooting

Troubleshooting

The first move when anything misbehaves is to re-run with -d:

spogo -d <command>

Debug logs go to stderr and include engine choices, fallbacks, HTTP status codes, and request IDs. They will not pollute a --json or --plain pipeline.

#Auth

#no cookies found

spogo couldn't read cookies from the browser store. Check:

  1. You're actually logged in to https://open.spotify.com in that browser.
  2. You picked the right --browser-profile (Chrome's default is Default, but most users have Profile 1, Profile 2).
  3. spogo printed an underlying warning — recent versions surface the real reason (locked keychain, decryption failure, missing profile dir).

If browser-store reads keep failing, fall back to auth paste (see Auth).

#401 Unauthorized / 403 Forbidden from any read command

Cookies are stale. Re-import:

spogo auth import --browser chrome
spogo auth status

If that doesn't help, your browser's session may have expired. Visit https://open.spotify.com, log back in, then re-import.

#macOS Chrome keychain prompt

The first cookie import will trigger a "Chrome wants to use your confidential information from your keychain" dialog. Click Always Allow. If you mis-click Deny, fix it via:

Keychain Access → login → Passwords → search "Chrome Safe Storage" → right-click → Get Info → Access Control → + add spogo.

Chrome on WSL has a fragile DPAPI/Linux-keyring combo. Use auth paste instead:

  1. DevTools → Application → Cookies → https://open.spotify.com → copy sp_dc, sp_t.
  2. spogo auth paste.

#Playback

#no active device

Open Spotify on a phone, desktop, or Connect speaker once so it registers, or pass --device <name|id>:

spogo device list
spogo play spotify:track:... --device "Kitchen"

#403 PREMIUM_REQUIRED

Playback control (play, pause, seek, transfer, queue) requires a Spotify Premium account. spogo's read-only commands (status, search, library tracks list, etc.) work on free accounts.

#Volume command does nothing

Some Connect endpoints expose their own hardware volume and ignore Spotify's volume command. Try --device to a different target, or set the volume on the device itself.

#device set fails with "Connect state has no origin device"

Recent spogo versions auto-fall-back to the Web API transfer endpoint here. If you're on an older version, upgrade:

brew upgrade spogo

#Search & info

#Empty results for a search that should match

The internal GraphQL search uses query hashes that occasionally roll. spogo falls back to web search when a hash can't be resolved; if both fail, try:

spogo --engine web search track "your query"

#track info returns sparse data

Older spogo versions had Connect responses missing artist/album for some track shapes. Upgrade to the latest release.

#Rate limits

#429 too many requests

Should not happen on the connect engine for normal usage. If you see it:

  • You're on --engine web — switch to connect or auto.
  • You're hammering the API in a tight loop — add sleep 0.2 between calls, or batch via --limit.
  • Multiple spogo profiles are sharing the same Spotify account at the same time — the throttle is per-account, not per-process.

#Output

#Color codes leaking into a file

You're capturing stdout but spogo thinks stdout is a TTY. This shouldn't happen — spogo detects TTY correctly — but if it does, force off:

spogo --no-color status > out.txt
NO_COLOR=1 spogo status > out.txt

#jq complains the JSON is malformed

You're capturing stderr too. Redirect it:

spogo status --json 2>/dev/null | jq .

#Pipe is empty / silent

The command may be writing to stderr only (errors, prompts). Re-run without redirecting stderr to see what happened:

spogo <command>

#Engines

#"Connect engine returned X" — what does that mean?

Run with -d and look for the engine= line in the debug output. spogo logs which engine handled each call and any fallback that fired.

#AppleScript engine: "spotify not running"

Open Spotify.app first. AppleScript can't launch the app reliably; spogo expects it to already be open.

#AppleScript engine: search results differ from web

The Mac app uses local search. Switch to connect or web for canonical results.

#Diagnostics to share when filing an issue

spogo --version
spogo -d <failing command> 2> spogo.log

Attach spogo.log (redact any cookie values it contains) to a GitHub issue.