http://code-epicenter.com/wp-content/uploads/2015/10/bug.jpg

Writing a bug report

A story about what developers see, and how to maximise their initial understanding of an issue.

As a software engineer, my stock and trade is either bugs or features. My team and I meed to make changes to software to make it perform some new thing, or modify the behaviour of the thing it does on a continual basis, cycling releases through approximately 1x per week.

# The paypal checkout seems to fail with the error "Error: The upstream provider returned an invalid response.## StoryOn Thursday, 25th of February 2018 at approximately 6:18pm I attempted to checkout via the standard checkout with the following items in my cart:- 2x Widget
- 1x Foobar
I delivered to the address: Untermainkai 30
Frankfurt am Main 60320
Deutschland
And attempted to pay via the payment method Mastercard, with the last 4 digits ending in 0430.I was able to complete the checkout up to and including the PayPal step, but on being sent back to the store the store showed only "Error: the upstream provider returned an invalid response". I did not receive any order success email as I expected, nor was I shown the "Checkout Success" page.## ScreenshotsPlease find attached the following screenshots which show:1. The error following the checkout
2. The contents of my cart prior to checkout
3. The order summary page prior to being redirected to Paypal
## Technical Detail### BrowserThe browser I used was Chrome. The details from the `chrome://version` tab are as follows:```
Google Chrome66.0.3359.181 (Official Build) (64-bit)
Revision a10b9cedb40738cb152f8148ddab4891df876959-refs/branch-heads/3359@{#828}
```
### Browser ConsoleThe browser console showed the following entries:```
content.js:4 [Deprecation] chrome.loadTimes() is deprecated, instead use standardized API: nextHopProtocol in Navigation Timing 2. https://www.chromestatus.com/features/5637885046816768.
(anonymous) @ content.js:4
content.js:5 [Deprecation] chrome.loadTimes() is deprecated, instead use standardized API: nextHopProtocol in Navigation Timing 2. https://www.chromestatus.com/features/5637885046816768.
(anonymous) @ content.js:5
```

Title

The title is surprisingly important. There are always many outstanding bugs that must be triaged, and it’s often not clear which task has the highest priority. However, we can determine from the title:

The paypal checkout seems to fail with the error "Error: The upstream provider returned an invalid response.

Story (or steps to reproduce)

Perhaps the most important step in a bug is detailed steps to reproduce. It’s best to write these as detailed as possible, and from the point of view of the person who has experienced the issue. Let’s break it down piece by piece.

Time and Date

On Thursday, 25th of February 2018 at approximately 6:18pm I attempted

Detailed User Story

I attempted to checkout via the standard checkout with the following items in my......${SEE_ABOVE}......but on being sent back to the store the store showed only "Error: the upstream provider returned an invalid response".
  1. It’s cost prohibitive to test every combination of every feature prior to shipping to production

Screenshots

1. The error following the checkout
2. The contents of my cart prior to checkout
3. The order summary page prior to being redirected to Paypal
  • Operating system
  • Browser
  • Application state through status icons
  • User data that can be correlated with the issue

Technical Detail (Bonus)

There are some bugs that, no matter how much we instrument, are impossible to foresee and thus instrument for. If a bug report is being reported by a more technical user (for example, a project manager) it’s possible for them to communicate additional very technical information about the nature of the bug which helps particularly with bugs that are otherwise extremely hard to trace.

Browser Version

The browser I used was Chrome. The details from the `chrome://version` tab are as follows:

Browser Console

content.js:4 [Deprecation] chrome.loadTimes() is deprecated, instead use standardized API: nextHopProtocol in Navigation Timing 2. https://www.chromestatus.com/features/5637885046816768.
(anonymous) @ content.js:4

HAR File

For the truly technically savvy among us, it’s even possible to capture the entire request and send it through in a format called “HAR”. Instructions on how to do this in Chrome are at the following address:

Conclusion

Bugs are an inevitable part of software development. They are also among the most painful to investigate, and thus the most expensive issues that we can work on. By submitting a detailed bug report we can save a large amount of time and discussion back and fourth, and get fixes into production faster.

Further Reading

Thanks

  • Aario Shahbany and Svetlin Kalendzhiev who assisted in creating the “ideal bug report”.
  • Tomasz Kaplonski for reviewing and suggesting improvements.