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

4th
Jul 2016
Joshua Pinter
@joshuapinter
Jul 04 2016 01:39
Hey hey. Nice work with the example app! I think I've got a good plan for the source maps from the Task Rabbit example. It looks like Bugsnag allows you to pass a stack trace in yourself so I'll give that a go tomorrow.
Ioannis Kokkinidis
@SudoPlz
Jul 04 2016 08:25
I pass the javascript stacktrace to Bugsnag, and I can see it on the dashboard. The problem is, I see lines like so: line 65230 because the code is minified..!
If you need any help check out this repo: https://github.com/getsentry/raven-js/blob/6aff89cf6366d222a0b2da9c1fca179a623f2cf6/plugins/react-native.js it is how getsentry does the same thing for their sdk
Ioannis Kokkinidis
@SudoPlz
Jul 04 2016 10:04
@joshuapinter Hey man, can I ask you for a favour? Would you be kind enough to transfer the ownership of the repo to my github account? I want to be able to connect it to our work slack and show my boss that I worked on that. If thats not a problem with you. Thanks!
On the meantime I'm working on Android
Ioannis Kokkinidis
@SudoPlz
Jul 04 2016 12:05
Ok Android is now working
Joshua Pinter
@joshuapinter
Jul 04 2016 15:43
No worries man. You've been putting a lot of time into it anyway. I'll do that now.
Jean-Richard Lai
@jrichardlai
Jul 04 2016 16:34
Hello guys sorry was not on my computer this weekend, just would like to say awesome job guys! This looks great!
For the sourcemaps we have this working but problem is that you have to ship it with the app which makes it slow, not sure if Bugsnag allows linking the sourcemap from their side with an iOS or Android app
Joshua Pinter
@joshuapinter
Jul 04 2016 16:36
Hey @jrichardlai! Thanks for jumping in.
Jean-Richard Lai
@jrichardlai
Jul 04 2016 16:45
@joshuapinter let me know if I can help
what does that mean "Handle different handled exceptions in JS." ?
Joshua Pinter
@joshuapinter
Jul 04 2016 16:45
This message was deleted
@jrichardlai Where do you see that?
Jean-Richard Lai
@jrichardlai
Jul 04 2016 16:47
Sorry was looking at the TODO list
Joshua Pinter
@joshuapinter
Jul 04 2016 16:48
I gotcha. I transferred the repo to @SudoPlz because he's doing it via his job. I think you know the most about the sourcemaps so if you have time to look at that, that would be great!
Ioannis Kokkinidis
@SudoPlz
Jul 04 2016 18:05
@joshuapinter Sh1t sorry man the link expired, can you send the request once more?
I was not on my computer ^^
:)
Joshua Pinter
@joshuapinter
Jul 04 2016 18:06
Yup. Sending again now...
Ioannis Kokkinidis
@SudoPlz
Jul 04 2016 18:06
Thanks man
Now I have to speak with the guys from bugsnag to learn how to upload sourcemaps to their dashboard, because I don't want to include them in the app!
Joshua Pinter
@joshuapinter
Jul 04 2016 18:08
@SudoPlz Yeah. So I got a question.
Ioannis Kokkinidis
@SudoPlz
Jul 04 2016 18:08
?
Joshua Pinter
@joshuapinter
Jul 04 2016 18:08

So I'm including the library and then throwing a sample error with the following: import Bugsnag from 'react-native-bugsnag';

Bugsnag();

throw {
name: "Name1",
message: "Error detected. Please contact the system administrator.",
};

Ioannis Kokkinidis
@SudoPlz
Jul 04 2016 18:09
yes?
doesn't it work?
i did throw new Error("Test") on button click
Joshua Pinter
@joshuapinter
Jul 04 2016 18:09
But instead of getting the line number of where the error was thrown I get the RNBugsnag.m file:
Screenshot 2016-07-04 12.09.19.png
Ioannis Kokkinidis
@SudoPlz
Jul 04 2016 18:10
hmm give me a sec please let me check what the mine said
Joshua Pinter
@joshuapinter
Jul 04 2016 18:10
Okay, nevermind.
I did the throw new Error("Test") and it gets to me to the JS file but with the weird line numbers like you were seeing.
:+1:
Ioannis Kokkinidis
@SudoPlz
Jul 04 2016 18:11
This is what I see
Screen Shot 2016-07-04 at 21.11.26.png
Which is the line of code that the error happened
but since the code is minified (all in one js file) we see the line of code of this huge file
so now we must find a way to upload our code source-maps in the dashboard, so that it shows us the exact line of code, and filename that the error took place
Joshua Pinter
@joshuapinter
Jul 04 2016 18:12
Beauty. So, yeah, we need those sourcemaps in there
Ioannis Kokkinidis
@SudoPlz
Jul 04 2016 18:13
We have to get in contact with bugsnag open-source team
and ask them how to do that
Joshua Pinter
@joshuapinter
Jul 04 2016 18:13
Right on. So you're going to tackle getting in touch with Bugsnag's team?
Ioannis Kokkinidis
@SudoPlz
Jul 04 2016 18:13
well I just sent them a tweet on twitter
they didn't respond yet
we have to find a more direct way of talking to them
maybe if we had an email
or something
Joshua Pinter
@joshuapinter
Jul 04 2016 18:14
Yeah, I'm sure they'll come back with something.
This library is a big win for them. RN is so hot right now. ;)
Ioannis Kokkinidis
@SudoPlz
Jul 04 2016 18:15
yeah
we actually did for free what their developers are paid to do :smile:
its been like months they said they'd do that
Joshua Pinter
@joshuapinter
Jul 04 2016 18:15
mugatu.jpg
Ioannis Kokkinidis
@SudoPlz
Jul 04 2016 18:15
2 days of work was all that was needed to have something..
anyway..
Joshua Pinter
@joshuapinter
Jul 04 2016 18:15
Exactly. They've got a lot on their plate I'm sure.
Ioannis Kokkinidis
@SudoPlz
Jul 04 2016 18:16
I guess so
I didn't know about bugsnag initially
I was about to use sentry
Joshua Pinter
@joshuapinter
Jul 04 2016 18:16
I'm just glad we can use this going forward. Crashlytics was confusing.
What made you find Bugsnag?
Ioannis Kokkinidis
@SudoPlz
Jul 04 2016 18:16
well a guy from sentry
sent me this gist
and on top of it I saw busnag
they actually redirected me to it xD
so I googled it
Joshua Pinter
@joshuapinter
Jul 04 2016 18:17
Haha. Whoops.
Ioannis Kokkinidis
@SudoPlz
Jul 04 2016 18:17
had never heard of it before that :P
Joshua Pinter
@joshuapinter
Jul 04 2016 18:17
I've been using Bugsnag for over two years for Rails and Android. Love the interface.
Ioannis Kokkinidis
@SudoPlz
Jul 04 2016 18:17
I can't wait for them to make a 'React-Native' type of project on the dashboard
one that allows us to also upload source-maps
that would be SO cool
Joshua Pinter
@joshuapinter
Jul 04 2016 18:18
Just a matter of time!
Ioannis Kokkinidis
@SudoPlz
Jul 04 2016 18:18
yeah I guess so
Joshua Pinter
@joshuapinter
Jul 04 2016 18:18
How are you planning on including and Bugsnag() the library in each of your files?
Create a BugsnagInit.js file?
And that inits it, sets the user and the other settings?
Ioannis Kokkinidis
@SudoPlz
Jul 04 2016 18:19
hmm I don't really plan on including it on many files
I will just initialize it once
because I mostly care about unhandled errors
(which hopefully are not many)
For all the other errors, I have created a CrashReporter class
I init Bugsnag on the constructor
and then I expose Bugsnags functions through that
in case I ever want to change from Bugsnag to something else , which I doubt at least for now
so that I don't have to rewrite everything
Joshua Pinter
@joshuapinter
Jul 04 2016 18:24
Good stuff.
Curious, do you have to manually add collaborators on npm? I thought it would just pick it up from the package.json file?
Screenshot 2016-07-04 12.24.17.png
Ioannis Kokkinidis
@SudoPlz
Jul 04 2016 18:25
No idea, let me see if I can add you there, I thought it would automatically do that
What's your npm username?
Joshua Pinter
@joshuapinter
Jul 04 2016 18:26
joshuapinter
Ioannis Kokkinidis
@SudoPlz
Jul 04 2016 18:27
Ok I had to add it manually
Joshua Pinter
@joshuapinter
Jul 04 2016 18:27
Beauty. Thanks. Okay, digging in to some code. Let me know if you hear from Bugsnag.
Ioannis Kokkinidis
@SudoPlz
Jul 04 2016 18:27
Sure man !
Jean-Richard Lai
@jrichardlai
Jul 04 2016 21:10
iOS is a little strange because it seems that you can't override the stacktrace but for android its fine, here is how it looks like for us
Screen Shot 2016-07-04 at 2.10.44 PM.png
( this is Android )
for iOS I just made a tab with a custom stacktrace value
which shows like that
Screen Shot 2016-07-04 at 2.11.49 PM.png
Joshua Pinter
@joshuapinter
Jul 04 2016 22:10
@jrichardlai Yes, good call! Any chance you'd want to add that custom tab stuff into the library?
Jean-Richard Lai
@jrichardlai
Jul 04 2016 23:16
I can make a PR tomorrow