#sentry_flutter v9.0.0-beta.2 - "Failed to initialize SDK"

14 messages · Page 1 of 1 (latest)

jagged pier
#

Hello folks,
when trying out v9.0.0-beta.2 on linux I get the stacktrace below, does the beta not support linux yet?

[sentry] INFO using database path "/home/spydon/repos/relaycore/packages/client/.sentry-native"
[sentry] DEBUG starting transport
[sentry] DEBUG starting background worker thread
[sentry] DEBUG starting backend
[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 background worker thread started
[sentry] WARN background thread failed to shut down cleanly within timeout
[sentry] DEBUG executing task on worker thread
[sentry] DEBUG background worker thread shut down
[sentry] [error] Native call `init` failed
         Bad state: Failed to initialize native SDK - init() exit code: 1
         #0      SentryNative.init.<anonymous closure> (package:sentry_flutter/src/native/c/sentry_native.dart:53:11)
         #1      SentryNativeSafeInvoker.tryCatchSync (package:sentry_flutter/src/native/sentry_native_invoker.dart:27:16)
         #2      SentryNative.init (package:sentry_flutter/src/native/c/sentry_native.dart:49:7)
         #3      NativeSdkIntegration.call (package:sentry_flutter/src/integrations/native_sdk_integration.dart:29:21)
         #4      Sentry._callIntegrations (package:sentry/src/sentry.dart:192:34)
         <asynchronous suspension>
         #5      Sentry._init (package:sentry/src/sentry.dart:181:9)
         <asynchronous suspension>
         #6      Sentry.init (package:sentry/src/sentry.dart:84:5)
         <asynchronous suspension>
         #7      SentryFlutter.init (package:sentry_flutter/src/sentry_flutter.dart:100:5)
         <asynchronous suspension>
         #8      main (package:relaycore/main.dart:87:3)
         <asynchronous suspension>
#

I guess you're the best person to answer @urban oriole? 🙂

urban oriole
#

Hm no we do support it, can you try 9.0.0-RC.4 and check if this problem persists

#

[sentry] WARN unable to start crashpad backend, invalid handler_path

@cosmic bluff do you know what's wrong here? invalid handler_path

cosmic bluff
#

Hmmm seems like it's (attempting) initializing the Native SDK with the Crashpad backend , but the crashpad_handler executable isn't found on the given path. Will look into how this gets set up from the Flutter side 🔍 🕵️‍♂️

urban oriole
#

in any case, the crashpad executable should be compiled with sentry_native so it's odd that it's not finding it

let's see if it also happens with 9.0.0, we released it today so you can try it out

jagged pier
#

I get the same stacktrace with 9.0.0:

         Bad state: Failed to initialize native SDK - init() exit code: 1
         #0      SentryNative.init.<anonymous closure> (package:sentry_flutter/src/native/c/sentry_native.dart:52:11)
         #1      SentryNativeSafeInvoker.tryCatchSync (package:sentry_flutter/src/native/sentry_native_invoker.dart:27:16)
         #2      SentryNative.init (package:sentry_flutter/src/native/c/sentry_native.dart:48:7)
         #3      NativeSdkIntegration.call (package:sentry_flutter/src/integrations/native_sdk_integration.dart:29:21)
         #4      Sentry._callIntegrations (package:sentry/src/sentry.dart:193:34)
         <asynchronous suspension>
         #5      Sentry._init (package:sentry/src/sentry.dart:182:9)
         <asynchronous suspension>
         #6      Sentry.init (package:sentry/src/sentry.dart:85:5)
         <asynchronous suspension>
         #7      SentryFlutter.init (package:sentry_flutter/src/sentry_flutter.dart:100:5)
         <asynchronous suspension>
         #8      main (package:relaycore/main.dart:88:3)
         <asynchronous suspension>

(Slightly different lines since the code have changed, so posting it again)

#

It creates a directory here ~/repos/relaycore/packages/client/.sentry-native/a0252336-7d04-455e-c5ef-18e66acbaadb.run, but it's empty

urban oriole
#

can you try setting the environment var SENTRY_NATIVE_BACKEND=breakpad and compiling again

I want to check if it's only crashpad that's having an issue

urban oriole
#

if it doesn't work even with breakpad I'd suggest setting the SENTRY_NATIVE_BACKEND=none

it's not a critical feature so we can safely disable it

urban oriole
jagged pier
#

Sorry for the late reply, missed that you had replied. 🙂

#

Setting SENTRY_NATIVE_BACKEND=breakpad works

jagged pier