Two null checks
A few months into React Native, I was still mostly copying patterns I didn't fully understand. Then our speech-to-text library started crashing, but only for some users.
Only with Bluetooth
It took a while to see the pattern. The app crashed on Android when the user had Bluetooth audio connected: earbuds, a headset, a car. With the phone's own microphone, everything worked. Most of our testing had been done without anything connected, which is why we hadn't seen it.
Somebody already knew
The library was open source, so I went looking through its GitHub issues. Someone had hit the same crash and posted a fix. It had never been merged.
The fix itself was small: two null checks in the library's native Android code, in places where it assumed an audio device would always be there. With Bluetooth, sometimes it wasn't.
Patching code I didn't own
I couldn't wait for the maintainers, so I patched the library inside node_modules directly and kept the change with our project so it survived fresh installs. It felt wrong at first, editing someone else's code. It was also the moment React Native stopped feeling like a black box.
The crash wasn't in our code, but it was still our problem.
That fix was my first real breakthrough as a mobile developer. Since then, when something breaks deep in a dependency, my first move is to open the source and read it.