getsentry / sentry-dart

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

Any version > 6.2.2 ; "There were 2 problems processing this event" #826

Closed ajonno closed 2 years ago

ajonno commented 2 years ago

Platform:

IDE:

split-debug-info and obfuscate (Flutter Android or iOS) or CanvasKit (Flutter Web):

Platform installed with:

Output of the command flutter doctor -v below:

[✓] Flutter (Channel stable, 2.8.1, on macOS 12.3.1 21E258 darwin-arm, locale en-AU) • Flutter version 2.8.1 at /Users/angusjohnston/fvm/versions/2.8.1 • Upstream repository https://github.com/flutter/flutter.git • Framework revision 77d935af4d (4 months ago), 2021-12-16 08:37:33 -0800 • Engine revision 890a5fca2e • Dart version 2.15.1

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) • Android SDK at /Users/angusjohnston/Library/Android/sdk • Platform android-31, build-tools 31.0.0 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.1) • Xcode at /Applications/Xcode.app/Contents/Developer • CocoaPods version 1.11.2

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

[✓] Android Studio (version 2020.3) • 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 11.0.10+0-b96-7249189)

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

[✓] Connected device (4 available) • Pixel 3 XL (mobile) • 8AWY0RX94 • android-arm64 • Android 12 (API 31) • SM G900I (mobile) • f6569c0e • android-arm • Android 6.0.1 (API 23) • iPhone (mobile) • 00008030-001C710111D8802E • ios • iOS 15.2.1 19C63 • Chrome (web) • chrome • web-javascript • Google Chrome 100.0.4896.75

• No issues found!

The version of the SDK (See pubspec.lock): 6.3.0


I have the following issue: Ever since we updated to any version > 6.2.2 we receive the following errors in the Sentry admin panel. We have made no changes at all to the code that logs to Sentry which has been in place for a long time now. Why are we seeing this?

image
marandaneto commented 2 years ago

@ajonno are you using sentry.io or self-hosted, if self-hosted, which version? Are you enabling the performance feature?

ajonno commented 2 years ago

hi @marandaneto, we are using sentry.io.

We are not using the Performance feature (nb: there is no data in that view in the web portal).

marandaneto commented 2 years ago

@ajonno can you share with us your SDK init (code snippet) and a link to sentry.io where you get this error?

ajonno commented 2 years ago

here's the init:

await SentryFlutter.init(
    (options) {
      options.dsn = BuildConstants.getSentryUrl;
      options.environment = BuildConstants.getCurrentEnvironmentString;
      options.debug = false;
    },
    appRunner: () => runApp(flavoursConfiguration),
  );

I don't want to share a link to our Sentry endpoint here however your support team should have it. The organisation is "arli-health"

marandaneto commented 2 years ago

thanks @ajonno we'll investigate it, the property that causes it is:

{
  "trace": {
    "trace_id": null,
    "span_id": null,
    "op": "noop",
    "status": "unknown",
    "type": "trace"
  }
}

The trace metadata should never be attached to the event since performance is not enabled, also the trace is not valid anyway.

marandaneto commented 2 years ago

@ajonno, for now, you can just ignore it, since the metadata is invalid but everything else works as expected.

ajonno commented 2 years ago

Ok great thanks for quick turnaround much appreciated. Can you please update this ticket once the bug fix has been made available?

stsc3000 commented 2 years ago

👋 We have the same issue. I was able to remove the warnings (at least in some cases) by using SentryNavigatorObserver(enableAutoTransactions: false) (instead of SentryNavigatorObserver()).

We were trying to update from 6.1.2 to 6.4.0.

marandaneto commented 2 years ago

Oh yes, you can disable the auto transaction if you are not using it, https://docs.sentry.io/platforms/flutter/performance/instrumentation/automatic-instrumentation/#routing-instumentation The SDK should not add the trace context if it's a noop anyway, so I'll keep the bug open.