#Shutdown and Draining

6 messages · Page 1 of 1 (latest)

merry plaza
#

I am using Flutter, and my app is crashing only for a single user. It is crashing immediately when the user launches the app, so I think it is crashing before Sentry can send any logs.

Per the Shutdown and Draining section of the docs, "The Flutter SDK for Android and iOS stores the Sentry events on the device's disk before shutdown." Where would these get saved on the devices disk? Is this something I can direct the user to look for and send me?

empty scroll
#

hi @merry plaza which platform is it crashing on? Android or iOS?

empty scroll
#

the cache folder is usually located under /data/data/your.package.name/cache/sentry/<sha1_dsn_hash>/. The files with the .envelope extension are the ones you're interested in

merry plaza
#

Thanks Roman! Would that be the /data/ directory in the Android folder?

I tried to replicate the behavior by putting an exit(-1) in my code just after SentryFlutter.init but I don't see any files on my physical android device.

  await SentryFlutter.init(
    (options) {
      options.dsn =
          'removed for security';
      // Adds request headers and IP for users, for more info visit:
      // https://docs.sentry.io/platforms/dart/guides/flutter/data-management/data-collected/
      options.sendDefaultPii = true;
      // Set tracesSampleRate to 1.0 to capture 100% of transactions for tracing.
      // We recommend adjusting this value in production.
      options.tracesSampleRate = 1.0;
      // The sampling rate for profiling is relative to tracesSampleRate
      // Setting to 1.0 will profile 100% of sampled transactions:
      options.profilesSampleRate = 1.0;
    },
    appRunner: () => runApp(SentryWidget(
        child: GetMaterialApp(
      initialRoute: "/",
      debugShowCheckedModeBanner: false,
      color: _themeColor,
      theme: ThemeData(primarySwatch: _themeColor),
      home: MyApp(
        presentUserAgreement: false,
      ),
    ))),
  );
  exit(-1);
merry plaza
#

So it turns out that the clearing the app cache resolved the users crashing problem 🙃