# Reproduce a bug with the exact browser state that hit it

> A bug that shows for one account in one locale needs that browser state rebuilt. Export the cookie jar, or the whole profile as a zip, and send that.

Source: https://mosaicbrowser.com/blog/reproduce-bug-browser-state

## Reproducing a bug with the browser state that caused it

A bug that shows for one account in one locale needs that browser state rebuilt. Export the cookie jar, or the whole profile as a zip, and send that.

![Send the session, not a description of one, beside a screenshot: importing a cookie jar into a Mosaic profile](https://mosaicbrowser.com/covers/reproduce-bug-browser-state.webp)

To reproduce a bug with a specific browser state, hand the developer that state, not a paragraph about it. Say the checkout breaks for one test user in Vienna and nobody else. The ticket will list the clicks. It won't mention the German cookie banner the user dismissed in March, or the `de-AT` in their language list, and either of those might be the trigger. So export the cookie jar, or the whole browser profile that hit the bug, and send the file.

## What "browser state" means in a bug report

"Cannot reproduce" usually means the developer opened a clean browser and walked the steps. A clean browser is somebody's first visit; the reporter's was their fortieth. What differs between the two is what a server and a page actually read:

- Cookies. The session, yes, but also the consent choice and whichever A/B bucket the server put this user in.
- Local Storage and IndexedDB. A single-page app parks drafts, carts and cached API replies there.
- The language list, read twice: once as the `Accept-Language` header, once as `navigator.languages`.
- Timezone and `Intl` locale, so `3/4/2026` versus `04.03.2026`, and a price with the euro sign on the wrong side.
- The country the traffic leaves from. It picks the storefront, the currency and which cookie banner shows up.

Steps to reproduce describe the clicks. They almost never say "my cart had an item from last Tuesday that has since gone out of stock", because the reporter does not know it matters. The state knows.

Mosaic is a desktop app

Email yourself the link and open it on your computer.

[How it works: Local first](https://mosaicbrowser.com/features/local-first)

## Reproduce the bug with specific browser state: two ways

A hand-over comes in two sizes. Try the small one first.

### The cookie jar on its own

When the bug rides on the session (a permission, a server-side flag, an account setting somebody broke), the cookies are the state. An extension like Cookie-Editor dumps them as JSON; curl and a few others write a Netscape `cookies.txt`. The developer loads that file into their own browser and is the test user.

Storage, language and location stay behind. That makes the cookie hand-over a decent test in itself: bug still there, it's on the server; bug gone, it's in the browser, and you need the bigger package.

### The whole profile

A Chrome profile is a folder on disk with cookies, storage, history, cache and the language settings in it. Zip it up for a colleague's Chrome and the cookies are usually dead on arrival: Chrome encrypts them with a key held by the machine's keychain (DPAPI on Windows), and the other machine has a different one.

## How we do it in Mosaic

In Mosaic each profile is a fingerprint, a proxy and a cookie jar kept together, so most of its state is already one thing you can hand over. The profile's row menu has **Export**, and the profiles list has **Import**.

1. Open the row menu of the profile that hit the bug and choose **Export**. Is its browser still open? Then Mosaic asks to stop it first. A live Chromium holds its databases open with writes not yet flushed, and a zip taken then would hold half a session. (The API simply refuses a running profile.)
2. You get one zip. Inside is the profile record and its browser data directory, so Local Storage, IndexedDB and history go along, and so do the fingerprint and the language list.
3. On the developer's machine: **Import** in the profiles list, pick the zip. It lands as a new profile in their library, wearing the fingerprint it left with.

Plan for the login. We seal each profile's cookie database with a key derived for that profile in that library, which means the imported copy can't decrypt the cookies it carried in. With a test account that's one extra step, since the developer usually has its password and can just sign in. The other way is the copy's **Cookies** tab. Its **Paste an export** box takes what Cookie-Editor and EditThisCookie produce (a JSON array, or one wrapped as `{ cookies: [...] }`), a Netscape `cookies.txt` with curl's `#HttpOnly_` lines, or a bare `name=value; name2=value2` lifted from a request header. That last one has no domain in it, so a Domain field appears. Then **Load cookies**, and save.

Timezone and geolocation come from the proxy's IP. Language is stickier: once a profile has been used, it keeps its language even if the IP moves to another country, so the developer's copy asks for the page in the reporter's language. These are the two values people forget most often, and we wrote each one up: [testing in another timezone](https://mosaicbrowser.com/blog/testing-in-another-timezone), and [testing a site in another language](https://mosaicbrowser.com/blog/accept-language-testing).

## Hand over sessions only for test accounts

Anyone who loads a cookie jar is logged in as whoever it belonged to, sometimes for weeks, until the session expires or somebody signs it out. We treat it as a password. Profiles we hand over belong to accounts made for testing; a customer's account or a colleague's personal one never leaves the machine, and the zip travels over whatever channel you'd trust with a password.

Two habits help. One profile per test persona, named after the role and the ticket ("QA · admin · CHK-412"), the scheme from [keeping twenty QA test accounts straight](https://mosaicbrowser.com/blog/qa-test-accounts-naming). And when the ticket closes, sign the session out on the site, so the developer's copy goes dead. If a test has to start from nothing instead, that's a different tool: a [fresh profile per test run](https://mosaicbrowser.com/blog/fresh-profile-per-test-run).

Profiles, cookies and proxies stay on your computer until you export them, and the zip goes only where you send it ([local-first](https://mosaicbrowser.com/features/local-first) lists what is stored where).

## Questions

### How do I reproduce a bug that only happens for one user?

Rebuild what their browser had: cookies, Local Storage, the language list, the timezone and the country they browsed from. Export the browser profile that hit the bug and most of that arrives in one zip, so the developer opens the page about where the reporter left it.

### Can I share cookies with a developer to reproduce a bug?

For test accounts, yes. Whoever loads a session cookie is logged in, so an exported jar is a password in a different file format. Send it only for accounts made for testing, the way you'd send a password, and sign the session out once the ticket is closed.

### Why can't the developer reproduce the bug in a fresh browser?

Their browser is on its first visit. No consent cookie, no feature flag the server handed out, no cart from last week, no stale cache. The bug may need just one of those to show up.

### Does Mosaic export a profile while it is running?

No. Press Export on a running profile in the window and Mosaic asks to stop it first; the API says no outright. Chromium keeps its databases open with unflushed writes while it runs, and a zip taken then holds half a session.

### Does an exported Mosaic profile keep its login?

Not on its own. Its cookie database is sealed with a key derived for that profile in the library it came from, and the imported copy can't decrypt it. The developer signs in to the test account again, or pastes a cookie export into the copy's Cookies tab.

## Related

[A fresh browser for every test run, and why it should be cheap](https://mosaicbrowser.com/blog/fresh-profile-per-test-run): Leftover cookies and storage are where flaky browser tests come from. A one-time profile gives each run a clean jar and trashes itself when its browser closes.

[Keeping twenty QA test accounts straight](https://mosaicbrowser.com/blog/qa-test-accounts-naming): Managing test accounts for QA goes wrong when the state lives in people's heads. Give each persona a profile with its login, role and state beside it.

[Testing date and deadline features in another timezone](https://mosaicbrowser.com/blog/testing-in-another-timezone): Midnight cut-offs and "ends today" banners break in zones you don't live in. Test a website in a different timezone without touching your computer's clock.

[Testing a site in another language means more than one header](https://mosaicbrowser.com/blog/accept-language-testing): Set Accept-Language alone and the page still formats dates for your own machine. A real language test moves the header, navigator.languages and Intl.

[Local first: your profiles stay on your computer](https://mosaicbrowser.com/features/local-first): Mosaic has no cloud copy of your profiles. Profiles, cookies and proxies stay on your computer, encrypted on disk, with app lock, daily backups and a trash.







[--load-extension stopped working in Google Chrome](https://mosaicbrowser.com/blog/load-extension-removed): Chrome 137+ prints "--load-extension is not allowed in Google Chrome, ignoring". Chrome for Testing, Chromium and Extensions.loadUnpacked still load it.

## 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.
