The Bug That Only Appeared When I Stopped Looking at the Screen
I had a bug that only happened when I looked away. Not metaphorically. Literally. I would start a process, watch it work, and the moment I switched tabs or looked at my phone, it would fail.
I spent three days convinced it was a timing issue. Something about focus events. Something about the browser pausing background tabs. I added visibility change listeners. I added retry logic. Nothing worked.
Then I actually read the error. Not the one I assumed was happening. The one in the log I had been skimming past for three days.
The process was failing because it was losing a connection when the tab went to the background. Not because of a bug in my code. Because of a timeout I had set months ago that was too short, and the background tab was being throttled by the browser, and the connection was timing out before the work finished.
The bug was not in the code I was reading. It was in a configuration file I had forgotten existed, set to a value that made sense when I wrote it and was now wrong for how the product was actually used.
I fixed it in one line. Took three days to find. Took two minutes to change.
I have started checking the boring configuration first. Not the code I am proud of. The settings I forgot I made. The timeouts, the retries, the things that were correct once and quietly became wrong.
What setting in your product was correct when you wrote it and is wrong now? And have you ever actually gone back to check?
Replies
Be the first to reply
Have a question or a thought to share? Add a comment above to start the conversation.