sentry-electron icon indicating copy to clipboard operation
sentry-electron copied to clipboard

`electron-download` should be replaced by `@electron/get`

Open BasixKOR opened this issue 3 years ago • 11 comments

The code that Sentry Wizard generates when creating an Electron application depends on electron-download which is no longer maintained. This should be migrated to use @electron/get instead.

BasixKOR avatar Jul 15 '22 05:07 BasixKOR

Going to move this one to the electron repo so it can be tracked there!

AbhiPrasad avatar Jul 29 '22 20:07 AbhiPrasad

Looking through the existing script, it can be updated to use @electron/get reasonably trivially but I have further questions around the script and whether it still even required!

It looks like the script uploads dsym for macOS and breakpad symbols for every other platform. Looking at whats available in Electron releases, would it be better to upload pdbs for Windows or will breakpad symbols result in better stack traces? I think Sentrys pdb support has improved significantly since this script was first created.

It looks like Electron are already uploading symbols/sources to Sentry on release? https://github.com/electron/electron/blob/0696320d28157539febd4547c872be7ff50d5f60/script/release/uploaders/upload-symbols.py

Sentry has the option of enabling the Electron symbol server: image

Does the Electron symbol server here negate the need to upload symbols? I seem to remember an issue where this didn't work on Windows because the executable gets renamed. If that's the case, maybe we only need to upload Windows symbols?

Lastly, there's also the issue that Electron dsym for macOS x64 exceeds the 2GB upload limit and are not uploaded!

timfish avatar Aug 01 '22 14:08 timfish

I lack the context for this side of Sentry, so asked around internally for some help!

AbhiPrasad avatar Aug 02 '22 14:08 AbhiPrasad

When I get some time I need to run some tests against a new Sentry project with the Electron symbol server enabled to see if the stack traces are all there without uploading symbols.

timfish avatar Aug 02 '22 14:08 timfish

@MarshallOfSound seems to have made the the symbol upload script in the main electron repo, perhaps he can chime in with more context.

Some extra context from @jan-auer

  1. Long time ago, the symbol server only had breakpad ascii files, but we wanted the native files. Maybe the symbol server now has everything. If not, we could ask the Electron folks to change their uploader script. That would be the best solution.
  2. For custom electron builds you still need to upload yourself, the symbol server won't have the right debug files. In such cases it's still better to upload native files.
  3. Caveat: some files are now larger than 2GB. These can't be uploaded, so we need to rely on the ascii files after all. That's mostly why our upload script doesn't upload the native files in all cases. There's no other workaround at the moment.

AbhiPrasad avatar Aug 03 '22 17:08 AbhiPrasad

To clarify, if the debug file is larger than 2 gigs on the symbol server it won't be used?

Currently our symbol server only serves breakpad files afaik

MarshallOfSound avatar Aug 03 '22 17:08 MarshallOfSound

To clarify, if the debug file is larger than 2 gigs on the symbol server it won't be used?

A large debug file on the symbol server should be fine, this was more highlighting that sentry-cli can't upload files larger than 2 GB atm. Maybe @kamilogorek has more details on upload-dif?

AbhiPrasad avatar Aug 03 '22 20:08 AbhiPrasad

2GB is the hard limit that we have on uploaded debug symbols. There are 2 ways in case you need to upload and use something larger than that:

  • use an external symbol server - https://docs.sentry.io/platforms/apple/guides/macos/data-management/debug-files/symbol-servers/ (recommended way)
  • host your own instance of Sentry, that allows you to override this setting if your infrastructure allows that

kamilogorek avatar Aug 04 '22 09:08 kamilogorek

I've just tested these with Electron v20.0.0 and a Sentry project with Electron symbol server enabled:

Full stack traces are displayed and it looks like the source code is included for Windows.

So what to do with the wizard?

Is there a way via the Sentry API to add symbol servers? It would be great if the wizard could enable this or can it get enabled automatically for new Electron projects?

timfish avatar Aug 04 '22 17:08 timfish

Maybe we just remove the uploader script from the wizard then? Let me ask folks internally about automatically enabling the Electron symbol server.

AbhiPrasad avatar Aug 04 '22 18:08 AbhiPrasad

Yeah, I think our symbol server should be fine for 99% of crashes. If there are issues with the server (stability, missing symbols, etc.) lemme know, it's something we can potentially look at

MarshallOfSound avatar Aug 04 '22 18:08 MarshallOfSound

Wizard update released with https://github.com/getsentry/sentry-wizard/releases/tag/v2.0.2

AbhiPrasad avatar Aug 16 '22 15:08 AbhiPrasad