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

Sentry logs additionall error #2767

Closed
1 task done
btpy opened this issue Jul 23, 2020 · 3 comments · Fixed by #2770
Closed
1 task done

Sentry logs additionall error #2767

btpy opened this issue Jul 23, 2020 · 3 comments · Fixed by #2770

Comments

@btpy
Copy link

btpy commented Jul 23, 2020

  • @sentry/browser

Version:

"@sentry/browser": "5.20.0"
"@angular/core": "9.1.5"

Description

When logging an error, Sentry produces additional error from this method.
Can it be connected to some Sentry setup errors? Thanks.

/** Maps Dsn components into this instance. */
    Dsn.prototype._fromComponents = function (components) {
        this.protocol = components.protocol;
        this.user = components.user;
        this.pass = components.pass || '';
        this.host = components.host;
        this.port = components.port || '';
        this.path = components.path || '';
        this.projectId = components.projectId;
    };
    Uncaught TypeError: Cannot read property 'protocol' of undefined
    at Dsn.push../node_modules/@sentry/utils/esm/dsn.js.Dsn._fromComponents (dsn.js:59)
    at new Dsn (dsn.js:15)
    at new API (api.js:8)
    at injectReportDialog (helpers.js:144)
    at BrowserClient.push../node_modules/@sentry/browser/esm/client.js.BrowserClient.showReportDialog (client.js:73)
    at Module.showReportDialog (sdk.js:98)
    at SentryErrorHandler.push../src/app/main/services/sentry-error-handler.service.ts.SentryErrorHandler.handleError (sentry-error-handler.service.ts:65)
    at Object.next (core.js:28922)
    at SafeSubscriber.schedulerFn [as _next] (core.js:25731)
    at SafeSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.__tryOrUnsub (Subscriber.js:192)
    at SafeSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.next (Subscriber.js:130)
    at Subscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._next (Subscriber.js:76)
    at Subscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next (Subscriber.js:53)
    at EventEmitter.push../node_modules/rxjs/_esm5/internal/Subject.js.Subject.next (Subject.js:47)
    at EventEmitter.push../node_modules/@angular/core/__ivy_ngcc__/fesm5/core.js.EventEmitter.emit (core.js:25713)
    at core.js:28387
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:386)
    at Zone.push../node_modules/zone.js/dist/zone.js.Zone.run (zone.js:143)
    at NgZone.push../node_modules/@angular/core/__ivy_ngcc__/fesm5/core.js.NgZone.runOutsideAngular (core.js:28304)
    at Object.onHandleError (core.js:28387)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.handleError (zone.js:390)
    at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:191)
    at push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask (zone.js:503)
    at ZoneTask.invoke (zone.js:492)
    at timer (zone.js:3034)```
@kamilogorek
Copy link
Contributor

Yes, it looks like your dsn config option is malformed. Can you paste your Sentry.init call here?

@btpy
Copy link
Author

btpy commented Jul 23, 2020

@kamilogorek Sentry server is self-hosted, init contains only dsn key.

@kamilogorek
Copy link
Contributor

It was indeed a bug. PR merged and will release the patch on Monday morning if that's fine (in the meantime you can use 5.19.2 which doesn't have the bug included). Cheers!

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

Successfully merging a pull request may close this issue.

2 participants