Oursky Code
  • AI
  • Auth
  • More from Oursky
    • Oursky Business Blog
    • GitHub
    • About Us
  • AI
  • Auth
  • More from Oursky
0
Subscribe
Oursky Code
Oursky Code
  • AI
  • Auth
  • More from Oursky
    • Oursky Business Blog
    • GitHub
    • About Us
  • iOS

Better StackTrace for iOS crash report from Sentry on Slack

  • September 11, 2015
  • No comments
  • 2 minute read
  • Rick Mak
Slack dSYM bot for Sentry
Total
0
Shares
0
0
0

Get crash reports from Sentry

We have been using Sentry for collecting crash reports and stack traces for our front-end js, Python, and Rails applications. It is reliable with affordable pricing. Simple to setup with it’s open-source SDK.

However, there’s a fundamental problem when it comes to iOS.

What? No symbolized data returned?

Sentry only returns the crash report with a piece of memory address but not a meaningful method name.

As an iOS developers, you should have noticed that it requires a dSYM file to symbolize the stack trace. It helps to identify these addresses with the appropriate dSYM file.

We thought we can upload dsym files and get symbolized information returned when Sentry claims it works on iOS.

Unfortunately, it is not the case:

refs. https://github.com/getsentry/raven-objc/issues/11#issuecomment-84141003

No one can understand the iOS Stack trace with memory address only. Proper support of dSym is needed.

(BTW if you can debug with memory address, please consider joining us.)

Solution

One of the possible solutions is to fork a piece of Sentry code and get our hands on it, but we don’t want to get into the complexity.

Instead, we write a micro service that will reply to a Sentry notification with de-symbolized stack trace on Slack, here is what we did.

A Slack bot to rule them all

Here we introduce a Slack bot that listens to Sentry notification and do all the de-symbolization works. Let us illustrate this with our iOS app Spentable.

  1. When a release is pushed to Testflight, it also pushes the respective dsym file to Slack.
    Raw exception from Sentry
    Raw exception from Sentry
  2. When Sentry posts a notification to Slack, the bot will analyze the message.
  3. If the message is a stack trace, it will download the respective dSYM file and run a command to symbolize the stack trace.
    1. example stack trace:
      18 spentable 0x000000010012aeb0 spentable + 192176
    2. runs the following:
      1. loadAddress=`echo "obase=16;ibase=10;$((0x000000010012aeb0-192176))" | bc`
      2. atos -o -l $loadAddress 0x000000010012aeb0 -arch
    3. example result:
      - (in spentable) (:)

      1. if the corresponding dSYM file is not provided, result only shows the original de-symbolized trace:
        0x000000010000003c (in spentable)
  4. Result (NB: Only related stack trace) will be posted to corresponding Slack channel (in this case #spentable)
De-symbolized stacktrace pushed in Slack channel
De-symbolized stacktrace pushed in Slack channel

Now, the developers can start fighting with the bugs happily with this meaningful information 😉


Oursky had open-sourced this project on Github because we think it will be useful beyond Oursky. We are hoping that software programmers and developers will use, enhance, and customize this bot for their use-cases.

If you are interested in this mini Slack Bot, please check it out :

oursky/slack-dsym-bot

We would also like to engage with the community on topics related to efficiency for software development.


Tell us what you think and subscribe to our blog if you find this helpful.


 

Follow us on twitter to get updated.

 

Read more from Oursky

Total
0
Shares
Share 0
Tweet 0
Pin it 0
Related Topics
  • bot
  • crash
  • engineering
  • iOS
  • opensource
  • sentry
  • slack
Rick Mak

Previous Article
  • DevOps
  • Python

Dockerizing our Python stack

  • September 1, 2015
  • Rick Mak
View Post
Next Article
Spentable: How we built our first app for watchOS 2
  • iOS

Spentable (Expense Tracker): How we built our first app for watchOS 2

  • September 24, 2015
  • David Ng
View Post
You May Also Like
iphone X ios 11
View Post
  • iOS

Preparations you may have missed before submitting an iOS 11 app

  • October 9, 2017
  • David Ng
View Post
  • Android
  • iOS
  • UX/UI Design

Offline-First: No More Network Connection Error

  • August 12, 2016
  • May Yeung
View Post
  • Android
  • iOS
  • Software Testing

Journey Through Agile Test Automation

  • May 6, 2016
  • Joyz Ng
Top 10 Mobile App UX Design Mistakes
View Post
  • Android
  • iOS
  • UX/UI Design

Top 10 Mobile App UX Design Mistakes

  • November 24, 2015
  • Joyz Ng
View Post
  • iOS

Manage your AppStore Preview Images in one place – make your life easier with ShotBot

  • November 9, 2015
  • David Ng
Spentable: How we built our first app for watchOS 2
View Post
  • iOS

Spentable (Expense Tracker): How we built our first app for watchOS 2

  • September 24, 2015
  • David Ng
View Post
  • iOS

VIPER – iOS App Architecture Beyond MVC (Mega-ViewController)

  • May 19, 2015
  • Percy Lam
View Post
  • iOS
  • Opensource

Continuously Delivering iOS Beta Builds Automated with Travis CI

  • March 26, 2015
  • David Ng

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Subscribe Us

Join our mailing list to never miss an update!

Oursky Code Blog
A team of Developers, Designers and Geeks. All about hacking and building things.

Input your search keywords and press Enter.