Getting 403 error on any event sent try
Versions + Platform
- [ ] SDK version -
@sentry/electron@>=v2.0.0 - [ ] Electron version -
[email protected] - [ ] Platform -
Windows/macOS/Linux
Description
Can't send any events when using @sentry/electron >=2.0.0 version
Got Sentry Logger [Error]: Error while sending event: SentryError: HTTP Error (403)
Downgrading @sentry/electron to <2.0.0 (currently 1.5.2) fix that behavior.
Code:
main.ts
import * as Sentry from '@sentry/electron';
Sentry.init({
dsn: __DSN_GOES_HERE__,
debug: true,
});
throw new Error('Dalek says EXTERMINATE!!!');
// or
// Sentry.captureException(new Error('Dalek says EXTERMINATE!!!'));
console output:
Sentry Logger [Log]: Integration installed: InboundFilters
Sentry Logger [Log]: Integration installed: FunctionToString
Sentry Logger [Log]: Integration installed: Console
Sentry Logger [Log]: Integration installed: Http
Sentry Logger [Log]: Integration installed: OnUnhandledRejection
Sentry Logger [Log]: Integration installed: LinkedErrors
Sentry Logger [Log]: Integration installed: OnUncaughtException
Sentry Logger [Log]: Integration installed: Electron
App threw an error during load
Error: Dalek says EXTERMINATE!!!
at Object.<anonymous> (/Users/***/projects/***/dist/main.js:9:7)
at Module._compile (internal/modules/cjs/loader.js:968:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:986:10)
at Module.load (internal/modules/cjs/loader.js:816:32)
at Module._load (internal/modules/cjs/loader.js:728:14)
at Module._load (electron/js2c/asar.js:717:26)
at Function.Module._load (electron/js2c/asar.js:717:26)
at loadApplicationPackage (/Users/***/projects/***/node_modules/electron/dist/Electron.app/Contents/Resources/default_app.asar/main.js:109:16)
at Object.<anonymous> (/Users/***/projects/***/node_modules/electron/dist/Electron.app/Contents/Resources/default_app.asar/main.js:155:9)
at Module._compile (internal/modules/cjs/loader.js:968:30)
Sentry Logger [Log]: Found 0 minidumps
Sentry Logger [Error]: Error while sending event: SentryError: HTTP Error (403)
@Fargard did you find any solution to this? I am also facing the same issue.
@ashish-1689 no. I'm still on 1.5.2.
I am also facing the same issue. with electron 15.3.0 and @sentry/electron^2.5.4
Since this issue doesn't appear to be that widespread and I can't reproduce it personally, I would need more information.
403 seems to suggest an issue with your DSN or a proxy somewhere or a server issue. Are you using sentry.io or self hosted?
If you can't update past 1.5.2, that will be because v2 had a breaking change requiring a more recent Sentry server version: https://github.com/getsentry/sentry-electron/blob/master/CHANGELOG.md#200
electron 16.0.7 and @sentry/electron^2.5.4
the same issue
We have just released v3.0.0 of the SDK which includes a lot of changes and improvements since this issue was opened.
If you can still reproduce this with v3, please open a new issue and I'll look into it.
I am also facing the same issue. electron 18.3.5 @sentry/electron 3.0.7 and Sentry server version 21.8.0
You may have configured your sentry project to be domain restricted and the requests now come from a different domain ( including subdomain or even just different protocoll) thats when you get a 403 error