getsentry / sentry-dart

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

_Exception Exception: operation failed #2139

Closed zeqinjie closed 3 months ago

zeqinjie commented 4 months ago

Platform

Dart

Obfuscation

Enabled

Debug Info

Enabled

Doctor

[✓] Flutter (Channel stable, 3.19.3, on macOS 14.5 23F79 darwin-arm64, locale zh-Hans-CN) • Flutter version 3.19.3 on channel stable at /Users/zhengzeqin/fvm/versions/3.19.3 • Upstream repository https://github.com/flutter/flutter.git • Framework revision ba39319843 (4 个月前), 2024-03-07 15:22:21 -0600 • Engine revision 2e4ba9c6fb • Dart version 3.3.1 • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/zhengzeqin/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • ANDROID_SDK_ROOT = /Users/zhengzeqin/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3) • Xcode at /Applications/Xcode-15.3.0.app/Contents/Developer • Build 15E204a • CocoaPods version 1.15.2

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

[✓] VS Code (version 1.90.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.90.0

[✓] Connected device (5 available) • iPhone 15 Pro (mobile) • 3A9ACA4C-FB70-48FC-AB84-FCE23B1DBC2E • ios • com.apple.CoreSimulator.SimRuntime.iOS-17-5 (simulator) • iPhone 15 Pro Max (mobile) • 76A065E5-CE1B-403B-B5B3-83E2C3CC6992 • ios • com.apple.CoreSimulator.SimRuntime.iOS-17-5 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 14.5 23F79 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 126.0.6478.127

[✓] Network resources • All expected network resources are available.

Version

8.3.0

Steps to Reproduce

we meet this issuse on Google Map only iOS Device

image

Expected Result

[Stack Trace]

_Exception
Exception: operation failed
stacktrace_utils.dart location getCurrentStackTrace line 10 in sentry
In App
sentry_exception_factory.dart location SentryExceptionFactory.getSentryException line 45 in sentry
In App
sentry_client.dart location SentryClient._prepareEvent line 201 in sentry
In App
sentry_client.dart location SentryClient.captureEvent line 95 in sentry
In App
hub.dart location Hub.captureException line 173 in sentry
In App
Called from: <asynchronous suspension>
tw_sentry_apm.dart location SentryApm.captureException

Actual Result

how do we fix it ? thx~

Are you willing to submit a PR?

None

buenaflor commented 4 months ago

Hi, do you know if this is reproducible?

Is this only on iOS a problem?

zeqinjie commented 4 months ago

Hi, do you know if this is reproducible?

Is this only on iOS a problem?

@buenaflor i don't know。 yes it only on iOS

we meet the other quesion, maybe was same quesion? flutter issues

image
buenaflor commented 4 months ago

_Exception Exception: operation failed stacktrace_utils.dart location getCurrentStackTrace line 10 in sentry In App sentry_exception_factory.dart location SentryExceptionFactory.getSentryException line 45 in sentry In App sentry_client.dart location SentryClient._prepareEvent line 201 in sentry In App sentry_client.dart location SentryClient.captureEvent line 95 in sentry In App hub.dart location Hub.captureException line 173 in sentry In App Called from: tw_sentry_apm.dart location SentryApm.captureException

is that the whole stacktrace?

zeqinjie commented 4 months ago

_Exception Exception: operation failed stacktrace_utils.dart location getCurrentStackTrace line 10 in sentry In App sentry_exception_factory.dart location SentryExceptionFactory.getSentryException line 45 in sentry In App sentry_client.dart location SentryClient._prepareEvent line 201 in sentry In App sentry_client.dart location SentryClient.captureEvent line 95 in sentry In App hub.dart location Hub.captureException line 173 in sentry In App Called from: tw_sentry_apm.dart location SentryApm.captureException

is that the whole stacktrace?

@buenaflor yes

buenaflor commented 4 months ago

Can you show me the code snippet for SentryApm.captureException ? how do you use it

zeqinjie commented 4 months ago

Can you show me the code snippet for SentryApm.captureException ? how do you use it @buenaflor


runZonedGuarded(() async {
WidgetsFlutterBinding.ensureInitialized();
await TwFirebase().initFirebase();
await initSentry(() {
runTWApp(
args,
observers: [
// Sentry 的 NavigatorObserver
SentryApm().navigatorObserver(),
],
);
});
}, (exception, stackTrace) async {
captureException(
exception,
stackTrace: stackTrace,
);
}, zoneSpecification: ZoneSpecification(
print: (Zone self, ZoneDelegate parent, Zone zone, String message) {
if (canPrint) {
parent.print(zone, message);
}
},
));

captureException( dynamic exception, { dynamic stackTrace, }) async { await Sentry.captureException( exception, stackTrace: stackTrace, ); }

krystofwoldrich commented 4 months ago

@zeqinjie Thank you for sharing the code snippet, we will investigate it shortly.

buenaflor commented 3 months ago

Hey just an update, this is related to this pr: https://github.com/getsentry/sentry-dart/pull/2152

this will improve upon the stacktrace so it's easier to debug

zeqinjie commented 3 months ago

Hey just an update, this is related to this pr: #2152

this will improve upon the stacktrace so it's easier to debug

@buenaflor thx, i will try next version

buenaflor commented 3 months ago

Closing this issue now. Please try out 8.5.0 when it is released and let me know if there are still problems