getsentry / sentry-dart

Sentry SDK for Dart and Flutter
https://sentry.io/for/flutter/
MIT License
746 stars 227 forks source link

Sentry failed to fetch errors with little information on failed event and miscellaneous stacktrace. #2276

Open rutvik-pieces opened 1 week ago

rutvik-pieces commented 1 week ago

Platform

Dart Web

Obfuscation

Enabled

Debug Info

Enabled

Doctor

Dart SDK version: 3.5.0-180.3.beta (beta)

Version

7.7.0

Steps to Reproduce

Not able to reproduce myself.

Expected Result

Reported error should've some more information on which fetch requests are failing.

Actual Result

Following error has been flooding our sentry dashboard since last 2 days. Thousands of such reports have been coming in. The error indicates that a fetch request is failing but doesn't really give any more info into which fetch requests are failing and why. Also, the stacktrace is pointing to some Sentry error reporting apis which has me confused as to whats actually going on here.

JSObject: TypeError: Failed to fetch
  at Object.StackTrace_current(content.dart.js:6034:38)
  at SentryClient._prepareEvent$2$stackTrace(content.dart.js:72094:28)
  at <fn>(content.dart.js:71954:43)
  at _wrapJsFunctionForAsync_closure.$protected(content.dart.js:4347:15)
  at _wrapJsFunctionForAsync_closure.call$2(content.dart.js:32401:12)
  at Object._asyncStartSync(content.dart.js:4311:20)
  at SentryClient.captureEvent$4$hint$scope$stackTrace(content.dart.js:72032:16)
  at <fn>(content.dart.js:70375:48)
  at _wrapJsFunctionForAsync_closure.$protected(content.dart.js:4347:15)
  at _wrapJsFunctionForAsync_closure.call$2(content.dart.js:32401:12)

Are you willing to submit a PR?

None

buenaflor commented 1 week ago

is there a possibility to upgrade your sdk version? we've done some minor changes to stacktrace fetching so it might help

but for some context: sometimes unhandled errors simply do not have stacktraces attached so we do our best by calling StackTrace.current but in some cases for example async it won't capture the whole context which I suspect has happened here.

rutvik-pieces commented 1 week ago

@buenaflor Thanx for the info! We're shipping a new build with latest sentry version 8.8.0. Will let u know if it helps in anyway.