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

[BUG] StackTrace in Sentry is incorrect when using reportCheckedError #213

Open
shenjingfs opened this issue Mar 17, 2022 · 0 comments · May be fixed by #225 or #234
Open

[BUG] StackTrace in Sentry is incorrect when using reportCheckedError #213

shenjingfs opened this issue Mar 17, 2022 · 0 comments · May be fixed by #225 or #234
Assignees
Labels
New issue New issue which has not been checked yet

Comments

@shenjingfs
Copy link

shenjingfs commented Mar 17, 2022

Using Catcher.reportCheckedError to report a catched error, like this:

try {
  // Do some thing
} catch (error, stackTrace) {
  Catcher.reportCheckedError(error, stackTrace);
}

The console log:

I/flutter (15609): [2022-03-17 18:46:53.281839 | Catcher | INFO] ============================== CATCHER LOG ==============================
I/flutter (15609): [2022-03-17 18:46:53.282378 | Catcher | INFO] Crash occurred on 2022-03-17 18:46:53.281426
...
...
I/flutter (15609): [2022-03-17 18:46:53.287439 | Catcher | INFO] ---------- ERROR ----------
I/flutter (15609): [2022-03-17 18:46:53.287509 | Catcher | INFO] IAPError(code: purchase_error, source: google_play, message: BillingResponse.error, details: )
I/flutter (15609): [2022-03-17 18:46:53.287562 | Catcher | INFO] 
I/flutter (15609): [2022-03-17 18:46:53.287738 | Catcher | INFO] ------- STACK TRACE -------
I/flutter (15609): [2022-03-17 18:46:53.287947 | Catcher | INFO] #0      InAppPurchaseController.onError (package:XXXX/in_app_purchase_controller.dart:210:71)
I/flutter (15609): [2022-03-17 18:46:53.287994 | Catcher | INFO] #1      InAppPurchaseController._onIapCallback (package:XXXX/in_app_purchase_controller.dart:149:11)
I/flutter (15609): [2022-03-17 18:46:53.288033 | Catcher | INFO] #2      _rootRunUnary (dart:async/zone.dart:1436:47)
I/flutter (15609): [2022-03-17 18:46:53.288069 | Catcher | INFO] #3      _CustomZone.runUnary (dart:async/zone.dart:1335:19)
I/flutter (15609): [2022-03-17 18:46:53.288106 | Catcher | INFO] #4      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7)
I/flutter (15609): [2022-03-17 18:46:53.288144 | Catcher | INFO] #5      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
I/flutter (15609): [2022-03-17 18:46:53.288184 | Catcher | INFO] #6      _DelayedData.perform (dart:async/stream_impl.dart:591:14)
I/flutter (15609): [2022-03-17 18:46:53.288221 | Catcher | INFO] #7      _StreamImplEvents.handleNext (dart:async/stream_impl.dart:706:11)
I/flutter (15609): [2022-03-17 18:46:53.288258 | Catcher | INFO] #8      _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:663:7)
I/flutter (15609): [2022-03-17 18:46:53.288296 | Catcher | INFO] #9      _rootRun (dart:async/zone.dart:1420:47)
I/flutter (15609): [2022-03-17 18:46:53.288334 | Catcher | INFO] #10     _CustomZone.run (dart:async/zone.dart:1328:19)
I/flutter (15609): [2022-03-17 18:46:53.288375 | Catcher | INFO] #11     _CustomZone.runGuarded (dart:async/zone.dart:1236:7)
I/flutter (15609): [2022-03-17 18:46:53.288414 | Catcher | INFO] #12     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1276:23)
I/flutter (15609): [2022-03-17 18:46:53.288453 | Catcher | INFO] #13     _rootRun (dart:async/zone.dart:1428:13)
I/flutter (15609): [2022-03-17 18:46:53.288491 | Catcher | INFO] #14     _CustomZone.run (dart:async/zone.dart:1328:19)
I/flutter (15609): [2022-03-17 18:46:53.288528 | Catcher | INFO] #15     _CustomZone.runGuarded (dart:async/zone.dart:1236:7)
I/flutter (15609): [2022-03-17 18:46:53.288566 | Catcher | INFO] #16     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1276:23)
I/flutter (15609): [2022-03-17 18:46:53.288605 | Catcher | INFO] #17     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
I/flutter (15609): [2022-03-17 18:46:53.288644 | Catcher | INFO] #18     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
I/flutter (15609): [2022-03-17 18:46:53.288681 | Catcher | INFO] 
I/flutter (15609): [2022-03-17 18:46:53.288731 | Catcher | INFO] ======================================================================
I/flutter (15609): [2022-03-17 18:46:53.288950 | Catcher | INFO] Logging to sentry...
I/flutter (15609): [2022-03-17 18:46:53.296705 | Catcher | INFO] Report result: true

The original stack trace start with InAppPurchaseController.onError (package:XXXX/in_app_purchase_controller.dart:210:71)

The log in Sentry:
image
No matter where the error is catched, StackTrace is always start with sentry_handler.dart in SentryHandler.handle at line 60:26 within catcher

Catcher version

  • Version: 0.6.9

Smartphone (please complete the following information):

  • Device: Xiaomi MIX 4
  • OS: Android 11
@shenjingfs shenjingfs added the New issue New issue which has not been checked yet label Mar 17, 2022
@shenjingfs shenjingfs linked a pull request Jul 1, 2022 that will close this issue
@ThexXTURBOXx ThexXTURBOXx linked a pull request Apr 17, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New issue New issue which has not been checked yet
Projects
None yet
2 participants