Can't get source maps working with Electron

Hi Guys,

I’m having a problem getting source maps working with Electron.

First of all I can’t use the Electron SDK because of this issue https://github.com/getsentry/sentry-electron/issues/92

So I’ve reverted to using the javascript browser SDK. Bugs are reported fine but the source map isn’t working. I’ve got the webpack integration set up and it seems to be uploading the source maps correctly. But the code is still obfuscated in my bug reports. Here is the list of artifacts for the release. Please scroll down for the image of the issue as I’m limited to one image per post.

This is the link to the issue in question: https://sentry.io/caption-pro/electron/issues/792180987/

My webpack integration is set up like this:

new SentryCliPlugin({
  release: require('../package.json').version,
  include: ['/home/joshua/Programs/caption-pro/electron/dist/electron'],
  ignoreFile: '.sentrycliignore',
  ignore: ['node_modules', 'webpack.renderer.config.js'],
  debug: true,
  validate: true,
}),

Thanks in advance for your help!
Josh

I could only post one image in the first post as I’m a new user. Here is the one of the issue itself

Hey, so it looks like your event isn’t normalized correctly.
The file paths of you frames should look something like app:///app/dist...

Can you post a link to your issue directly please?
Also how does you Sentry setup code look like?

Hey thanks for your reply. Here is my sentry setup code:

import * as Sentry from '@sentry/browser'
Sentry.init({
  dsn: SENTRY_DSN,
  integrations: [new Sentry.Integrations.Vue({ Vue })],
  release: require('../../package.json').version
});

Here is the link to the issue: https://sentry.io/caption-pro/electron/issues/792180987/

Ok, that all makes sense, it’s really sad that you can’t use the electron SDK because this would fix this issue.
Not sure if you tried the latest version yet.

You basically have to do this https://github.com/getsentry/sentry-electron/blob/master/src/main/normalize.ts#L59
in your before_send callback.

1 Like

Yeah it is a shame, the electron SDK looks great but still not quite there for me. Yeah I’ve tried the latest version and no luck.

OK cool I’ll give this a go and report back

Actually found out you can do this in bugsnag with the use of wildcards for the file paths so I think I’ll use that. https://docs.bugsnag.com/api/js-source-map-upload/#do-you-support-partial-matching-wildcards-for-the-minified-url

Thanks for your help though much appreciated.

Thanks for the tip re: BugSnag, gonna give that a try!

Hadn’t heard of BugSnag before but it’s working great! Thanks

hi @amcneel

Sorry we have not updated this thread. i was checking with some folks in our discord and this issue should be resolved since quite some time.