Fix "Google Chrome opens but my profiles are gone" on macOS — in one command.
A headless Google Chrome.app process (from Playwright, Puppeteer, Selenium,
agent-browser, or an AI agent's browser tool) can shadow your real Chrome so its
window and profile picker never appear. fix-chrome-lock clears it instantly.
- Chrome opens but all your profiles are missing / the profile picker is empty.
- Clicking Chrome does nothing, or only re-focuses an existing (invisible) instance.
- Chrome opens a blank/fresh window with none of your logins after running browser automation.
- Happens after a Playwright / Puppeteer / Selenium / agent-browser run, or an AI coding agent that drives Chrome headlessly.
- You checked and it is not a corrupt profile — the data is all still there.
On macOS, only one instance of an application bundle activates at a time. When a
headless process started from /Applications/Google Chrome.app is running —
typically from automation tooling that points at the primary Chrome install instead
of Chrome for Testing — macOS considers Chrome "already running." Clicking Chrome
then just re-activates the invisible headless process, so your window and profile
picker never appear.
It is not a corrupt profile and usually not even a stale lock file — it's a live headless process shadowing your real Chrome.
The script is pure POSIX sh with a #!/bin/sh shebang, so it runs the same
whether your login shell is zsh, bash, dash, or fish — nothing to configure.
One-liner (curl):
curl -fsSL https://raw.githubusercontent.com/kylebrodeur/fix-chrome-lock/main/bin/fix-chrome-lock \
-o ~/.local/bin/fix-chrome-lock && chmod +x ~/.local/bin/fix-chrome-lockOr clone the repo:
git clone https://github.com/kylebrodeur/fix-chrome-lock.git
ln -sf "$PWD/fix-chrome-lock/bin/fix-chrome-lock" ~/.local/bin/fix-chrome-lockMake sure ~/.local/bin is on your PATH. For zsh:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrcPrefer a single-file gist? Mirror: https://gist.github.com/kylebrodeur/b0e6e34924434cc9d47c269ff3938175
fix-chrome-lock # kill headless shadow instances + clear stale locks
fix-chrome-lock -o # ...and relaunch Chrome afterward
fix-chrome-lock -n # dry run — show what it would do, change nothing
fix-chrome-lock -h # help- Finds every
Google Chrome.appprocess running with--headlessand terminates it (SIGTERM, then SIGKILL for stragglers). - If no GUI Chrome is running, removes stale
SingletonLock/SingletonCookie/SingletonSocketfiles from your profile directory. - Optionally relaunches Chrome (
-o).
- Only kills Chrome processes that carry
--headless. - Never touches your normal (GUI) Chrome or a separate Chrome for Testing install.
- Only removes
Singleton*locks when no GUI Chrome is running (a live Chrome legitimately holds them). - The process match targets the bundle's
/Contents/executable path, so the scan can never match its ownawkcommand line.
Point your automation at Chrome for Testing (a distinct app bundle) instead of
the primary /Applications/Google Chrome.app, so headless runs can never shadow
your daily browser. fix-chrome-lock is for the times you forget — or when a tool
you don't control makes that choice for you.
macOS. No bash required — pure POSIX sh (uses only ps, awk, kill, open).
MIT — see LICENSE.
Keywords: macOS Chrome profiles missing, Chrome won't open, Chrome already running, headless Chrome shadow, Playwright Chrome profile, Puppeteer, Selenium, agent-browser, SingletonLock, Chrome for Testing, kill headless Chrome.