Git Product home page Git Product logo

Comments (6)

aledalgrande avatar aledalgrande commented on July 16, 2024 1

+1 this is making airbrake for iOS pretty much useless

from airbrake-ios.

giantslogik avatar giantslogik commented on July 16, 2024

On further investigation this is a bug in airbrake-ios. (new information indicates this is server bug ... see comments below)

An exception handler in CFRunloop catches and rethrows a new exception.(https://stackoverflow.com/questions/13777446/ios-how-to-get-stack-trace-of-an-unhandled-stdexception)

Airbrake is logging the new Exception instead of the real underlying one, which means that almost every issue doesn't get a correct stack as it crashes in the context of a runloop.

PLCrashReporter already has the ability to get the stack of the original underlying exception. Airbrake-ios should get it from PLCrashReportExceptionInfo *_exceptionInfo;

from airbrake-ios.

jocelynlih avatar jocelynlih commented on July 16, 2024

Thx for the finding, will take a look at this issue.

from airbrake-ios.

giantslogik avatar giantslogik commented on July 16, 2024

Jocelyn,
Some further information. This may actually be a bug on the airbrake server api.
POST https://airbrake.io/api/v3/projects/PROJECT_ID/ios-reports?key=PROJECT_KEY

body json:
{
report: '...',
context : '...'
}

The report string json sent by airbrake-ios contains the correct backtrace from PLCrashReportExceptionInfo*, this is in a part of the report text starting with
"Last Exception Backtrace:"

However the airbrake web console does not display this. It only displays the stack of crashed thread, which is useless for crashes in a RunLoop.

I did not find a way to get the full report from web console or locate url returned by the above web API. (https://airbrake.io/locate/xxxxxxxxxxxxxxxx)

Also the full report string contains stacks for all threads, useful to debug multithreading issues, which also is not available from airbrake web dashboard.

from airbrake-ios.

giantslogik avatar giantslogik commented on July 16, 2024

samplereport.txt

Here's a report that was sent to airbrake server. The stack trace of interest starts with:
Last Exception Backtrace:

The airbrake dashboard / website only shows the stack trace starting with:
Thread 0 Crashed:

There seems to be no way of getting the Last Exception Backtrace.

from airbrake-ios.

giantslogik avatar giantslogik commented on July 16, 2024

Have forked the code, and developed a workaround.
https://github.com/SimpleBillsDev/airbrake-ios
The last exception backtrace is converted to a pseudo crashed thread, and a second crash report is sent to airbrake server.
The Podfile can be changed to use the fork rather than the default.
pod 'Airbrake-iOS', :git => 'https://github.com/SimpleBillsDev/airbrake-ios.git'

from airbrake-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.