Guest Blog | Solving “What the Bug?” with the Visual Studio App Center Crashes Service
This is a special guest post from Miguel Cervantes, CTO at Payit. It’s every developer’s nightmare: something goes wrong with your app in the wild, with real users, or, even worse, when you’re showing it to a venture capitalist, potential client, or at public event. In the moment, we usually have no idea what’s happened or how we can fix it. I call these, “what the bug?” moments.
Finding a bug in development isn’t easy, but we use automated UI testing on real devices to catch as much as possible at Payit so we can release with confidence (thanks, App Center Test service!). But, once you ship, all bets are off—you can’t hit a breakpoint or get access to a log.
If I have one piece of advice, it’s to instrument your apps to collect crash and user data. As we’ve developed Payit, Mexico’s only peer-to-peer mobile payment app, which has grown to 110K+ active users and been awarded “Google Play Editor’s Choice”, this has been critical to our success.
We use Visual Studio App Center to get the data we need to prevent “what the bug” moments and improve our apps. Below, I’ll share how we use Visual Studio App Center’s Crashes, Analytics, and Push services and few of my favorite tips and tricks to help you get started and get even more from your crash and analytics data.
Get ready to learn.
Visual Studio App Center Crashes Service At-a-Glance
We all want world-class, five-star apps that keep our users coming back.
I’ve been developing apps a long time, and every time I hear a developer say that crash reporting, monitoring, and analytics are “useless,” I shudder. Without a way to gather production app data, you and your team&mdashnot only your tech team, but your marketing, product, and sales teams—are completely blind.
Simply put, App Center Crashes service gives you a lot of data, so you easily identify and fix any bugs your users experience.
At Payit, we’re .NET developers, so we use NuGet. If you’re a C# developer, installing the App Center SDK is as easy as searching NuGet package manager:
It’s just as easy for all developers (view more detailed docs here); simply pick whatever language you prefer: Swift, Obj-C, Java, or React Native.
Just log in, connect your apps, and add the App Center SDK.
Grouped Crash Reports
From there, in your Crashes tab, you’ll see a list of all crashes, with filters for app, version, date range, and status:
For the purpose of this post, we’re using internal crash reporting logs (not for our production apps). Crash data may come from automated tests or manual QA for our RC versions.
As a peer-to-peer payment app, our main goal is to ensure our users successfully complete financial transactions. We use the following criteria to guide our decision process, in order of “urgent” to “priority, but not on fire”:
- Involves a financial flow operation (no matter how many users affected, must be fixed)
- Affects critical non-financial operations (like account creation or profile updates)
- Impacts significant percentage of users
- Relates to UI only
Grouped crash reports show us affected devices and OS versions, time stamps, network, app version, how many times the issue occurred, and more. We love this level of detail, since it makes it easier to prioritize what we fix and when. In addition to our crash priority scale, we weight issues on the latest devices and OS versions more heavily, and detailed reports mean we can quickly decide if a crash group should be fixed ASAP or if it can wait a bit longer.
Status Toggle and Filters
Our entire development team knows our bug rating scale, and we empower all team members to search, troubleshoot, and solve open issues.
App Center’s simple status selector and filter makes it easy to focus on high priority, unresolved issues. We browse crash reports for “open” issues, code a fix, and change the status. “Open” and “closed” are straightforward, and we use “ignored” to categorize crashes that we don’t need the team to fix, like those from a specific internal test.
Below is a simple example of how we use filters and grouped crash reports to identify and prioritize what we fix:
After narrowing to only “open” issues, we apply our importance scale. In this case, we’d resolve #187 (related to collecting user payment information) over #186 (UI-related).
Crash Group #187
Crash Group #186
#187 is priority #1, since it impacts our core business: financial transactions.
From there, we see error messages and stack traces for any given crash, so it’s easier for us to detect what happened and address the issue.
The Payit app includes a page for users that displays their saved payment cards, allowing them to select any stored card as a payment method on a transaction-by-transaction basis. As shown in the stack trace above, the method crashed with a
This one is pretty clear; it’s developer error. They’re trying to display card collection with fewer elements than the iteration cycle, or to access an element index that doesn’t exist. Thus, no payment cards are shown to the user, so s/he is unable to complete transactions.
With the App Center Crashes service, we dig into stack traces, targeting a specific method, and after a quick analysis, see the root problem (an incorrect index after adding/deleting cards) and resolve it. As we commit fixes, we change the status to “closed.” Everyone’s dashboard updates in real-time, so no one wastes time investigating resolved issues.
Combining the Crashes, Analytics, and Push Service
I’ll dive deeper into the Analytics and Push services in a future post, but targeted push notifications powered by Analytics user segmentation help us in our crash resolution process too.
User Segmentation and Targeted Push Notifications
Visual Studio App Center makes it easy to send notifications to predefined user segments, so you get the right message to the right user(s) at the right time. For us, this ranges from letting our iOS and Android users know when we’ve shipped a new version, thereby nudging them to update, or to message users when we’ve identified and resolved an issue on a specific device or OS version. In addition to Visual Studio App Center’s robust Analytics and Push services, we integrate with a few other tools to gather insights about our app behavior, segment our users, and send targeted marketing campaigns (try a new feature or promoted service, invite new users, etc.). The flexibility to use various services is important to us, and Visual Studio App Center lets us pick and choose the services that work for us as well as use our own solutions.
Let the Bug Hunt Begin
While analytics and crash reports don’t affect your app’s “core” functions, they’re just as fundamental as the lines of code you commit.
With App Center, we keep track of bugs, identify impact, prioritize, and ensure we fix the right thigs at the right time.
To start improving your apps and keep your team focused on what matters most to your business, simply create your App Center account, make sure you have the SDK installed, and you’re ready to go! If you haven’t already, create your Visual Studio App Center account, connect your first app, and start shipping better apps now.
Have an account? Log in and let us know what you’re working on! About the Author
Miguel Cervantes is the co-founder and CTO of Payit, Mexico’s first peer-to-peer mobile payment platform. Prior to Payit, Miguel used his expertise as a senior consultant and technical lead at Genesys, focused on developing desktop and web apps for the banking and telecommunications industry. In his spare time, Miguel helps aspiring developers, both as a Collective Academy Master’s program mentor and as a Mobile Development course Professor at Universidad Panamericana.