Skip to content
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

Part of the stack trace can go missing in Electron on Windows #1063

Closed
teleclimber opened this issue Sep 28, 2017 · 3 comments · Fixed by #1068
Closed

Part of the stack trace can go missing in Electron on Windows #1063

teleclimber opened this issue Sep 28, 2017 · 3 comments · Fixed by #1068

Comments

@teleclimber
Copy link
Contributor

bug

Electron 1.7.8 (Chrome 58)
Windows 7
raven-js 3.17
Hosted Sentry

What is the current behavior?

Part of the stack trace is missing

What is the expected behavior?

The whole stack trace should be sent to Sentry.

The source of the problem is that the regex in tracekit.js fails to match the filename as it is produced by Chrome/Electron under certain conditions (in my case it involves running code from within an iframe).

Typically a frame has the following form:

   at SomeObject.someFunction (file:///C:/Users/path/to/file.js:123:56)

However in some cases it looks like this:

   at SomeObject.someFunction (C:\Users\path\to\file.js:123:56)

Note the lack of file:/// and the Windows-style backslashes.

Could the regex be updated to support this case please? Thank-you.

@kamilogorek
Copy link
Contributor

Hey @teleclimber, would you mind providing a test case and PR with updated regexp?

@teleclimber
Copy link
Contributor Author

Ok so I have made a change in my fork that fixes the problem, and added tests. Everything passes.

However it looks like your pre-commit linter made hundreds of changes in one of the files.

I can PR it or you can tell me how you want to handle this?

master...teleclimber:master

@kamilogorek
Copy link
Contributor

Thanks. Yes, precommit passed the file through prettier, and because it wasn't edited in a long time, it has been updated to up-to-date code style.
It's totally fine the way it is, but could you just split those changes and yours into two separate commits? It'll be easier to distinguish them later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants