⑂ Open source

Reporting a bug to an open source project the useful way

How to write an issue maintainers can actually fix: minimal reproduction, versions, logs, expected behaviour and what to leave out of the report.

A good bug report is one of the most valuable contributions you can make to an open source project, and it does not require writing a single line of code. A bad report, by contrast, eats up maintainers' time in questions and fruitless attempts, and often ends up closed without a fix. The difference almost always comes down to a few pieces of information in the right place.

Before opening the issue

Three checks avoid most useless reports:

  1. Update to the latest version and check whether the problem still exists. Many bugs have already been fixed.
  2. Search the existing issues, including closed ones, using the exact error message as a keyword.
  3. Rule out your configuration: try with default settings, without plugins or extensions, in a clean environment.

If you find an identical open issue, add your information only if it is new (a different version, a different operating system, a simpler way to reproduce it). A comment that just says «me too» does not help; use the reaction the platform provides instead.

The structure of an effective report

Many projects provide a template. If there is none, this structure works almost everywhere:

  • specific title: «CSV export loses accented characters with semicolon separator» rather than «Export does not work»;
  • environment: software version, operating system, runtime or browser version, installation method;
  • steps to reproduce: a numbered list, from the starting point to the problem;
  • expected behaviour: what should happen;
  • observed behaviour: what actually happens, with the error message copied as text;
  • additional information: relevant logs, how often it happens, which version it first appeared in if you know.

The minimal reproduction

The single element that speeds up a fix the most is a minimal example that reproduces the problem. Minimal means that if you remove any part, the bug disappears.

For a library, it is a short standalone program:

from library import export_csv

rows = [{"name": "Niccolò", "city": "Forlì"}]
export_csv(rows, "out.csv", separator=";")
print(open("out.csv", encoding="utf-8").read())
# expected: name;city / Niccolò;Forlì
# got:      name;city / Niccol?;Forl?

For an application, it is a sequence of actions starting from a fresh install, possibly with a sample file attached. Narrowing down the case takes time, but it often also leads you to the cause, or to realise the problem was somewhere else.

Logs and error messages

A few practical rules:

  • paste errors as text in a code block, not as screenshots: text can be searched and copied;
  • include the full stack trace, not just the last line;
  • if the log is long, attach a file or include only the part around the error, saying it is an excerpt;
  • remove sensitive data: tokens, passwords, internal addresses, customer names, paths that reveal personal information.

The last point matters: issues are public and stay indexed. An API key pasted by mistake must be considered compromised and revoked immediately, even if you edit the comment.

What not to do

Behaviour Why it hurts
Reporting several problems in one issue It cannot be closed when only one is fixed
Using issues for usage questions They clog the tracker; forums or dedicated channels exist
Writing «urgent» or demanding deadlines Maintainers have no obligations towards you
Reporting vulnerabilities in public It exposes users before a fix exists
Disappearing after reporting Clarifying questions go unanswered

Security vulnerabilities deserve a separate channel: look for a SECURITY.md file or a dedicated address and follow the procedure described there.

After reporting

Stay reachable. Maintainers may ask you to try a development build, a different option or to provide a missing detail. Replying within a few days keeps the issue alive; many projects automatically close issues waiting for feedback after a certain period.

If a fix arrives, confirm that it also works in your real-world case. It is a small gesture that closes the loop and helps whoever runs into the same problem.

In my work I have noticed that a well-written report is often resolved quickly precisely because the maintainer can reproduce it in a few minutes, without any back-and-forth.

In short

  • Update, search existing issues and rule out your own configuration before reporting.
  • Provide environment, steps, expected and observed behaviour with a specific title.
  • A minimal reproduction is the contribution that speeds up a fix the most.
  • Paste errors as text and always remove sensitive data.
  • Report vulnerabilities only through the private channel the project specifies.
MM
Marco Marzaduri

Marco Marzaduri works in cybersecurity, digital forensics and web development. A computer science graduate, he combines rigorous technical analysis with attention to the people who use technology.

Read also