These are chat archives for SudoPlz/react-native-bugsnag

3rd
Jul 2016
Ioannis Kokkinidis
@SudoPlz
Jul 03 2016 00:00
To be honest I have not yet installed bugsnag
Joshua Pinter
@joshuapinter
Jul 03 2016 00:00
Okay. No worries. I'll play around with it.
Ioannis Kokkinidis
@SudoPlz
Jul 03 2016 00:00
I just threw some code in there, thats why I have everything commented out
Joshua Pinter
@joshuapinter
Jul 03 2016 00:00
Haha. Nice. It's a good start.
Once we get things working then we can actually have stuff to test against.
Ioannis Kokkinidis
@SudoPlz
Jul 03 2016 00:01
yeah
Well its 3:00 am here, so I should probably head to sleep for now ^^
Joshua Pinter
@joshuapinter
Jul 03 2016 00:01
In the README it might just easiest just to say, "Go install BugSnag for iOS following their instructions." And then link to that Manual Install piece. Not super slick but good enough.
Ioannis Kokkinidis
@SudoPlz
Jul 03 2016 00:02
Change anything you want according to your liking :)
Joshua Pinter
@joshuapinter
Jul 03 2016 00:02
Damn man! Gets some rest! I'll have an update for you when you wake up. :)
Ioannis Kokkinidis
@SudoPlz
Jul 03 2016 00:02
heheheh
Coool
Joshua Pinter
@joshuapinter
Jul 03 2016 00:02
:+1:
Ioannis Kokkinidis
@SudoPlz
Jul 03 2016 00:02
Cya tommorow man, bye bye :)
Joshua Pinter
@joshuapinter
Jul 03 2016 00:02
Ciao.
Joshua Pinter
@joshuapinter
Jul 03 2016 05:27
It's midnight here so I'm signing off but I was able to get a JS exception to Bugsnag via the Bridge. Baby steps but a good starting point. Here's the last commit text with more details:

I'll need to add some steps to the Readme, but it's essentially:

1) Integrate KSCrash and Bugsnag into your application Xcode project.

2) Add "react-native-bugsnag" dependency to your package.json.

3) Then do sample exception like this:

var Bugsnag = require('react-native-bugsnag');

Bugsnag.notify("ExceptionName1", "ExceptionReason1", null);

This is the start of the rest of it. I've commented out all the other code for now so we can get this working and then uncomment and modify the other methods going forward.

It's hitting midnight here so I was only able to test a single JS excpetion and it doesn't give us much context because it comes over the bridge and we lose the location of the original error.

So, we might want to use the JS library when handling excpetions in React Native. Will have to test a lot more on how to get the best results.

But, it's already nice to get native iOS exceptions in the beautiful and familiar Bugsnag interface.

Ioannis Kokkinidis
@SudoPlz
Jul 03 2016 09:33
Looks good man, its starting to shape up. I think the next step is to make a react-native Example project, to be able to work on it ourselves, and secondly demonstrate how the module works.
Joshua Pinter
@joshuapinter
Jul 03 2016 14:58
I'm using it in my actual React Native app. Can you do the same or do you need an example app to work with it?
Ioannis Kokkinidis
@SudoPlz
Jul 03 2016 19:06
Its not about me, I think there must be an example. I will create one :)
Ioannis Kokkinidis
@SudoPlz
Jul 03 2016 19:12
@joshuapinter I have no idea how to make our library be added automatically to the example project using rnpm, any clues?
Joshua Pinter
@joshuapinter
Jul 03 2016 19:47
Usually you can just do rnpm install react-native-bugsnag but that means we need to have it published on npm and we're not quite there yet.
Ioannis Kokkinidis
@SudoPlz
Jul 03 2016 19:51
aha ok
I thought it needed more configuration
Joshua Pinter
@joshuapinter
Jul 03 2016 19:52
I think it's smart enough to do the basic install itself. But you can make it fancier with other configs I believe.
Ioannis Kokkinidis
@SudoPlz
Jul 03 2016 19:52
Ok so I was wondering
should I include the Bugsnag and KSCrash libraries within the example native project?
Joshua Pinter
@joshuapinter
Jul 03 2016 19:53
Good question. I think you have to if it's gonna work. I was trying to find a way to include them in the RCBugsnag project itself but couldn't figure it out fast enough so just included it my React Native project itself.
Ioannis Kokkinidis
@SudoPlz
Jul 03 2016 19:54
aha
Ioannis Kokkinidis
@SudoPlz
Jul 03 2016 21:11
@joshuapinter hey man are you there?
Ioannis Kokkinidis
@SudoPlz
Jul 03 2016 23:31
Ok we got a working example, with a working iOS version. The react native app starts, and we receive all unhandled errors to the bugsnag dashboard. Also we can call notify if we ever want to send a custom report to bugsnag. All works well.
What troubles me though is, I still haven't found how to upload sourcemaps on the bugsnag dashboard, and translate the stacktrace to the real js lines of code.