-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StackTrace not included in Electron (Tracekit update resolves this) #201
Comments
So looking at the computeStackTrace method.
In this snippet of code.
The error contains a .stack property but not a .stacktrace property. I notice So it look like |
So the issue appears to be caused by an outdated regex for chrome within the I changed
to
As per the latest Tracekit release https://github.com/csnover/TraceKit/blob/cf5fd10fccde8b4e29586d4f2dba15ba18c72c95/tracekit.js Would it be possible to update Tracekit to resolve this issue. Im not sure if this is an electron specific issue but considering there is a blog post regarding electron support it would be nice if it was supported. https://raygun.com/blog/2015/10/nodejs-desktop-apps-and-tracking-those-elusive-offline-errors/ Also I know theres several issue here regarding updating Tracekit, would you reconsider not using a custom build? |
Hi Emmet, Thanks for raising this issue. We were forced to vendor Tracekit early on as that library was abandoned by the creator a couple of years ago and maintain our own fork, since then as you note it has been picked up by another maintainer and we do have plans to update our dependency to that version. Due to the need to not break backwards compatibility this requires QA as our fork has extra fixes which weren't available while Tracekit was unmaintained, and we can't have regressions with regards to these. There is also a further outstanding issue regarding Tracekit where it causes a spurious warning due to a sychronous XHR call, as analysed by Chrome (even though it isn't called). Due to this we will maintain our own fork but will roll in the updated regexes for you in the near term. |
Thanks @fundead for the detail. Also today I wiped out dependencies and attempted to apply the same fix and for whichever reason it didnt resolve the issue this time. It appears that whatever way Im throwing errors now, the filename in the stack trace isn't prefixed with "file://". Therefore instead of using the following regex
I had to use
I believe the change is pretty safe, but Im gonna raise this with tracekit as well. occ/TraceKit#74 I also ran into an issue in which the stacktrace begun with
I was throwing the error as Also using Again Im not sure why my errors suddenly dropped the file:// prefix but they did, I even tried checking out a previous commit, but the result was the same. Modifying the regex resolved the issue. |
Currently developing a React App in Electron 1.2.3.
Ive noticed that Raygun is not reporting the stacktrace, while the correct stacktrace is printed out in the Chrome console.
Ive noticed by changing the following Im capable of obtaining the stack trace. (Im printing the stack trace out using onBeforeSend and am using the v1 API).
to
Basically skipping that case allows the correct stacktrace to be constructed.
To further confuse the matter, printing out errorObj shows the correct stacktrace.
So it is there but it appears TraceKit.computeStackTrace drops the stack trace.
Ive tried
a++;
(a is undefined) andthrow Error('test error');
to generate the error. Both results are the same.Any help much appreciated, Ill continue investigating.
The text was updated successfully, but these errors were encountered: