stiftungswo / Dime

DimeERP - Timetracker, Offers & Invoices
MIT License
5 stars 1 forks source link

Sentry Stacktraces parsen #102

Closed tourn closed 6 years ago

tourn commented 6 years ago

Reporter: Zivi


image

Die Sentry Errors vom Dime Frontend sind momentan recht unleserlich, da einfach der stack.toString() in die Fehlermeldung geworfen wird. Schön wäre es, wenn man das Stacktrace Objekt der Sentry API abfüllen könnte - bloss ist toString() wirklich die einzige Methode, die Dart Stacktraces zur Verfügung stellen. Hier liesse sich damit helfen, die String stacktraces zu parsen und von Hand abzufüllen. Hierbei muss aber beachtet werden, dass die Stacktraces von dartdevc anders formatiert zu sein scheinen, als diese vom Production Build.

Einige Stacktraces vom Build:

EXCEPTION: NullError: method not found: 'callMethod$2' on null
STACKTRACE: 
TypeError: Cannot read property 'callMethod$2' of undefined
    at _ViewAppComponentHost0.detectChangesInternal$0 (http://dime-test.stiftungswo.ch/bundles/dimefrontend/build/web/main.dart.js?nocache=1519984137:33501:89)
    at _ViewAppComponentHost0.detectCrash$0 (http://dime-test.stiftungswo.ch/bundles/dimefrontend/build/web/main.dart.js?nocache=1519984137:68788:16)
    at _ViewAppComponentHost0.detectChanges$0 (http://dime-test.stiftungswo.ch/bundles/dimefrontend/build/web/main.dart.js?nocache=1519984137:68775:16)
    at ApplicationRefImpl._runTickGuarded$0 (http://dime-test.stiftungswo.ch/bundles/dimefrontend/build/web/main.dart.js?nocache=1519984137:67390:14)
    at ApplicationRefImpl.tick$0 (http://dime-test.stiftungswo.ch/bundles/dimefrontend/build/web/main.dart.js?nocache=1519984137:67371:16)
    at ApplicationRefImpl._loadComponent$1 (http://dime-test.stiftungswo.ch/bundles/dimefrontend/build/web/main.dart.js?nocache=1519984137:67348:14)
    at ApplicationRefImpl_bootstrap_closure.call$0 (http://dime-test.stiftungswo.ch/bundles/dimefrontend/build/web/main.dart.js?nocache=1519984137:67554:12)
    at ApplicationRefImpl_run_closure.dart.ApplicationRefImpl_run_closure.call$0 (http://dime-test.stiftungswo.ch/bundles/dimefrontend/build/web/main.dart.js?nocache=1519984137:67487:34)
    at StaticClosure.dart._rootRun (http://dime-test.stiftungswo.ch/bundles/dimefrontend/build/web/main.dart.js?nocache=1519984137:7254:18)
    at _ZoneDelegate.run$2 (http://dime-test.stiftungswo.ch/bundles/dimefrontend/build/web/main.dart.js?nocache=1519984137:9738:41)
REASON: 
ORIGINAL EXCEPTION: NullError: method not found: 'callMethod$2' on null
EXCEPTION: XMLHttpRequest error.
STACKTRACE: 
Error
    at Object.StackTrace_current (http://dime-test.stiftungswo.ch/bundles/dimefrontend/build/web/main.dart.js?nocache=1519984137:13460:40)
    at BrowserClient_send_closure0.dart.BrowserClient_send_closure0.call$1 (http://dime-test.stiftungswo.ch/bundles/dimefrontend/build/web/main.dart.js?nocache=1519984137:76669:117)
    at StaticClosure.dart._rootRunUnary (http://dime-test.stiftungswo.ch/bundles/dimefrontend/build/web/main.dart.js?nocache=1519984137:7270:18)
    at _ZoneDelegate.runUnary$3 (http://dime-test.stiftungswo.ch/bundles/dimefrontend/build/web/main.dart.js?nocache=1519984137:9744:41)
    at NgZone.dart.NgZone._runUnary$5 (http://dime-test.stiftungswo.ch/bundles/dimefrontend/build/web/main.dart.js?nocache=1519984137:69947:24)
    at Object.eval (eval at Closure_forwardCallTo (http://dime-test.stiftungswo.ch/bundles/dimefrontend/build/web/main.dart.js?nocache=1519984137:4558:14), <anonymous>:2:47)
    at _CustomZone.runUnary$2 (http://dime-test.stiftungswo.ch/bundles/dimefrontend/build/web/main.dart.js?nocache=1519984137:9878:41)
    at _FutureListener.handleValue$1 (http://dime-test.stiftungswo.ch/bundles/dimefrontend/build/web/main.dart.js?nocache=1519984137:7808:34)
    at _Future__propagateToListeners_handleValueCallback.call$0 (http://dime-test.stiftungswo.ch/bundles/dimefrontend/build/web/main.dart.js?nocache=1519984137:8238:60)
    at Object._Future__propagateToListeners (http://dime-test.stiftungswo.ch/bundles/dimefrontend/build/web/main.dart.js?nocache=1519984137:8102:108)
REASON: 
ORIGINAL EXCEPTION: XMLHttpRequest error.

Ein Stacktrace ab Dartdevc:

EXCEPTION: Exception: WOOP WOOP
STACKTRACE: 
dart:_runtime                                           throw
packages/DimeClient/src/component/main/app.dart 103:14  AppComponent.boing
dart:async                                              <fn>
packages/angular/src/core/zone/ng_zone.dart 175:20      <fn>
dart:async                                              f
packages/angular/src/core/zone/ng_zone.dart 311:22      NgZone.runGuarded
packages/angular/src/core/linker/app_view.dart 573:44   fn.event

REASON: 
ORIGINAL EXCEPTION: Exception: WOOP WOOP
paulsonnenschein commented 6 years ago

https://pub.dartlang.org/packages/stack_trace benutzen?

https://pub.dartlang.org/packages/logging_service Als kleine Referenz

tourn commented 6 years ago

Auch: Wir schicken window.location eigentlich als culprit mit, aber aktuell taucht dies nicht auf in Sentry. Wieso?