Blog

Can’t reproduce the bug? How to find the cause in the traffic

“Can’t reproduce” is the status of a complaint no one on the team could repeat. Users see a frozen screen, everything works for the team, and the ticket waits weeks for details. The cause is almost always a difference: system language, data, OS version. The traffic shows where the app and the server stopped understanding each other, and Microkoi Bench helps turn that into a bug report that won’t come back with questions.

Why logs don’t help

The app logs say the request went out and the response came back. The server logs show as many errors as always. The test phones are all set up the same way and don’t look like users’ phones.

Example: a complaint in a grocery marketplace app. “I open the cart, and it just spins and never loads.” Restarting doesn’t help. On the test phones, the cart opens in a second.

First the difference, then the traffic

Look for what sets the users who complain apart from the team: system language and region, OS version, the data they have. In the example, everyone who complained has an item sold by weight in the cart, and the screenshots show the interface in Russian. The test phones are set to English.

Recreate these conditions on a test phone and route its traffic through Bench, as described in “How to inspect your app’s HTTPS traffic on iPhone and Android”. In the “Recording” window, keep only your API host.

The failed request is in the endpoint tree

Put one and a half kilograms of apples in the cart and open it on a phone set to Russian. The spinner keeps spinning. On the right of the “Traffic” screen is the endpoint tree: host, path segments, methods. Each branch shows its failed calls as a separate number.

Click POST /v2/cart/recalculate in the tree and turn on “4xx” under “Filters”. The list has one row: status 422, time 140 ms. The server answered quickly and clearly. The screen didn’t show it.

What went to the server

Select the row, and the exchange panel opens below. On the Raw tab, the request and response are shown in full:

Request and response from a phone set to Russian
POST /v2/cart/recalculate HTTP/1.1
Host: api.example.com
Content-Type: application/json

{"items": [{"productId": 48213, "quantity": "1,5"}]}

HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json

{"error": "invalid_quantity", "field": "items[0].quantity"}

The quantity went out as a string with a comma. The app formats the number by the system language: in English it becomes "1.5", and the server accepts it; in Russian it becomes "1,5", and the server answers 422. Without items sold by weight, there are no fractions. Hence “only some users”.

Check the guess. Type quantity into the “URL, headers, or body” field: the search covers all traffic recorded in the workspace. Exchanges from the English phone show "1.5" and a 200 response.

The same exchange holds a second defect. The server returned a clear error, and the app stayed in the loading state. On an error response, the screen should show a message and a retry button, not an endless spinner.

A bug report that won’t come back with questions

There are two tickets here: the quantity format and the error handling. Attach the same things to each:

What to attachWhere to get it
The full request and responseThe Raw tab, “Copy” button
A command to repeat the requestThe “cURL” button in the exchange panel
A successful exchange for comparisonA search for quantity across all traffic
Response status and timeThe exchange panel header
Steps to reproduceSystem language, an item sold by weight, app version

The cURL command repeats exactly what went to the server, including the authorization header. Before pasting it into a ticket, replace the token with a placeholder.

Command to repeat the request
curl -X POST 'https://api.example.com/v2/cart/recalculate' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <token>' \
  --data '{"items":[{"productId":48213,"quantity":"1,5"}]}'

How the developer checks the fix

No phone needed. Paste the command from the ticket into the URL bar of the Bench API client: the method, headers and body are parsed on their own. Put in your token and send it: 422. Replace "1,5" with the number 1.5: 200. What to fix is clear: send the quantity as a number.

The second ticket doesn’t need a server that fails on demand. In the exchange panel, click “Breakpoint” and open the cart. Let the request through with “Continue unchanged”, change the status to 422 in the “Response paused” editor and click “Continue”. After the fix, the screen shows the error and a retry button.

What to remember

  • Start with how the user differs from the team: language, region, system version, data.
  • Find failed calls in the endpoint tree and with the status buttons, not by eye in the full list.
  • Attach the full request and response, with a successful exchange next to them.
  • When you’re done debugging, remove the proxy and delete the certificate from the phone.

Do you sort through user complaints? Try this order in the beta and write to beta@microkoi.com about what your bug report was missing. We read every email.

Try it on your own project

The beta is free and needs no sign-up. Download it, pick your project folder and start the proxy — your first requests will show up within minutes.

Version 0.9.6 · macOS, Windows and Linux · no sign-up