Works on my machine is a missing-evidence problem

Works on my machine means two setups differ in a way nobody wrote down. The ten usual differences, how a report can carry them, and how to reproduce one.

Two glass bell jars cover identical smoked cubes, and only the right jar also holds a tiny orange speck

“Works on my machine” is usually true, and so is the bug report it answers. Both machines ran the same code under different conditions, and nobody recorded which ones. The fix is to make every report carry the reporter’s environment, reproduce the failure by matching it one difference at a time, and pin the developer’s own setup.

The phrase reports a difference without naming it

A tester files “the save button does nothing”. A developer opens the same page, clicks save, sees the confirmation and replies “works on my machine”. Each has described their own screen accurately. The disagreement is about a third thing neither of them wrote down: whatever was different between the two screens.

The phrase is old enough to have its own parody. Jeff Atwood’s Coding Horror blog published the Works on My Machine certification program in 2007, crediting the idea to Joseph Cooney. Its four steps compile the code, launch it, “Cause one code path in the code you’re checking in to be executed” and check the change in. The joke lands because the developer’s machine is a single, unusually well-kept environment, and it says nothing about the others.

Most writing on the phrase stays on the developer’s side. It blames drifting configurations, mismatched language and package versions, missing database tables and undocumented setup, and the remedies are containers, lockfiles and scripted environments. Those are real causes, and the last section comes back to them. For a team building a website or web app they cover half of it, because the reporter’s machine is a browser the team does not control, with an account, a cache and a set of extensions of its own. The evidence table in web application testing ends on this case, seen from the browser.

Read that way, “works on my machine” is a missing-evidence problem. The report arrived without the conditions it failed under, so the only way to argue about it is to argue. A report that carries those conditions turns the same exchange into a comparison of two lists, and the item that differs is where bug reproduction starts.

Ten differences hide between your machine and theirs

These are the differences that commonly separate a developer’s browser from a reporter’s on a web build. The third column is the one that matters for evidence: some conditions the page itself can read and record, some only the application knows, and some only the reporter can tell you.

DifferenceHow it hides the bugWho can record it
Browser and versionOne engine supports a feature, another lacks it or renders it differentlyThe page can read the browser
Viewport, zoom and pixel ratioA breakpoint or an overlapping element exists only at the reporter’s widthThe page can read the viewport and screen
Operating system and deviceFonts, scrollbars, date pickers and touch input differ by platformThe page can read the platform
Account, role and dataA permission check, an empty list or one odd record fails only for that userThe application knows; the page knows only if told
Feature flags and experimentsThe reporter is in a cohort the developer is notOnly the application knows
Cache and service workerYesterday’s script or a cached response is still running for the reporterPartly visible; a hard refresh settles the simple case
Browser extensionsAn ad blocker removes an element, a password manager injects oneMostly invisible to the page; ask the reporter
NetworkA slow or filtered connection makes a request time out or failThe page can record requests and their results
Time zone and languageA date crosses midnight, a number formats with a comma, a string is longerThe page can read both
The build deployedThe reporter is on staging or on an older release than the developerThe application knows; a visible build stamp shows it

The developer’s environment is the odd one out on almost every row. It has the newest browser, a wide screen, an administrator account, every flag switched on, a cache warmed by the last reload, a handful of developer extensions and a fast connection to a local server. Test environment best practices sorts the same axes from the other direction, by which ones a test environment should share with production and which ones every report should record instead.

Capture the reporter’s environment with the report

Asking the reporter for these details works badly. People rarely know their browser version, nobody remembers which flags they had, and every question sent back delays the fix while the conditions change underneath it. The rows a page can read should be read by the page at the moment of the report, and the rows only the application knows should be made visible on the page so they end up in the evidence.

For a team using Notarus, the widget reads its part automatically. A report filed through it carries an annotated screenshot of the page the reporter was looking at, with console logs, network activity, page URL, viewport and browser attached (evidence capture). The context on the ticket is a closed list: page path, first seen, browser, operating system, device, screen, viewport, time zone and language. Network activity is recorded as each call and its result. Request and response bodies are never captured, and query strings are cut from every URL before it is stored, so a failure caused by what a request contained still needs the reporter’s description. Capture settings, browser support and performance budgets decide what is available, and a report can still be sent without evidence.

Several rows of the table are outside that list. The widget does not detect feature flag state, installed extensions, what the browser had cached or whether a service worker answered the request, and it does not know which build is deployed. The account is known only when the site tells the widget who the reporter is, as reporter identity is a ladder describes. Two cheap habits close most of that gap. A build stamp and an environment name printed in a corner of every non-production page end up in every screenshot. A feature flag state that the application shows to internal users, on a debug panel or in the footer, ends up there too.

When the bug is in the steps rather than the environment, session replay adds the minutes before the report, with typed input always masked. Written steps to reproduce are still worth having, and evidence makes them checkable.

Reproduce deliberately, one difference at a time

With the reporter’s conditions in front of you, reproduction becomes a procedure. Match the conditions in order of cost, retest after each change, and stop at the first one that brings the failure back, because that condition is the diagnosis.

  1. Same page, same steps. Open the exact page path from the report and follow the steps as written, including the ones that seem irrelevant.
  2. Same account and data. Sign in as a user with the reporter’s role, on an account shaped like theirs. On a business app this is often the step that brings the bug back, because the developer was signed in as an administrator.
  3. Same browser, viewport and platform. Switch to the reporter’s browser and set the viewport they had. Responsive mode covers width and pixel ratio, and mobile website testing covers what it cannot prove without a real phone. Cross-browser issues argues that the viewport and the console usually settle a report before the browser name does.
  4. A clean browser. Use a fresh profile with no extensions, then clear the site’s storage. Chrome’s Application panel shows any installed service worker and offers “Bypass for network”, “Unregister” and a Clear storage button that unregisters service workers and clears caches.
  5. Same flags, build and locale. Put your session into the reporter’s flag cohort, open the build their screenshot shows, and set their time zone and language. Test runners can do the last part: Playwright’s emulation options set locale and timezoneId per test.
  6. Same network. Throttle the connection, or block the request that failed for the reporter, and watch what the page does when it never gets an answer.

While you work, keep the developer tools open on the console and network panels, because the reporter’s evidence tells you which error to expect and the moment it appears is the confirmation.

Some failures still refuse. A bug that vanishes when a debugger is attached or a log line is added is a heisenbug, and the evidence from the original occurrence is often the only clean observation of it. The honest outcome is a report that stays open with what was tried, written into the ticket, and a request to capture the next occurrence, which beats closing it as “cannot reproduce” and hearing about it again from a customer.

The developer’s half is pinning the machine

The developer side of the phrase has its own fixes, and they are well documented. Their job is to make sure that when two developers, or a developer and the CI server, run the same commit, they run the same code.

  • Lock dependency versions. npm describes package-lock.json as a file that records the exact tree that was generated, “such that subsequent installs are able to generate identical trees”. Commit the lockfile and install from it in CI.
  • Containerise the runtime. A container image fixes the language version, the system libraries and the server configuration. The Development Container Specification extends the idea to the editor and tools, so a new developer gets the same environment in one step.
  • Script the data. Database migrations and seed scripts in version control mean every machine can rebuild the same schema and the same test records.
  • Build once and promote. The artefact tested on staging should be the artefact deployed to production, with configuration supplied by the environment rather than baked in.
  • Let CI be the neutral machine. A test that passes locally and fails in CI is the same argument in miniature, and the CI log is already the evidence.

These practices remove differences between developers. None of them touches the reporter’s browser, account, extensions or cache, which is why a team with perfect containers can still hear “works on my machine” every week. Each half needs the other. Pinned developer environments make the reporter’s evidence comparable, and the reporter’s evidence says which of the remaining differences to look at.

The argument ends when both sides have a record

“Works on my machine” and “it’s broken for me” are two observations of one system under two sets of conditions. Neither person is wrong, and arguing about which of them to believe wastes the time that comparing their conditions would have used. The useful reply to a report that does not reproduce is a question: what was different, and does the ticket already say?

A team that wants that question answered without a round trip makes three decisions. Every report records the conditions the page can read, the application prints the conditions only it knows where the screenshot will see them, and developers work from pinned environments so their own side of the comparison is stable. The phrase still gets said after that. It just arrives with two lists attached, and one of the ten rows above usually explains it.

Common questions

What does "works on my machine" mean?

The phrase means a developer ran the code, or opened the page, and did not see the failure somebody else reported. Both statements can be true at once. The two machines ran the same code under different conditions, such as another browser, account, feature flag or cached file, and nobody recorded which condition differed.

Where does the phrase "works on my machine" come from?

Developers used the phrase long before anyone wrote it down as a joke. Jeff Atwood's Coding Horror blog published a mock "Works on My Machine" certification program in March 2007, crediting the idea to Joseph Cooney. Its steps end with checking code in after running one code path, which is the habit the phrase mocks.

What should you do when a bug works on your machine?

Ask what was different before arguing about whether the bug is real. Compare the reporter's browser, viewport, operating system, account, data, flags and build with your own, match the cheapest differences first, and retest after each change. When nothing reproduces it, keep the report open with its evidence and ask for the next occurrence.

Why does a website work on one computer and not another?

Each computer brings its own browser and version, screen size, operating system, extensions, cached files, signed-in account, time zone and network. A website is assembled inside that environment on every visit, so the same code can render, load and behave differently on two machines without either of them being broken.

Do containers fix "works on my machine"?

Containers fix the developer's half. A container image, a lockfile and a shared development container make every developer's server, runtime and dependencies match, so the code under test is the same everywhere. None of them reaches the person who reported the bug, whose browser, account and cache still differ from the developer's.

What should a bug report include so the bug can be reproduced?

A reproducible report holds the steps taken, what was expected and what happened, the page address, the browser and operating system, the viewport, the account or role, and any console errors or failed requests from the moment it broke. Captured automatically, those details also stay accurate, since nobody has to remember them.

The Notarus team

The people who build Notarus. We write up the decisions behind the product when the reasoning is worth more than the changelog line.

Keep reading

Reports with the evidence attached.

Start free, one script tag.

<script src="…/widget.js" data-key="pb_pub_…">