# Chromium keychain prompt on Mac: why it keeps coming back

> Chromium reads its Chromium Safe Storage keychain item at startup. Our prompts never came from app launches: scripts started browsers without the flags.

Source: https://mosaicbrowser.com/blog/keychain-prompt

## Chromium's keychain prompt on a Mac, and where ours came from

Chromium reads its Chromium Safe Storage keychain item at startup. Our prompts never came from app launches: scripts started browsers without the flags.

![The prompt came from scripts, never from launches, beside a screenshot: the Mosaic sidebar with profiles running, each with its own window](https://mosaicbrowser.com/covers/keychain-prompt.webp)

The Chromium keychain prompt on a Mac is the browser reading its `Chromium Safe Storage` item at startup and macOS not recognising the program that asked. Ours kept appearing, and every one of them came from something that started a browser without going through Mosaic's launcher. Profiles launched by the app already carried the two flags that prevent it.

## The dialog, word for word

```
"Tesseract" wants to use your confidential information stored in
"Chromium Safe Storage" in your keychain.

```

It was reported as arriving again and again, with the right diagnosis attached: it seemed to show up mostly while we were testing. The sentence names two products because `Chromium Safe Storage` is compiled into the binary rather than written in a translatable string, so renaming our Chromium build to Tesseract Chrome never reached it.

## Why the Chromium keychain prompt on a Mac keeps coming back

The keychain hands over an item without asking only to code identities on that item's access list. Clicking Always Allow adds the identity that asked. With a stable signing certificate, that identity carries over to the next build. With ad-hoc signing it is not: the signature is a hash of the bundle's contents, so a different bundle is a different application.

Every bundle we start is a different bundle. Profiles launch under one of a few pooled launcher bundles, one per window slot (the [Dock tile per slot](https://mosaicbrowser.com/blog/dock-tile-per-slot) post has why), and each is re-dressed for the profile it opens. So the grant from one launch does not cover the next, and nothing converges. A stable signing identity would fix that, and an ad-hoc bundle does not have one.

The prompt is also worse than an interruption. Chromium makes the keychain call on its main thread, before the first window. The process sits in `SecItemCopyMatching` until somebody answers, so a missing flag looks like a hang with no error. That is how we first met it: a finished build that wrote `Local State`, opened no window and used 0% CPU.

Mosaic is a desktop app

Email yourself the link and open it on your computer.

[How it works: Fingerprints set inside the browser](https://mosaicbrowser.com/features/engine)

## Two flags, because each works on one platform

`baseArgs()`, the function every launch goes through, passes `--use-mock-keychain` and `--password-store=basic`. We checked both names against the binaries with `strings`, exact-line matches:

| Switch | Tesseract Framework | Google Chrome Framework |
| --- | --- | --- |
| `use-mock-keychain` | 1 | 2 |
| `password-store` | 0 | 0 |

They are not alternatives. `--password-store` is the Linux keyring switch; macOS accepts it and does nothing with it, without a word. `--use-mock-keychain` is the macOS one. Either flag alone is correct on one platform and quietly inert on the other, which is a fault this codebase keeps meeting ([silently ignored flags](https://mosaicbrowser.com/blog/silently-ignored-flags) collects the others). So they travel together, from one array: `KEYCHAIN_FREE_FLAGS` in the app and `scripts/lib/keychain-free.mjs` for scripts.

Chromium honours the last copy of a switch. Mosaic therefore applies its two flags again after a profile's own extra arguments, so a pasted `--password-store=` cannot hand the keychain back.

## Where the prompts really came from

We read the live command line of a profile started through the app. Both flags were there. The prompts came from three places that start a browser on their own:

- `compare-with-stock.mjs`, which runs a real Google Chrome as the control in our stock comparison.
- `make-installer-art.mjs`, which renders the disk-image artwork in a headless browser.
- Throwaway probe scripts, written the day before while we chased macOS notification banners.

None of them went through the launcher, so none of them had the flags.

## No single fix point, so we wrote a check

A script that starts a browser is something somebody writes in an afternoon, and it will keep happening. `check:keychain` runs in every build. It asserts that the app's list and the scripts' list agree, that `baseArgs` spreads them, that a profile's `extraArgs` cannot override them, and that every browser command line under `scripts/` carries them, spelled as the shared constant rather than a copy.

Writing it took two tries to see every script. Looking for the first `]` after a `spawn(` call found four of six, because an `args[0]` inside the command line closed the bracket early. Looking for `spawn(` at all found five, because one script builds `const args = [...]` and spawns it later. The check now starts at `--user-data-dir` and walks out to the array that contains it, wherever that array is used. It also refuses to pass if it finds fewer than six, so a detector that quietly stops finding files fails instead of reporting a clean repository.

## Measured after

Both changed command-line shapes, started for real and off-screen:

```
Tesseract       DevTools up in 1639ms    SecurityAgent 0 → 0
stock Chrome    DevTools up in 3939ms    SecurityAgent 0 → 0

```

`SecurityAgent` is the process macOS starts to draw the dialog. It did not start. We did not run the case without the flags, because proving it would have put the dialog on the screen of the person who asked for it to stop.

If you run Chromium yourself and want the prompt gone, `--use-mock-keychain` does it on a Mac. Know the cost first: your cookies are then encrypted under a password anyone can look up. What that exposed on our disk, and how [Tesseract Chrome](https://mosaicbrowser.com/features/engine) gets a per-profile key instead, is in [Chromium's mock keychain](https://mosaicbrowser.com/blog/mock-keychain-cookies).

## Questions

### Why does Chromium ask to use Chromium Safe Storage in my keychain?

Chromium keeps the password that encrypts cookies and saved passwords in the login keychain, under an item called Chromium Safe Storage. It reads it at startup. If macOS does not recognise the app asking, it shows an access dialog.

### Why does Always Allow not stop the Chromium keychain prompt?

Always Allow grants the code identity that asked. An ad-hoc signed build gets a new identity whenever its contents change, so the next build, or the next launcher bundle, is a stranger to the keychain and asks again.

### Which flags stop Chromium from reading the macOS keychain?

--use-mock-keychain on macOS. --password-store=basic is the Linux keyring switch and macOS ignores it without a warning, so pass both if one script runs on both. The cost is that cookies are then encrypted with a fixed, public password.

### Can a profile in Mosaic bring the keychain prompt back?

No. Mosaic applies its two keychain flags after a profile's own extra arguments, so a pasted --password-store switch cannot replace them.

## Related

[Chromium's mock keychain, and why we encrypt the store](https://mosaicbrowser.com/blog/mock-keychain-cookies): Chromium's --use-mock-keychain keeps cookie encryption on but uses a password from its own source. We read a live session cookie off disk, then sealed it.

[One Dock tile per window slot, and a banner we can't stop](https://mosaicbrowser.com/blog/dock-tile-per-slot): macOS gives one Dock tile per app identity, and greets each new one with a banner. We pool identities by open window: five, not one per profile.

[A silently ignored flag looks exactly like a working one](https://mosaicbrowser.com/blog/silently-ignored-flags): Chromium accepts an unknown command line switch without a word. Two of our WebRTC flags never existed, and a renamed feature did nothing for months.

[An anti-detect browser with its own Chromium engine](https://mosaicbrowser.com/features/engine): Mosaic is an anti-detect browser with its own Chromium engine, Tesseract Chrome: stock Chromium source, with fingerprint values changed inside the engine.

[Cookie jars: import and export cookies per browser profile](https://mosaicbrowser.com/features/cookie-jars): Import and export cookies per browser profile in Mosaic: paste Cookie-Editor JSON, a Netscape cookies.txt or a Cookie header, and export the jar as JSON.







[The yellow "unsupported flag" bar, and how we removed it](https://mosaicbrowser.com/blog/infobar-unsupported-flag): "You are using an unsupported command-line flag" means Chrome started with a risky switch. --disable-infobars only hides it headless, so we changed the engine.

## Mosaic, on your own computer

The browser this blog is about: its own Chromium, fingerprints from real machines and a proxy IP per profile. Free covers 3 profiles with no card, and Pro is $25 a month for any number of them.

Mosaic is a desktop app

Email yourself the link and open it on your computer.
