sentry-dart icon indicating copy to clipboard operation
sentry-dart copied to clipboard

[Flutter Desktop Linux] sentry_init fails on fresh flutter app

Open jefflongo opened this issue 4 months ago • 7 comments

Platform

Flutter Desktop Linux

Obfuscation

Disabled

Debug Info

Disabled

Doctor

[✓] Flutter (Channel stable, 3.32.4, on Ubuntu 24.04.2 LTS 6.8.0-62-generic, locale en_US.UTF-8) [170ms]
    • Flutter version 3.32.4 on channel stable at ~/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 6fba2447e9 (12 days ago), 2025-06-12 19:03:56 -0700
    • Engine revision 8cd19e509d
    • Dart version 3.8.1
    • DevTools version 2.45.1

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [1,183ms]
    • Android SDK at ~/Android/Sdk
    • Platform android-36, build-tools 35.0.0
    • Java binary at: /opt/android-studio/jbr/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.5+-12932927-b750.29)
    • All Android licenses accepted.

[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome) [106ms]
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Linux toolchain - develop for Linux desktop [334ms]
    • Ubuntu clang version 21.0.0 (++20250624083533+8d9911e4a06c-1~exp1~20250624083644.991)
    • cmake version 3.28.3
    • ninja version 1.11.1.git.kitware.jobserver-1
    • pkg-config version 1.8.1
    • OpenGL core renderer: NVIDIA GeForce RTX 3070/PCIe/SSE2 (X11)
    • OpenGL core version: 4.6.0 NVIDIA 550.144.03 (X11)
    • OpenGL core shading language version: 4.60 NVIDIA (X11)
    • OpenGL ES renderer: NVIDIA GeForce RTX 3070/PCIe/SSE2 (X11)
    • OpenGL ES version: OpenGL ES 3.2 NVIDIA 550.144.03 (X11)
    • OpenGL ES shading language version: OpenGL ES GLSL ES 3.20 (X11)
    • GL_EXT_framebuffer_blit: yes (X11)
    • GL_EXT_texture_format_BGRA8888: yes (X11)

[✓] Android Studio (version 2024.3) [104ms]
    • Android Studio at /opt/android-studio
    • Flutter plugin version 86.0.1
    • Dart plugin version 243.26753.1
    • android-studio-dir = /opt/android-studio
    • Java version OpenJDK Runtime Environment (build 21.0.5+-12932927-b750.29)

[✓] VS Code (version unknown) [15ms]
    • VS Code at /snap/code/current/usr/share/code
    • Flutter extension version 3.112.0
    ✗ Unable to determine VS Code version.

[✓] Connected device (1 available) [88ms]
    • Linux (desktop) • linux • linux-x64 • Ubuntu 24.04.2 LTS 6.8.0-62-generic

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

Version

9.1.0

Steps to Reproduce

Create app from template:

flutter create -t app my-app
cd my-app
flutter pub add sentry_flutter

Modify main.dart:

Future<void> main() async {
  await SentryFlutter.init((options) {
    options.dsn = 'some-dsn'; // insert dsn here
    options.diagnosticLevel = SentryLevel.debug;
  }, appRunner: () => runApp(const MyApp()));
}

Build and run:

flutter build linux
flutter run

Expected Result

Sentry builds and launches successfully.

Actual Result

Several warnings while compiling flutter build linux, still builds though.

~/Downloads/my-app/build/linux/x64/release/_deps/sentry-native-src/external/crashpad/util/linux/thread_info.cc:22:10: warning: first argument in call to 'memset' is a pointer to non-trivially copyable type 'crashpad::ThreadContext' [-Wnontrivial-memcall]
~/Downloads/my-app/build/linux/x64/release/_deps/sentry-native-src/external/crashpad/util/linux/thread_info.cc:28:10: warning: first argument in call to 'memset' is a pointer to non-trivially copyable type 'crashpad::FloatContext' [-Wnontrivial-memcall]
/usr/bin/ld: warning: crashpad_info_note.S.o: missing .note.GNU-stack section implies executable stack
/usr/bin/ld: warning: crashpad_info_note.S.o: missing .note.GNU-stack section implies executable stack

Log messages indicating that sentry_init failed due to invalid handler_path

(com.example.fluttertest:76207): Atk-CRITICAL **: 13:58:20.973: atk_socket_embed: assertion 'plug_id != NULL' failed
[sentry] INFO using database path "~/Downloads/my-app/.sentry-native"
[sentry] DEBUG starting transport
[sentry] DEBUG starting background worker thread
[sentry] DEBUG starting backend
[sentry] DEBUG background worker thread started
[sentry] WARN unable to start crashpad backend, invalid handler_path
[sentry] WARN failed to initialize backend
[sentry] WARN `sentry_init` failed
[sentry] DEBUG shutting down transport
[sentry] DEBUG shutting down background worker thread
[sentry] DEBUG submitting task to background worker thread
[sentry] DEBUG executing task on worker thread
[sentry] DEBUG background worker thread shut down

Are you willing to submit a PR?

No

jefflongo avatar Jun 24 '25 21:06 jefflongo