getsentry / sentry-dart

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

SystemNavigator.pop may cause slow cold boot #1804

Closed ltq918 closed 9 months ago

ltq918 commented 10 months ago

Platform

Flutter Mobile

Obfuscation

Enabled

Debug Info

Disabled

Doctor

Doctor output ```console Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.16.5, on Microsoft Windows [版本 10.0.22631.2861], locale zh-CN) [√] Windows Version (Installed version of Windows is version 10 or higher) [!] Android toolchain - develop for Android devices (Android SDK version 33.0.2) X Android license status unknown. Run `flutter doctor --android-licenses` to accept the SDK licenses. See https://flutter.dev/docs/get-started/install/windows#android-setup for more details. [√] Chrome - develop for the web [√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.2.6) [√] Android Studio (version 2023.1) [√] VS Code (version 1.85.1) [!] Proxy Configuration ! NO_PROXY is not set [√] Connected device (5 available) [√] Network resources ! Doctor found issues in 2 categories. ```

Version

7.14.0

Steps to Reproduce

Some of my Android users have reported that they sometimes spend a lot of time on the splash screen. I did some testing and found that when using sentry_flutter, once I close the app by double-clicking back to exit (using SystemNavigator.pop), it takes a long time to enter the app again. (about 5-30 seconds), which may take longer than a fresh install or using Android Task Manager to cross out the app and restart (which only takes 1-3 seconds)

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:sentry_flutter/sentry_flutter.dart';

const Color darkBlue = Color.fromARGB(255, 18, 32, 47);

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await SentryFlutter.init(
    (options) {
      options.dsn =
          'https://example.ingest.sentry.io/example';
      options.tracesSampleRate = 1.0;
    },
    appRunner: () => SystemChrome.setPreferredOrientations([
      DeviceOrientation.portraitUp,
      DeviceOrientation.portraitDown,
    ]).then((_) {
      runApp(
        DefaultAssetBundle(
          bundle: SentryAssetBundle(),
          child: MyApp(),
        ),
      );
    }),
  );
  FocusManager.instance.primaryFocus?.unfocus(); 
  SystemChannels.textInput.invokeMethod('TextInput.hide');
  SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
      overlays: [SystemUiOverlay.top]);
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData.dark().copyWith(
        scaffoldBackgroundColor: darkBlue,
      ),
      debugShowCheckedModeBanner: false,
      home: const Scaffold(
        body: Center(
          child: MyWidget(),
        ),
      ),
    );
  }
}

class MyWidget extends StatefulWidget {
  const MyWidget({Key? key}) : super(key: key);

  @override
  State<MyWidget> createState() => _MyWidgetState();
}

class _MyWidgetState extends State<MyWidget> {
  DateTime? _lastPressedAt;

  @override
  Widget build(BuildContext context) {
    return WillPopScope(
      onWillPop: () async {
        if (_lastPressedAt == null ||
            DateTime.now().difference(_lastPressedAt!) >
                const Duration(seconds: 2)) {
          _lastPressedAt = DateTime.now();
          ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
            content: Text("Press again to exit the program"),
          ));
          return false;
        }

        SystemNavigator.pop();
        return true;
      },
      child: Center(
        child: Text(
          'Hello, World!',
          style: Theme.of(context).textTheme.headline6,
        ),
      ),
    );
  }
}

Expected Result

The expected result is that when closing using SystemNavigator.pop, the startup speed is not affected and is as fast as opening after installation, or as fast as opening after closing using task management.

Actual Result

The actual result is that when using SystemNavigator.pop to close and launch the startup page, it takes a long time, which may depend on device performance. When you are currently facing a similar issue, use the system task card to close the app and reopen it to launch it quickly.

Are you willing to submit a PR?

None

buenaflor commented 10 months ago

Thank you for the report. We will investigate this

buenaflor commented 10 months ago

Hi I've tested your sample and I cannot reproduce the slow startup after closing it through SystemNavigator.pop and reopening.

Which android version and device are you testing it on? More information on steps to reproduce would be helpful!

ltq918 commented 10 months ago

Hello, thank you for your attention to this issue. The difference between using real devices and release mode is more obvious, and the difference between low- and medium-performance models is even more obvious. I tested on an Android 13-based Honor device (Qualcomm Snapdragon 6 Gen 1) and an Android 10-based Xiaomi device (Qualcomm Snapdragon 845). They can currently reproduce the issue, but the emulator for Android 13 seems unable to detect the difference. I just performed the following steps and confirmed that the problem still exists, and it should be traced back to at least the flutter version and sentry_flutter version in September last year.

Steps to reproduce:

  1. Launch Visual Studio Code and open the command palette (with F1 or Ctrl+Shift+P or Shift+Cmd+P). Start typing "flutter new". Select the Flutter: New Project command.
  2. Add sentry_flutter dependency
  3. Copy the main.dart mentioned above and modify options.dsn = 'https://example.ingest.sentry.io/example'; for your own
  4. Modify distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip in your_project/android/gradle/wrapper/gradle-wrapper.properties
  5. flutter run --release select your real machine
ltq918 commented 10 months ago

The video may be a good demonstration of the previously described problem. We can find that once you use side swipe twice and trigger SystemNavigator.pop to exit, starting it again will be very time-consuming, but if you interrupt it through the task manager during the time-consuming stage , you can quickly open it

https://github.com/getsentry/sentry-dart/assets/16819135/edb4ba02-8c72-48da-977f-b3b6bd434d53

buenaflor commented 10 months ago

Thank you for the comprehensive steps! We will take a look

buenaflor commented 10 months ago

Just for more clarification as I don't have a lower perf phone on hand right now (will test on one soon): this does not happen without the Sentry SDK?

Could you also reproduce it set up with options.debug = true; and send me a snippet of what was logged

ltq918 commented 10 months ago

Sorry it will take a while before I can provide the logs after options.debug = true;. But I have some different new information here. I found a mobile phone with the latest high-performance chip for testing, and ruled out performance reasons. I'm sorry that I misled the direction of this incident.

This problem may be related to the network. The availability of some links varies depending on the country and region. The current problem will not occur in airplane mode or when the network is smooth. When starting after SystemNavigator.pop, does the Sentry SDK Will be blocked by network requests until timeout.

Without the Sentry SDK, this issue does not occur. This is also the main reason why I think sentry_flutter instead of flutter

The following code can enter super quickly no matter how you close the application and restart it ```dart import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:sentry_flutter/sentry_flutter.dart'; const Color darkBlue = Color.fromARGB(255, 18, 32, 47); Future main() async { WidgetsFlutterBinding.ensureInitialized(); // await SentryFlutter.init( // (options) { // options.dsn = // 'https://example.ingest.sentry.io/example'; // options.tracesSampleRate = 1.0; // options.debug = true; // }, // appRunner: () => SystemChrome.setPreferredOrientations([ // DeviceOrientation.portraitUp, // DeviceOrientation.portraitDown, // ]).then((_) { // runApp( // DefaultAssetBundle( // bundle: SentryAssetBundle(), // child: MyApp(), // ), // ); // }), // ); runApp(MyApp()); FocusManager.instance.primaryFocus?.unfocus(); SystemChannels.textInput.invokeMethod('TextInput.hide'); SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.top]); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( theme: ThemeData.dark().copyWith( scaffoldBackgroundColor: darkBlue, ), debugShowCheckedModeBanner: false, home: const Scaffold( body: Center( child: MyWidget(), ), ), ); } } class MyWidget extends StatefulWidget { const MyWidget({Key? key}) : super(key: key); @override State createState() => _MyWidgetState(); } class _MyWidgetState extends State { DateTime? _lastPressedAt; @override Widget build(BuildContext context) { return WillPopScope( onWillPop: () async { if (_lastPressedAt == null || DateTime.now().difference(_lastPressedAt!) > const Duration(seconds: 2)) { _lastPressedAt = DateTime.now(); ScaffoldMessenger.of(context).showSnackBar(const SnackBar( content: Text("Press again to exit the program"), )); return false; } SystemNavigator.pop(); return true; }, child: Center( child: Text( 'Hello, World!', style: Theme.of(context).textTheme.headline6, ), ), ); } } ```
ltq918 commented 10 months ago

The following is the log after I added options.debug = true; and the debug mode was run on the real machine. It records all the information from clicking the icon to getting stuck on the startup screen, and then to entering the main page of the application. You can see that one of the messages is: I/Choreographer(9320): Skipped 960 frames! The application may be doing too much work on its main thread.

My console log ```console D/FrameAwareSched( 9320): uboost uirescue, event = 0 I/r_application_1( 9320): SmartGc CheckAndAddTask : enable = 1 periodCheck = 1 V/ActivityThread( 9320): Handling launch of ActivityRecord{6be4b05 token=android.os.BinderProxy@105d67c {com.example.flutter_application_1/com.example.flutter_application_1.MainActivity}} D/ZrHung.AppEyeUiProbe( 9320): restart watching V/ActivityThread( 9320): callActivityOnCreate I/DecorView[]( 9320): old windowMode:0 new windoMode:1 I/ActivityThread( 9320): add activity client record, r= ActivityRecord{6be4b05 token=android.os.BinderProxy@105d67c {com.example.flutter_application_1/com.example.flutter_application_1.MainActivity}} token= android.os.BinderProxy@105d67c I/DecorView[]( 9320): set decor visibility 4 I/VRI[MainActivity]( 9320): initHnMagicLayoutUtils: activityName:MainActivity I/DecorView[]( 9320): old windowMode:1 new windoMode:1 D/InputEventReceiver( 9320): dispatchInputInterval 1000000 I/HwForceDarkManager( 9320): isSystemInDarkMode isResUiModeYes: false, isDarkMode: false I/DecorView[]( 9320): set decor visibility 0 I/RmeSchedManager( 9320): init Rme, version is: v1.0 I/RtgSchedEvent( 9320): current pid:9320 AppType:-1 D/OpenGLRenderer( 9320): disableOutlineDraw is true D/PhoneWindow( 9320): onViewRootImplSet activityToken android.os.BinderProxy@105d67c,activityClientRecord ActivityRecord{6be4b05 token=android.os.BinderProxy@105d67c {com.example.flutter_application_1/com.example.flutter_application_1.MainActivity}},isHnNavigationHide false isHidePrivateFlag = false D/HwPhoneWindow( 9320): onViewRootImplSet activityToken android.os.BinderProxy@105d67c,activityClientRecord ActivityRecord{6be4b05 token=android.os.BinderProxy@105d67c {com.example.flutter_application_1/com.example.flutter_application_1.MainActivity}},isHwNavigationHide false I/SurfaceView( 9320): 87273880 attach I/SurfaceView( 9320): 87273880 win vis 0 I/PhoneWindow( 9320): REFRESH_STATUS_BAR_ATTRS OnContentApplyWindowInsetsListener has SYSTEM_UI_LAYOUT_FLAGS D/FrameAwareSched( 9320): uboost uirescue, event = 1 D/HiTouch_PressGestureDetector( 9320): onAttached, package=com.example.flutter_application_1, windowType=1, mHiTouchRestricted=false I/SurfaceControl( 9320): SurfaceControl 0xb400007298627990 I/BufferQueueConsumer( 9320): [](id:246800000002,api:0,p:-1,c:9320) connect: controlledByApp=false I/BufferQueueProducer( 9320): [VRI[MainActivity]#2(BLAST Consumer)2](id:246800000002,api:0,p:-1,c:9320) connect: api=1 producerControlledByApp=true E/OpenGLRenderer( 9320): Unable to match the desired swap behavior. I/SurfaceView( 9320): 87273880 setWindowStopped false D/FrameAwareSched( 9320): uboost uirescue, event = 0 I/SurfaceControl( 9320): SurfaceControl 0xb400007298634590 I/SurfaceControl( 9320): SurfaceControl 0xb400007298635d90 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 I/SurfaceControl( 9320): SurfaceControl 0xb400007298628050 I/SurfaceControl( 9320): SurfaceControl 0xb400007298628ad0 I/SurfaceControl( 9320): SurfaceControl 0xb4000072986290d0 I/SurfaceControl( 9320): SurfaceControl 0xb400007298627390 I/BufferQueueConsumer( 9320): [](id:246800000003,api:0,p:-1,c:9320) connect: controlledByApp=false I/SurfaceView( 9320): 87273880 create Surface(name=SurfaceView[com.example.flutter_application_1/com.example.flutter_application_1.MainActivity])/@0x2345857 Surface(name=Background for SurfaceView[com.example.flutter_application_1/com.example.flutter_application_1.MainActivity])/@0xd7e4f44 Surface(name=SurfaceView[com.example.flutter_application_1/com.example.flutter_application_1.MainActivity](BLAST))/@0xd86a82d android.graphics.BLASTBufferQueue@9618162 I/BufferQueueProducer( 9320): [SurfaceView[com.example.flutter_application_1/com.example.flutter_application_1.MainActivity]#3(BLAST Consumer)3](id:246800000003,api:0,p:-1,c:9320) connect: api=1 producerControlledByApp=true I/SurfaceView( 9320): updateSurface: handleSyncNoBuffer I/SurfaceSyncer( 9320): addSyncableSurface: add to mPendingSyncs = {129770227} I/SurfaceCallbackHelper( 9320): Run mFinishDrawingRunnable directly because callback is not Callback2 I/SurfaceView( 9320): redrawNeededAsync: drawingFinished run I/SurfaceSyncer( 9320): onBufferReady: remove from mPendingSyncs = {} I/SurfaceSyncer( 9320): checkIfSyncIsComplete: mSyncId = 0 mSyncReady = false mPendingSyncs = 0 mMergedSyncSets = 0 I/SurfaceSyncer( 9320): markSyncReady: mSyncId = 0 I/SurfaceSyncer( 9320): checkIfSyncIsComplete: mSyncId = 0 mSyncReady = true mPendingSyncs = 0 mMergedSyncSets = 0 I/SurfaceSyncer( 9320): checkIfSyncIsComplete: mSyncRequestCompleteCallback.accept: W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 W/Sentry ( 9320): Timed out waiting for envelope submission. D/Sentry ( 9320): Deleted file /data/user/0/com.example.flutter_application_1/cache/sentry/a0b139e13df60ee1eb2015a15128b5fa96c44eae/43205f61-2fce-425c-9202-0f903ff6d9d3.envelope. D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/Sentry ( 9320): Processing file: /data/user/0/com.example.flutter_application_1/cache/sentry/a0b139e13df60ee1eb2015a15128b5fa96c44eae/11a8f2f7-84eb-4a1f-b5d9-34335895bc7c.envelope D/Sentry ( 9320): Captured Envelope is already cached D/Sentry ( 9320): Envelope enqueued D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 D/FrameAwareSched( 9320): uboost uirescue, event = 0 D/Sentry ( 9320): Class not available:androidx.compose.ui.node.Owner D/Sentry ( 9320): java.lang.ClassNotFoundException: androidx.compose.ui.node.Owner D/Sentry ( 9320): at java.lang.Class.classForName(Native Method) D/Sentry ( 9320): at java.lang.Class.forName(Class.java:454) D/Sentry ( 9320): at java.lang.Class.forName(Class.java:379) D/Sentry ( 9320): at io.sentry.android.core.LoadClass.loadClass(LoadClass.java:21) D/Sentry ( 9320): at io.sentry.android.core.LoadClass.isClassAvailable(LoadClass.java:39) D/Sentry ( 9320): at io.sentry.android.core.LoadClass.isClassAvailable(LoadClass.java:44) D/Sentry ( 9320): at io.sentry.android.core.AndroidOptionsInitializer.initializeIntegrationsAndProcessors(AndroidOptionsInitializer.java:158) D/Sentry ( 9320): at io.sentry.android.core.SentryAndroid.lambda$init$1(SentryAndroid.java:127) D/Sentry ( 9320): at io.sentry.android.core.SentryAndroid$$ExternalSyntheticLambda0.configure(Unknown Source:8) D/Sentry ( 9320): at io.sentry.Sentry.applyOptionsConfiguration(Sentry.java:177) D/Sentry ( 9320): at io.sentry.Sentry.init(Sentry.java:147) D/Sentry ( 9320): at io.sentry.android.core.SentryAndroid.init(SentryAndroid.java:89) D/Sentry ( 9320): at io.sentry.android.core.SentryAndroid.init(SentryAndroid.java:70) D/Sentry ( 9320): at io.sentry.flutter.SentryFlutterPlugin.initNativeSdk(SentryFlutterPlugin.kt:126) D/Sentry ( 9320): at io.sentry.flutter.SentryFlutterPlugin.onMethodCall(SentryFlutterPlugin.kt:57) D/Sentry ( 9320): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267) D/Sentry ( 9320): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295) D/Sentry ( 9320): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322) D/Sentry ( 9320): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12) D/Sentry ( 9320): at android.os.Handler.handleCallback(Handler.java:971) D/Sentry ( 9320): at android.os.Handler.dispatchMessage(Handler.java:107) D/Sentry ( 9320): at android.os.Looper.loopOnce(Looper.java:206) D/Sentry ( 9320): at android.os.Looper.loop(Looper.java:296) D/Sentry ( 9320): at android.app.ActivityThread.main(ActivityThread.java:9265) D/Sentry ( 9320): at java.lang.reflect.Method.invoke(Native Method) D/Sentry ( 9320): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591) D/Sentry ( 9320): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1018) D/Sentry ( 9320): Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.compose.ui.node.Owner" on path: DexPathList[[zip file "/data/app/~~8VOleB4hy-EwbbifqCJdwA==/com.example.flutter_application_1-gD9NMbZO15PT6KHiEnswEw==/base.apk"],nativeLibraryDirectories=[/data/app/~~8VOleB4hy-EwbbifqCJdwA==/com.example.flutter_application_1-gD9NMbZO15PT6KHiEnswEw==/lib/arm64, /data/app/~~8VOleB4hy-EwbbifqCJdwA==/com.example.flutter_application_1-gD9NMbZO15PT6KHiEnswEw==/base.apk!/lib/arm64-v8a, /system/lib64, /product_h/lib64, /system_ext/lib64]] D/Sentry ( 9320): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259) D/Sentry ( 9320): at java.lang.ClassLoader.loadClass(ClassLoader.java:379) D/Sentry ( 9320): at java.lang.ClassLoader.loadClass(ClassLoader.java:312) D/Sentry ( 9320): ... 27 more W/Sentry ( 9320): Sentry has been already initialized. Previous configuration will be overwritten. I/Sentry ( 9320): Initializing SDK with DSN: 'https://example@example.ingest.sentry.io/example' I/Sentry ( 9320): sentry-debug-meta.properties file was not found. I/Sentry ( 9320): java.io.FileNotFoundException: sentry-debug-meta.properties I/Sentry ( 9320): at android.content.res.AssetManager.nativeOpenAsset(Native Method) I/Sentry ( 9320): at android.content.res.AssetManager.open(AssetManager.java:1046) I/Sentry ( 9320): at android.content.res.AssetManager.open(AssetManager.java:1023) I/Sentry ( 9320): at io.sentry.android.core.internal.debugmeta.AssetsDebugMetaLoader.loadDebugMeta(AssetsDebugMetaLoader.java:36) I/Sentry ( 9320): at io.sentry.Sentry.initConfigurations(Sentry.java:381) I/Sentry ( 9320): at io.sentry.Sentry.init(Sentry.java:211) I/Sentry ( 9320): at io.sentry.Sentry.init(Sentry.java:148) I/Sentry ( 9320): at io.sentry.android.core.SentryAndroid.init(SentryAndroid.java:89) I/Sentry ( 9320): at io.sentry.android.core.SentryAndroid.init(SentryAndroid.java:70) I/Sentry ( 9320): at io.sentry.flutter.SentryFlutterPlugin.initNativeSdk(SentryFlutterPlugin.kt:126) I/Sentry ( 9320): at io.sentry.flutter.SentryFlutterPlugin.onMethodCall(SentryFlutterPlugin.kt:57) I/Sentry ( 9320): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267) I/Sentry ( 9320): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295) I/Sentry ( 9320): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322) I/Sentry ( 9320): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12) I/Sentry ( 9320): at android.os.Handler.handleCallback(Handler.java:971) I/Sentry ( 9320): at android.os.Handler.dispatchMessage(Handler.java:107) I/Sentry ( 9320): at android.os.Looper.loopOnce(Looper.java:206) I/Sentry ( 9320): at android.os.Looper.loop(Looper.java:296) I/Sentry ( 9320): at android.app.ActivityThread.main(ActivityThread.java:9265) I/Sentry ( 9320): at java.lang.reflect.Method.invoke(Native Method) I/Sentry ( 9320): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591) I/Sentry ( 9320): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1018) I/Sentry ( 9320): GlobalHubMode: 'true' D/Sentry ( 9320): UncaughtExceptionHandlerIntegration removed. E/Sentry ( 9320): unregisterNetworkCallback failed E/Sentry ( 9320): java.lang.IllegalArgumentException: NetworkCallback was not registered E/Sentry ( 9320): at android.net.ConnectivityManager.unregisterNetworkCallback(ConnectivityManager.java:4875) E/Sentry ( 9320): at io.sentry.android.core.internal.util.AndroidConnectionStatusProvider.unregisterNetworkCallback(AndroidConnectionStatusProvider.java:329) E/Sentry ( 9320): at io.sentry.android.core.internal.util.AndroidConnectionStatusProvider.removeConnectionStatusObserver(AndroidConnectionStatusProvider.java:105) E/Sentry ( 9320): at io.sentry.android.core.SendCachedEnvelopeIntegration.close(SendCachedEnvelopeIntegration.java:65) E/Sentry ( 9320): at io.sentry.Hub.close(Hub.java:343) E/Sentry ( 9320): at io.sentry.Sentry.init(Sentry.java:223) E/Sentry ( 9320): at io.sentry.Sentry.init(Sentry.java:148) E/Sentry ( 9320): at io.sentry.android.core.SentryAndroid.init(SentryAndroid.java:89) E/Sentry ( 9320): at io.sentry.android.core.SentryAndroid.init(SentryAndroid.java:70) E/Sentry ( 9320): at io.sentry.flutter.SentryFlutterPlugin.initNativeSdk(SentryFlutterPlugin.kt:126) E/Sentry ( 9320): at io.sentry.flutter.SentryFlutterPlugin.onMethodCall(SentryFlutterPlugin.kt:57) E/Sentry ( 9320): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267) E/Sentry ( 9320): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295) E/Sentry ( 9320): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322) E/Sentry ( 9320): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12) E/Sentry ( 9320): at android.os.Handler.handleCallback(Handler.java:971) E/Sentry ( 9320): at android.os.Handler.dispatchMessage(Handler.java:107) E/Sentry ( 9320): at android.os.Looper.loopOnce(Looper.java:206) E/Sentry ( 9320): at android.os.Looper.loop(Looper.java:296) E/Sentry ( 9320): at android.app.ActivityThread.main(ActivityThread.java:9265) E/Sentry ( 9320): at java.lang.reflect.Method.invoke(Native Method) E/Sentry ( 9320): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591) E/Sentry ( 9320): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1018) D/sentry-native( 9320): shutting down backend D/Sentry ( 9320): NdkIntegration removed. D/Sentry ( 9320): AppLifecycleIntegration removed. D/Sentry ( 9320): AnrV2Integration removed. D/Sentry ( 9320): ActivityLifecycleIntegration removed. D/Sentry ( 9320): UserInteractionIntegration removed. D/Sentry ( 9320): AppComponentsBreadcrumbsIntegration removed. D/Sentry ( 9320): stop collecting all performance info for transactions D/Sentry ( 9320): io.sentry.hints.SessionEndHint is not io.sentry.hints.Retryable D/Sentry ( 9320): Serializing object: { D/Sentry ( 9320): "timestamp": "2024-01-11T02:51:51.831Z", D/Sentry ( 9320): "discarded_events": [ D/Sentry ( 9320): { D/Sentry ( 9320): "reason": "network_error", D/Sentry ( 9320): "category": "session", D/Sentry ( 9320): "quantity": 1 D/Sentry ( 9320): } D/Sentry ( 9320): ] D/Sentry ( 9320): } E/Sentry ( 9320): Envelope submission failed E/Sentry ( 9320): java.lang.IllegalStateException: Sending the event failed. E/Sentry ( 9320): at io.sentry.transport.AsyncHttpTransport$EnvelopeSender.flush(AsyncHttpTransport.java:307) E/Sentry ( 9320): at io.sentry.transport.AsyncHttpTransport$EnvelopeSender.run(AsyncHttpTransport.java:215) E/Sentry ( 9320): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:463) E/Sentry ( 9320): at java.util.concurrent.FutureTask.run(FutureTask.java:264) E/Sentry ( 9320): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) E/Sentry ( 9320): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) E/Sentry ( 9320): at java.lang.Thread.run(Thread.java:1033) E/Sentry ( 9320): Caused by: java.net.SocketTimeoutException: failed to connect to example.ingest.sentry.io/34.120.195.249 (port 443) from /192.168.1.106 (port 43588) after 5000ms E/Sentry ( 9320): at libcore.io.IoBridge.connectErrno(IoBridge.java:235) E/Sentry ( 9320): at libcore.io.IoBridge.connect(IoBridge.java:179) E/Sentry ( 9320): at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:142) E/Sentry ( 9320): at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390) E/Sentry ( 9320): at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230) E/Sentry ( 9320): at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212) E/Sentry ( 9320): at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436) E/Sentry ( 9320): at java.net.Socket.connect(Socket.java:646) E/Sentry ( 9320): at com.android.okhttp.internal.Platform.connectSocket(Platform.java:182) E/Sentry ( 9320): at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:145) E/Sentry ( 9320): at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:116) E/Sentry ( 9320): at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:186) E/Sentry ( 9320): at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128) E/Sentry ( 9320): at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97) E/Sentry ( 9320): at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289) E/Sentry ( 9320): at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232) E/Sentry ( 9320): at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465) E/Sentry ( 9320): at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131) E/Sentry ( 9320): at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:90) E/Sentry ( 9320): at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:30) E/Sentry ( 9320): at io.sentry.transport.HttpConnection.createConnection(HttpConnection.java:145) E/Sentry ( 9320): at io.sentry.transport.HttpConnection.send(HttpConnection.java:150) E/Sentry ( 9320): at io.sentry.transport.AsyncHttpTransport$EnvelopeSender.flush(AsyncHttpTransport.java:269) E/Sentry ( 9320): ... 6 more D/Sentry ( 9320): Serializing object: { D/Sentry ( 9320): "sid": "a7bf0cae-6ef1-4961-9811-f51ccd9b15ad", D/Sentry ( 9320): "did": "ca880ab5-8ddd-417b-9d67-0c3bef4507b3", D/Sentry ( 9320): "init": true, D/Sentry ( 9320): "started": "2024-01-11T02:51:46.796Z", D/Sentry ( 9320): "status": "ok", D/Sentry ( 9320): "errors": 0, D/Sentry ( 9320): "timestamp": "2024-01-11T02:51:46.796Z", D/Sentry ( 9320): "attrs": { D/Sentry ( 9320): "release": "com.example.flutter_application_1@1.0.0+1", D/Sentry ( 9320): "environment": "debug" D/Sentry ( 9320): } D/Sentry ( 9320): } D/Sentry ( 9320): Serializing object: { D/Sentry ( 9320): "sid": "a7bf0cae-6ef1-4961-9811-f51ccd9b15ad", D/Sentry ( 9320): "did": "ca880ab5-8ddd-417b-9d67-0c3bef4507b3", D/Sentry ( 9320): "init": true, D/Sentry ( 9320): "started": "2024-01-11T02:51:46.796Z", D/Sentry ( 9320): "status": "ok", D/Sentry ( 9320): "errors": 0, D/Sentry ( 9320): "timestamp": "2024-01-11T02:51:46.796Z", D/Sentry ( 9320): "attrs": { D/Sentry ( 9320): "release": "com.example.flutter_application_1@1.0.0+1", D/Sentry ( 9320): "environment": "debug" D/Sentry ( 9320): } D/Sentry ( 9320): } D/Sentry ( 9320): Adding Envelope to offline storage: /data/user/0/com.example.flutter_application_1/cache/sentry/a0b139e13df60ee1eb2015a15128b5fa96c44eae/b9379f50-ca3d-4d31-940c-34bc00f4633d.envelope I/Sentry ( 9320): No permission (ACCESS_NETWORK_STATE) to check network status. D/Sentry ( 9320): Attaching client report to envelope. D/TrafficStats( 9320): tagSocket(99) with statsTag=0xffffffff, statsUid=-1 I/Sentry ( 9320): Closing SentryClient. E/Sentry ( 9320): Exception while awaiting on lock. E/Sentry ( 9320): java.lang.InterruptedException E/Sentry ( 9320): at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1081) E/Sentry ( 9320): at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1369) E/Sentry ( 9320): at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:278) E/Sentry ( 9320): at io.sentry.DirectoryProcessor$SendCachedEnvelopeHint.waitFlush(DirectoryProcessor.java:153) E/Sentry ( 9320): at io.sentry.EnvelopeSender.lambda$processFile$0$io-sentry-EnvelopeSender(EnvelopeSender.java:71) E/Sentry ( 9320): at io.sentry.EnvelopeSender$$ExternalSyntheticLambda0.accept(Unknown Source:4) E/Sentry ( 9320): at io.sentry.util.HintUtils.runIfHasType(HintUtils.java:102) E/Sentry ( 9320): at io.sentry.util.HintUtils.runIfHasTypeLogIfNot(HintUtils.java:85) E/Sentry ( 9320): at io.sentry.EnvelopeSender.processFile(EnvelopeSender.java:66) E/Sentry ( 9320): at io.sentry.DirectoryProcessor.processDirectory(DirectoryProcessor.java:101) E/Sentry ( 9320): at io.sentry.EnvelopeSender.processDirectory(EnvelopeSender.java:17) E/Sentry ( 9320): at io.sentry.SendCachedEnvelopeFireAndForgetIntegration$SendFireAndForgetFactory$-CC.lambda$processDir$0(SendCachedEnvelopeFireAndForgetIntegration.java:56) E/Sentry ( 9320): at io.sentry.SendCachedEnvelopeFireAndForgetIntegration$SendFireAndForgetFactory$$ExternalSyntheticLambda0.send(Unknown Source:8) E/Sentry ( 9320): at io.sentry.android.core.SendCachedEnvelopeIntegration.lambda$sendCachedEnvelopes$0$io-sentry-android-core-SendCachedEnvelopeIntegration(SendCachedEnvelopeIntegration.java:133) E/Sentry ( 9320): at io.sentry.android.core.SendCachedEnvelopeIntegration$$ExternalSyntheticLambda0.run(Unknown Source:6) E/Sentry ( 9320): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:463) E/Sentry ( 9320): at java.util.concurrent.FutureTask.run(FutureTask.java:264) E/Sentry ( 9320): at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307) E/Sentry ( 9320): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) E/Sentry ( 9320): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) E/Sentry ( 9320): at java.lang.Thread.run(Thread.java:1033) W/Sentry ( 9320): Timed out waiting for envelope submission. D/Sentry ( 9320): Deleted file /data/user/0/com.example.flutter_application_1/cache/sentry/a0b139e13df60ee1eb2015a15128b5fa96c44eae/11a8f2f7-84eb-4a1f-b5d9-34335895bc7c.envelope. E/Sentry ( 9320): Failed processing '/data/user/0/com.example.flutter_application_1/cache/sentry/a0b139e13df60ee1eb2015a15128b5fa96c44eae' E/Sentry ( 9320): java.lang.InterruptedException E/Sentry ( 9320): at java.lang.Thread.sleep(Native Method) E/Sentry ( 9320): at java.lang.Thread.sleep(Thread.java:464) E/Sentry ( 9320): at java.lang.Thread.sleep(Thread.java:369) E/Sentry ( 9320): at io.sentry.DirectoryProcessor.processDirectory(DirectoryProcessor.java:106) E/Sentry ( 9320): at io.sentry.EnvelopeSender.processDirectory(EnvelopeSender.java:17) E/Sentry ( 9320): at io.sentry.SendCachedEnvelopeFireAndForgetIntegration$SendFireAndForgetFactory$-CC.lambda$processDir$0(SendCachedEnvelopeFireAndForgetIntegration.java:56) E/Sentry ( 9320): at io.sentry.SendCachedEnvelopeFireAndForgetIntegration$SendFireAndForgetFactory$$ExternalSyntheticLambda0.send(Unknown Source:8) E/Sentry ( 9320): at io.sentry.android.core.SendCachedEnvelopeIntegration.lambda$sendCachedEnvelopes$0$io-sentry-android-core-SendCachedEnvelopeIntegration(SendCachedEnvelopeIntegration.java:133) E/Sentry ( 9320): at io.sentry.android.core.SendCachedEnvelopeIntegration$$ExternalSyntheticLambda0.run(Unknown Source:6) E/Sentry ( 9320): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:463) E/Sentry ( 9320): at java.util.concurrent.FutureTask.run(FutureTask.java:264) E/Sentry ( 9320): at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307) E/Sentry ( 9320): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) E/Sentry ( 9320): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) E/Sentry ( 9320): at java.lang.Thread.run(Thread.java:1033) D/Sentry ( 9320): Finished processing cached files from /data/user/0/com.example.flutter_application_1/cache/sentry/a0b139e13df60ee1eb2015a15128b5fa96c44eae E/HiEvent ( 9320): length is 0 or exceed MAX: 1024 E/HiEvent ( 9320): uid = 10343 E/HiEvent ( 9320): pid = 9320 E/HiEvent ( 9320): packageName = com.example.flutter_application_1 E/HiEvent ( 9320): processName = com.example.flutter_application_1 E/HiEvent ( 9320): APPEYE_UIP_WARNING E/HiEvent ( 9320): activityName = com.example.flutter_application_1.MainActivity E/HiEvent ( 9320): versionName = 1.0.0 E/HiEvent ( 9320): Message 0: { when=-3s165ms barrier=330 } E/HiEvent ( 9320): Message 1: { when=-3s152ms callback=io.sentry.android.core.internal.util.SentryFrameMetricsCollector$$ExternalSyntheticLambda1 target=android.os.Handler } E/HiEvent ( 9320): Message 2: { when=-2s888ms what=2 obj=DisplayInfo{"内置屏幕", displayId 0", displayGroupId 0, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS, FLAG_TRUSTED, real 1200 x 2652, largest app 2537 x 2537, smallest app 1200 x 1085, appVsyncOff 1000000, presDeadline 16666666, mode 1, defaultMode 1, modes [{id=1, width=1200, height=2652, fps=60.000004, alternativeRefreshRates=[120.00001]}, {id=2, width=1200, height=2652, fps=120.00001, alternativeRefreshRates=[60.000004]}], hdrCapabilities HdrCapabilities{mSupportedHdrTypes=[1, 2, 3], mMaxLuminance=500.0, mMaxAverageLuminance=500.0, mMinLuminance=0.0}, user I/HiView ( 9320): Begin report 1000 I/HiEvent ( 9320): Flatten done: 1000 D/r_application_1( 9320): [ZeroHung]ZrhungDoSendWithHievent: hievent send wp = 257, pid= 9320, tid = 9351 D/Sentry ( 9320): Shutting down E/HiEvent ( 9320): length is 0 or exceed MAX: 1024 E/HiEvent ( 9320): uid = 10343 E/HiEvent ( 9320): pid = 9320 E/HiEvent ( 9320): packageName = com.example.flutter_application_1 E/HiEvent ( 9320): processName = com.example.flutter_application_1 E/HiEvent ( 9320): APPEYE_UIP_FREEZE E/HiEvent ( 9320): Message 0: { when=-5s479ms barrier=330 } E/HiEvent ( 9320): Message 1: { when=-5s466ms callback=io.sentry.android.core.internal.util.SentryFrameMetricsCollector$$ExternalSyntheticLambda1 target=android.os.Handler } E/HiEvent ( 9320): Message 2: { when=-5s202ms what=2 obj=DisplayInfo{"内置屏幕", displayId 0", displayGroupId 0, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS, FLAG_TRUSTED, real 1200 x 2652, largest app 2537 x 2537, smallest app 1200 x 1085, appVsyncOff 1000000, presDeadline 16666666, mode 1, defaultMode 1, modes [{id=1, width=1200, height=2652, fps=60.000004, alternativeRefreshRates=[120.00001]}, {id=2, width=1200, height=2652, fps=120.00001, alternativeRefreshRates=[60.000004]}], hdrCapabilities HdrCapabilities{mSupportedHdrTypes=[1, 2, 3], mMaxLuminance=500.0, mMaxAverageLuminance=500.0, mMinLuminance=0.0}, userDisabledHdrTypes [], minimalPostProcessingSupported false, rotation 0, state ON} ta I/HiView ( 9320): Begin report 1000 I/HiEvent ( 9320): Flatten done: 1000 D/r_application_1( 9320): [ZeroHung]ZrhungDoSendWithHievent: hievent send wp = 258, pid= 9320, tid = 9351 D/Sentry ( 9320): io.sentry.hints.SessionStartHint is not io.sentry.hints.Retryable D/Sentry ( 9320): Serializing object: { D/Sentry ( 9320): "timestamp": "2024-01-11T02:51:56.852Z", D/Sentry ( 9320): "discarded_events": [ D/Sentry ( 9320): { D/Sentry ( 9320): "reason": "network_error", D/Sentry ( 9320): "category": "session", D/Sentry ( 9320): "quantity": 2 D/Sentry ( 9320): } D/Sentry ( 9320): ] D/Sentry ( 9320): } E/Sentry ( 9320): Envelope submission failed E/Sentry ( 9320): java.lang.IllegalStateException: Sending the event failed. E/Sentry ( 9320): at io.sentry.transport.AsyncHttpTransport$EnvelopeSender.flush(AsyncHttpTransport.java:307) E/Sentry ( 9320): at io.sentry.transport.AsyncHttpTransport$EnvelopeSender.run(AsyncHttpTransport.java:215) E/Sentry ( 9320): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:463) E/Sentry ( 9320): at java.util.concurrent.FutureTask.run(FutureTask.java:264) E/Sentry ( 9320): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) E/Sentry ( 9320): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) E/Sentry ( 9320): at java.lang.Thread.run(Thread.java:1033) E/Sentry ( 9320): Caused by: java.net.SocketTimeoutException: failed to connect to example.ingest.sentry.io/34.120.195.249 (port 443) from /192.168.1.106 (port 49204) after 5000ms E/Sentry ( 9320): at libcore.io.IoBridge.connectErrno(IoBridge.java:235) E/Sentry ( 9320): at libcore.io.IoBridge.connect(IoBridge.java:179) E/Sentry ( 9320): at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:142) E/Sentry ( 9320): at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390) E/Sentry ( 9320): at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230) E/Sentry ( 9320): at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212) E/Sentry ( 9320): at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436) E/Sentry ( 9320): at java.net.Socket.connect(Socket.java:646) E/Sentry ( 9320): at com.android.okhttp.internal.Platform.connectSocket(Platform.java:182) E/Sentry ( 9320): at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:145) E/Sentry ( 9320): at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:116) E/Sentry ( 9320): at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:186) E/Sentry ( 9320): at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128) E/Sentry ( 9320): at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97) E/Sentry ( 9320): at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289) E/Sentry ( 9320): at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232) E/Sentry ( 9320): at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465) E/Sentry ( 9320): at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131) E/Sentry ( 9320): at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:90) E/Sentry ( 9320): at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:30) E/Sentry ( 9320): at io.sentry.transport.HttpConnection.createConnection(HttpConnection.java:145) E/Sentry ( 9320): at io.sentry.transport.HttpConnection.send(HttpConnection.java:150) E/Sentry ( 9320): at io.sentry.transport.AsyncHttpTransport$EnvelopeSender.flush(AsyncHttpTransport.java:269) E/Sentry ( 9320): ... 6 more I/Sentry ( 9320): No permission (ACCESS_NETWORK_STATE) to check network status. D/Sentry ( 9320): Attaching client report to envelope. D/TrafficStats( 9320): tagSocket(75) with statsTag=0xffffffff, statsUid=-1 W/Sentry ( 9320): Failed to shutdown the async connection async sender within 1 minute. Trying to force it now. D/Sentry ( 9320): UncaughtExceptionHandlerIntegration enabled: true D/Sentry ( 9320): default UncaughtExceptionHandler class='com.android.internal.os.RuntimeInit$KillApplicationHandler' D/Sentry ( 9320): UncaughtExceptionHandlerIntegration installed. D/Sentry ( 9320): ShutdownHookIntegration installed. D/Sentry ( 9320): SendCachedEnvelopeIntegration installed. D/Sentry ( 9320): NdkIntegration enabled: true I/sentry-native( 9320): sentry_close() called, but options was empty I/Sentry ( 9320): No permission (ACCESS_NETWORK_STATE) to check network status. I/sentry-native( 9320): using database path "/data/data/com.example.flutter_application_1/cache/sentry/a0b139e13df60ee1eb2015a15128b5fa96c44eae/.sentry-native" I/Sentry ( 9320): No permission (ACCESS_NETWORK_STATE) to check network status. D/sentry-native( 9320): starting backend D/sentry-native( 9320): processing and pruning old runs D/Sentry ( 9320): Started processing cached files from /data/user/0/com.example.flutter_application_1/cache/sentry/a0b139e13df60ee1eb2015a15128b5fa96c44eae D/Sentry ( 9320): NdkIntegration installed. D/Sentry ( 9320): Processing dir. /data/user/0/com.example.flutter_application_1/cache/sentry/a0b139e13df60ee1eb2015a15128b5fa96c44eae D/Sentry ( 9320): Registering EnvelopeFileObserverIntegration for path: /data/user/0/com.example.flutter_application_1/cache/sentry/a0b139e13df60ee1eb2015a15128b5fa96c44eae/outbox D/Sentry ( 9320): SendCachedEnvelopeIntegration installed. D/Sentry ( 9320): enableSessionTracking enabled: true D/Sentry ( 9320): enableAppLifecycleBreadcrumbs enabled: true D/Sentry ( 9320): Processing 6 items from cache dir /data/user/0/com.example.flutter_application_1/cache/sentry/a0b139e13df60ee1eb2015a15128b5fa96c44eae D/Sentry ( 9320): File /data/user/0/com.example.flutter_application_1/cache/sentry/a0b139e13df60ee1eb2015a15128b5fa96c44eae/outbox is not a File. D/Sentry ( 9320): File /data/user/0/com.example.flutter_application_1/cache/sentry/a0b139e13df60ee1eb2015a15128b5fa96c44eae/.sentry-native is not a File. D/Sentry ( 9320): Processing file: /data/user/0/com.example.flutter_application_1/cache/sentry/a0b139e13df60ee1eb2015a15128b5fa96c44eae/previous_session.json D/Sentry ( 9320): AppLifecycleIntegration installed. D/Sentry ( 9320): File '/data/user/0/com.example.flutter_application_1/cache/sentry/a0b139e13df60ee1eb2015a15128b5fa96c44eae/previous_session.json' doesn't match extension expected. W/Sentry ( 9320): Current session is not ended, we'd need to end it. D/Sentry ( 9320): AnrIntegration enabled: false D/Sentry ( 9320): ActivityLifecycleIntegration enabled: true D/Sentry ( 9320): ActivityLifecycleIntegration installed. D/Sentry ( 9320): UserInteractionIntegration enabled: true D/Sentry ( 9320): UserInteractionIntegration installed. D/Sentry ( 9320): AppComponentsBreadcrumbsIntegration enabled: true D/Sentry ( 9320): AppComponentsBreadcrumbsIntegration installed. D/Sentry ( 9320): Overwriting session to offline storage: a7bf0cae-6ef1-4961-9811-f51ccd9b15ad D/Sentry ( 9320): SystemEventsBreadcrumbsIntegration enabled: true D/Sentry ( 9320): NetworkBreadcrumbsIntegration enabled: true I/Sentry ( 9320): No permission (ACCESS_NETWORK_STATE) to check network status. D/Sentry ( 9320): NetworkBreadcrumbsIntegration not installed. D/Sentry ( 9320): enableSystemEventsBreadcrumbs enabled: true D/Sentry ( 9320): enableSystemEventBreadcrumbs enabled: true D/Sentry ( 9320): Serializing object: { D/Sentry ( 9320): "sid": "a7bf0cae-6ef1-4961-9811-f51ccd9b15ad", D/Sentry ( 9320): "did": "ca880ab5-8ddd-417b-9d67-0c3bef4507b3", D/Sentry ( 9320): "init": true, D/Sentry ( 9320): "started": "2024-01-11T02:51:46.796Z", D/Sentry ( 9320): "status": "ok", D/Sentry ( 9320): "errors": 0, D/Sentry ( 9320): "timestamp": "2024-01-11T02:51:46.796Z", D/Sentry ( 9320): "attrs": { D/Sentry ( 9320): "release": "com.example.flutter_application_1@1.0.0+1", D/Sentry ( 9320): "environment": "debug" D/Sentry ( 9320): } D/Sentry ( 9320): } D/Sentry ( 9320): Serializing object: { D/Sentry ( 9320): "sid": "820dde84-f117-4635-8292-802845a4dc69", D/Sentry ( 9320): "did": "ca880ab5-8ddd-417b-9d67-0c3bef4507b3", D/Sentry ( 9320): "init": true, D/Sentry ( 9320): "started": "2024-01-11T02:52:03.642Z", D/Sentry ( 9320): "status": "ok", D/Sentry ( 9320): "errors": 0, D/Sentry ( 9320): "timestamp": "2024-01-11T02:52:03.643Z", D/Sentry ( 9320): "attrs": { D/Sentry ( 9320): "release": "com.example.flutter_application_1@1.0.0+1", D/Sentry ( 9320): "environment": "debug" D/Sentry ( 9320): } D/Sentry ( 9320): } I/Choreographer( 9320): Skipped 960 frames! The application may be doing too much work on its main thread. W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/Sentry ( 9320): Overwriting session to offline storage: 820dde84-f117-4635-8292-802845a4dc69 D/FrameAwareSched( 9320): uboost uirescue, event = 1 D/Sentry ( 9320): Serializing object: { D/Sentry ( 9320): "sid": "820dde84-f117-4635-8292-802845a4dc69", D/Sentry ( 9320): "did": "ca880ab5-8ddd-417b-9d67-0c3bef4507b3", D/Sentry ( 9320): "init": true, D/Sentry ( 9320): "started": "2024-01-11T02:52:03.642Z", D/Sentry ( 9320): "status": "ok", D/Sentry ( 9320): "errors": 0, D/Sentry ( 9320): "timestamp": "2024-01-11T02:52:03.643Z", D/Sentry ( 9320): "attrs": { D/Sentry ( 9320): "release": "com.example.flutter_application_1@1.0.0+1", D/Sentry ( 9320): "environment": "debug" D/Sentry ( 9320): } D/Sentry ( 9320): } D/Sentry ( 9320): Adding Envelope to offline storage: /data/user/0/com.example.flutter_application_1/cache/sentry/a0b139e13df60ee1eb2015a15128b5fa96c44eae/d41970f1-8837-41cb-8aff-c23ba50aee1b.envelope I/Sentry ( 9320): No permission (ACCESS_NETWORK_STATE) to check network status. D/TrafficStats( 9320): tagSocket(130) with statsTag=0xffffffff, statsUid=-1 D/FrameAwareSched( 9320): uboost uirescue, event = 0 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 [sentry] [debug] release: com.example.flutter_application_1@1.0.0+1 D/FrameAwareSched( 9320): uboost uirescue, event = 1 D/FrameAwareSched( 9320): uboost uirescue, event = 0 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 D/FrameAwareSched( 9320): uboost uirescue, event = 0 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 D/FrameAwareSched( 9320): uboost uirescue, event = 0 I/DecorView[]( 9320): old windowMode:1 new windoMode:1 D/FrameAwareSched( 9320): uboost uirescue, event = 1 D/FrameAwareSched( 9320): uboost uirescue, event = 0 I/SurfaceControl( 9320): SurfaceControl 0xb4000072986251d0 I/SurfaceControl( 9320): nativeRelease 0xb400007298627990 count: 6 I/SurfaceControl( 9320): SurfaceControl 0xb400007298626fd0 I/SurfaceControl( 9320): SurfaceControl 0xb400007298624b10 I/SurfaceControl( 9320): nativeRelease 0xb400007298635d90 count: 2 I/SurfaceControl( 9320): ~SurfaceControl 0xb400007298635d90 I/SurfaceControl( 9320): nativeRelease 0xb400007298634590 count: 2 I/SurfaceControl( 9320): ~SurfaceControl 0xb400007298634590 I/PhoneWindow( 9320): REFRESH_STATUS_BAR_ATTRS OnContentApplyWindowInsetsListener has SYSTEM_UI_LAYOUT_FLAGS W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/Sentry ( 9320): Processing file: /data/user/0/com.example.flutter_application_1/cache/sentry/a0b139e13df60ee1eb2015a15128b5fa96c44eae/session.json D/Sentry ( 9320): File '/data/user/0/com.example.flutter_application_1/cache/sentry/a0b139e13df60ee1eb2015a15128b5fa96c44eae/session.json' doesn't match extension expected. D/FrameAwareSched( 9320): uboost uirescue, event = 1 D/FrameAwareSched( 9320): uboost uirescue, event = 0 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 D/FrameAwareSched( 9320): uboost uirescue, event = 0 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 D/FrameAwareSched( 9320): uboost uirescue, event = 0 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 D/FrameAwareSched( 9320): uboost uirescue, event = 0 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 D/FrameAwareSched( 9320): uboost uirescue, event = 0 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 D/FrameAwareSched( 9320): uboost uirescue, event = 0 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 D/Sentry ( 9320): File /data/user/0/com.example.flutter_application_1/cache/sentry/a0b139e13df60ee1eb2015a15128b5fa96c44eae/.scope-cache is not a File. D/Sentry ( 9320): File /data/user/0/com.example.flutter_application_1/cache/sentry/a0b139e13df60ee1eb2015a15128b5fa96c44eae/.options-cache is not a File. D/Sentry ( 9320): Processing file: /data/user/0/com.example.flutter_application_1/cache/sentry/a0b139e13df60ee1eb2015a15128b5fa96c44eae/db54188d-0d4c-44b3-9236-fc388d47b21a.envelope D/Sentry ( 9320): Captured Envelope is already cached D/Sentry ( 9320): Envelope enqueued D/FrameAwareSched( 9320): uboost uirescue, event = 0 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 D/FrameAwareSched( 9320): uboost uirescue, event = 0 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 W/ViewTreeObserver( 9320): onPreDraw return false io.flutter.embedding.android.FlutterActivityAndFragmentDelegate$2@1155dd6 D/FrameAwareSched( 9320): uboost uirescue, event = 1 I/SurfaceSyncer( 9320): addSyncableSurface: add to mPendingSyncs = {179897541} I/HwForceDarkManager( 9320): setAllowedHwForceDark:false package:com.example.flutter_application_1 mCurrProcessState:0 mIsPackageNameChange:false hwForceDarkState:0 isViewAllowedForceDark:true isLastHonorForceDark:false I/SurfaceControl( 9320): ~SurfaceControl 0xb400007298627990 I/SurfaceSyncer( 9320): onBufferReady: remove from mPendingSyncs = {} I/SurfaceSyncer( 9320): checkIfSyncIsComplete: mSyncId = 0 mSyncReady = false mPendingSyncs = 0 mMergedSyncSets = 0 W/Parcel ( 9320): Expecting binder but got null! I/SurfaceSyncer( 9320): markSyncReady: mSyncId = 0 I/SurfaceSyncer( 9320): checkIfSyncIsComplete: mSyncId = 0 mSyncReady = true mPendingSyncs = 0 mMergedSyncSets = 0 I/SurfaceSyncer( 9320): checkIfSyncIsComplete: mSyncRequestCompleteCallback.accept: I/VRI[MainActivity]( 9320): send MSG_WINDOW_FOCUS_CHANGED msg D/DecorView( 9320): showOrHideHighlightView: hasFocus=true; winMode=1; isMrgNull=true W/InputMethodManager( 9320): startInputReason = 1 W/InputMethodManager( 9320): startInputReason = 6 I/SurfaceControl( 9320): SurfaceControl 0xb4000072986257d0 I/SurfaceControl( 9320): SurfaceControl 0xb40000729862cd90 I/SurfaceControl( 9320): SurfaceControl 0xb400007298635850 I/SurfaceControl( 9320): nativeRelease 0xb400007298624b10 count: 2 I/SurfaceControl( 9320): ~SurfaceControl 0xb400007298624b10 I/SurfaceControl( 9320): nativeRelease 0xb400007298626fd0 count: 2 I/SurfaceControl( 9320): ~SurfaceControl 0xb400007298626fd0 D/ZrHung.AppEyeUiProbe( 9320): sendAppEye recover Events. E/HiEvent ( 9320): length is 0 or exceed MAX: 1024 I/HiView ( 9320): Begin report 1000 I/HiEvent ( 9320): Flatten done: 1000 D/r_application_1( 9320): [ZeroHung]ZrhungDoSendWithHievent: hievent send wp = 280, pid= 9320, tid = 9351 I/SurfaceControl( 9320): nativeRelease 0xb400007298620b50 count: 2 I/SurfaceControl( 9320): ~SurfaceControl 0xb400007298620b50 D/FrameAwareSched( 9320): uboost uirescue, event = 0 I/VRI[MainActivity]( 9320): send MSG_WINDOW_FOCUS_CHANGED msg I/ViewRootImpl( 9320): focus window changed, set pointer icon to default D/DecorView( 9320): showOrHideHighlightView: hasFocus=false; winMode=1; isMrgNull=true D/FrameAwareSched( 9320): uboost uirescue, event = 0 I/SurfaceControl( 9320): SurfaceControl 0xb400007298620b50 E/RtgSchedManager( 9320): endActivityTransaction: margin state not match E/RtgSchedManager( 9320): endActivityTransaction: margin state not match I/RmeSchedManager( 9320): init Rme, version is: v1.0 D/RtgSched( 9320): resetRtgSchedHandle failed enable:0 I/SurfaceControl( 9320): nativeRelease 0xb400007298635850 count: 2 I/SurfaceControl( 9320): ~SurfaceControl 0xb400007298635850 I/SurfaceControl( 9320): nativeRelease 0xb40000729862cd90 count: 2 I/SurfaceControl( 9320): ~SurfaceControl 0xb40000729862cd90 I/SurfaceControl( 9320): nativeRelease 0xb4000072986257d0 count: 2 I/SurfaceControl( 9320): ~SurfaceControl 0xb4000072986257d0 I/SurfaceView( 9320): 87273880 win vis 8 D/FrameAwareSched( 9320): uboost uirescue, event = 1 I/BufferQueueProducer( 9320): [SurfaceView[com.example.flutter_application_1/com.example.flutter_application_1.MainActivity]#3(BLAST Consumer)3](id:246800000003,api:1,p:9320,c:9320) disconnect: api 1 I/BufferQueueProducer( 9320): [SurfaceView[com.example.flutter_application_1/com.example.flutter_application_1.MainActivity]#3(BLAST Consumer)3](id:246800000003,api:0,p:-1,c:9320) disconnect: api -1 I/BufferQueueConsumer( 9320): [SurfaceView[com.example.flutter_application_1/com.example.flutter_application_1.MainActivity]#3(BLAST Consumer)3](id:246800000003,api:0,p:-1,c:9320) disconnect I/SurfaceView( 9320): 87273880 REL Surface(name=SurfaceView[com.example.flutter_application_1/com.example.flutter_application_1.MainActivity])/@0x2345857 Surface(name=Background for SurfaceView[com.example.flutter_application_1/com.example.flutter_application_1.MainActivity])/@0xd7e4f44 Surface(name=SurfaceView[com.example.flutter_application_1/com.example.flutter_application_1.MainActivity](BLAST))/@0xd86a82d T android.view.SurfaceControl$Transaction@5478d4b I/SurfaceControl( 9320): nativeRelease 0xb400007298628ad0 count: 4 I/SurfaceControl( 9320): nativeRelease 0xb400007298627390 count: 4 I/SurfaceControl( 9320): nativeRelease 0xb4000072986290d0 count: 3 I/BufferQueueProducer( 9320): [VRI[MainActivity]#2(BLAST Consumer)2](id:246800000002,api:1,p:9320,c:9320) disconnect: api 1 D/FrameAwareSched( 9320): uboost uirescue, event = 0 I/SurfaceControl( 9320): nativeRelease 0xb4000072986251d0 count: 5 I/SurfaceControl( 9320): SurfaceControl 0xb4000072986257d0 I/SurfaceControl( 9320): nativeRelease 0xb400007298620b50 count: 2 I/SurfaceControl( 9320): ~SurfaceControl 0xb400007298620b50 I/SurfaceControl( 9320): nativeRelease 0xb400007298628050 count: 2 I/SurfaceControl( 9320): ~SurfaceControl 0xb400007298628050 I/BufferQueueConsumer( 9320): [VRI[MainActivity]#2(BLAST Consumer)2](id:246800000002,api:0,p:-1,c:9320) disconnect I/SurfaceView( 9320): 87273880 setWindowStopped true I/SurfaceView( 9320): 87273880 REL null null null T android.view.SurfaceControl$Transaction@f863328 I/SurfaceView( 9320): 87273880 REL null null null T android.view.SurfaceControl$Transaction@8aa2841 I/SurfaceView( 9320): 87273880 REL null null null T android.view.SurfaceControl$Transaction@bfd21e6 I/DecorView[]( 9320): set decor visibility 4 I/SurfaceView( 9320): 87273880 REL null null null T android.view.SurfaceControl$Transaction@8ffb327 D/FrameAwareSched( 9320): uboost uirescue, event = 1 I/r_application_1( 9320): SmartGc CheckAndAddTask : enable = 1 periodCheck = 0 D/FrameAwareSched( 9320): uboost uirescue, event = 0 I/SurfaceControl( 9320): nativeRelease 0xb4000072986257d0 count: 2 I/SurfaceControl( 9320): ~SurfaceControl 0xb4000072986257d0 D/FrameAwareSched( 9320): uboost uirescue, event = 0 E/Sentry ( 9320): Envelope submission failed E/Sentry ( 9320): java.lang.IllegalStateException: Sending the event failed. E/Sentry ( 9320): at io.sentry.transport.AsyncHttpTransport$EnvelopeSender.flush(AsyncHttpTransport.java:307) E/Sentry ( 9320): at io.sentry.transport.AsyncHttpTransport$EnvelopeSender.run(AsyncHttpTransport.java:215) E/Sentry ( 9320): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:463) E/Sentry ( 9320): at java.util.concurrent.FutureTask.run(FutureTask.java:264) E/Sentry ( 9320): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) E/Sentry ( 9320): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) E/Sentry ( 9320): at java.lang.Thread.run(Thread.java:1033) E/Sentry ( 9320): Caused by: java.net.SocketTimeoutException: failed to connect to example.ingest.sentry.io/34.120.195.249 (port 443) from /192.168.1.106 (port 45508) after 5000ms E/Sentry ( 9320): at libcore.io.IoBridge.connectErrno(IoBridge.java:235) E/Sentry ( 9320): at libcore.io.IoBridge.connect(IoBridge.java:179) E/Sentry ( 9320): at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:142) E/Sentry ( 9320): at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390) E/Sentry ( 9320): at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230) E/Sentry ( 9320): at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212) E/Sentry ( 9320): at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436) E/Sentry ( 9320): at java.net.Socket.connect(Socket.java:646) E/Sentry ( 9320): at com.android.okhttp.internal.Platform.connectSocket(Platform.java:182) E/Sentry ( 9320): at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:145) E/Sentry ( 9320): at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:116) E/Sentry ( 9320): at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:186) E/Sentry ( 9320): at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128) E/Sentry ( 9320): at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97) E/Sentry ( 9320): at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289) E/Sentry ( 9320): at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232) E/Sentry ( 9320): at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465) E/Sentry ( 9320): at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131) E/Sentry ( 9320): at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:90) E/Sentry ( 9320): at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:30) E/Sentry ( 9320): at io.sentry.transport.HttpConnection.createConnection(HttpConnection.java:145) E/Sentry ( 9320): at io.sentry.transport.HttpConnection.send(HttpConnection.java:150) E/Sentry ( 9320): at io.sentry.transport.AsyncHttpTransport$EnvelopeSender.flush(AsyncHttpTransport.java:269) E/Sentry ( 9320): ... 6 more D/Sentry ( 9320): Marking envelope submission result: false Lost connection to device. Exited. ```
buenaflor commented 10 months ago

Thank you for sending those! What's also especially noticable is the failed connection to send an envelope

E/Sentry  ( 9320): Caused by: java.net.SocketTimeoutException: failed to connect to example.ingest.sentry.io/34.120.195.249 (port 443) from /192.168.1.106 (port 43588) after 5000ms
buenaflor commented 10 months ago

@ltq918 quick confirmation, are you operating around the China region? There have been quite some incidents regarding China where events are not coming through so it might be related to the network issue.

ltq918 commented 10 months ago

Yes, it's in China, but earlier I seemed to be able to use the service, it might not be very stable

buenaflor commented 10 months ago

Did you also notice similar "slow cold boot" behaviour on iOS? or only Android?

ltq918 commented 10 months ago

Since there is no analogue of SystemNavigator.pop in iOS with only an exit(0) (but it is not recommended and does not comply with Apple Human Interface guidelines,Refer to this iOS documentation archive.), I am not currently using this approach. I'm guessing there may not be a similar problem on iOS. I'll test this later with exit(0), but actually we probably won't exit the app like this in iOS (because it looks like a crash). However, in Android, this method seems to be commonly used to exit the program.

buenaflor commented 10 months ago

Got it 👍 Thanks for all the info

buenaflor commented 10 months ago

What's interesting is if this is also a problem on native android with our sentry-android sdk - is that possible for you to test? @ltq918

ltq918 commented 10 months ago

Even though I'm currently not very good at native Android app development, as far as testing goes, I think I should be fine. But it may take some time

ltq918 commented 10 months ago

I just tested with native Android and successfully received the verification message "This app uses Sentry! :)" from the sentry installation guide, the problem does not seem to exist in native android, it works regardless of the network and regardless of the exit method Has good startup performance.

Here are my test steps:

  1. Use the latest Android studio (Android Studio Hedgehog | 2023.1.1)

  2. Select [New Project] and select [Empty Activity]

  3. After the project is initialized, follow the Sentry Android installation guide to add id("io.sentry.android.gradle") version "4.1.1" in YourProjects/app/build.gradle.kts

  4. Add the following code to YourProjects/app/src/main/AndroidManifest.xml

    <!-- Required: set your sentry.io project identifier (DSN) --> 
    <meta-data android:name="io.sentry.dsn" android:value="https://example.ingest.sentry.io/example" />
    
    <!-- enable automatic breadcrumbs for user interactions (clicks, swipes, scrolls) -->
    <meta-data android:name="io.sentry.traces.user-interaction.enable" android:value="true" />
    <!-- enable screenshot for crashes -->
    <meta-data android:name="io.sentry.attach-screenshot" android:value="true" />
    <!-- enable view hierarchy for crashes -->
    <meta-data android:name="io.sentry.attach-view-hierarchy" android:value="true" />
    
    <!-- enable the performance API by setting a sample-rate, adjust in production env -->
    <meta-data android:name="io.sentry.traces.sample-rate" android:value="1.0" />
    <!-- enable profiling when starting transactions, adjust in production env -->
    <meta-data android:name="io.sentry.traces.profiling.sample-rate" android:value="1.0" />
  5. Modify your MainActivity.kt

package com.example.myapplication

import android.os.Bundle import android.widget.Toast import androidx.activity.ComponentActivity import androidx.activity.compose.BackHandler import androidx.activity.compose.setContent import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Surface import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview import com.example.myapplication.ui.theme.MyApplicationTheme import io.sentry.Sentry

class MainActivity : ComponentActivity() { private var backPressedTime: Long = 0

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)

    setContent {
        MyApplicationTheme {
            // A surface container using the 'background' color from the theme
            BackHandler {
                if (backPressedTime + 2000 > System.currentTimeMillis()) { 
                    finish()
                } else {
                    Sentry.captureException(RuntimeException("This app uses Sentry! :)"));
                    Toast.makeText(
                        this@MainActivity,
                        "Press back again to exit",
                        Toast.LENGTH_SHORT
                    ).show()
                }
                backPressedTime = System.currentTimeMillis()
            }
            Surface(
                modifier = Modifier.fillMaxSize(),
                color = MaterialTheme.colorScheme.background
            ) {
                Greeting("Android")
            }
        }
    }
}

}

@Composable fun Greeting(name: String, modifier: Modifier = Modifier) { Text( text = "Hello $name!", modifier = modifier ) }

@Preview(showBackground = true) @Composable fun GreetingPreview() { MyApplicationTheme { Greeting("Android") } }


6. Run it on a real machine for previous tests.
ltq918 commented 10 months ago

In addition, if you use exit(0) in flutter to exit the application on the iOS platform, the problem of slow cold startup of the application will not occur.

buenaflor commented 10 months ago

Thanks for taking the time!

stefanosiano commented 9 months ago

I had a look into this. From what I understand, when an app is closed with the back button on Android, it goes in a detached state, when the flutter engine keeps running, even if no view is visible anymore. The issue is that we don't close the native layers when the app is in detached state, and when the app restarts, we initialize the SDK again. But the native layer is still running, so the SDK stops the previous native SDK instance and starts it again. Due to how the Android SDK is implemented, when it is closed, it tries to finish sending the data it has to send, blocking the current thread. I tried to implement a fix, but the MethodChannel don't work when the app goes in detached state, apparently by design. Swiping the app away from the recents view kills the app process, stopping the native layers, too. That's why the issue doesn't occur in that case.

This leaves us with the following options:

  1. Make the Android SDK close without waiting, in evaluation
  2. Wait for the flutter team to make MethodChannel work in detached state, unlikely but not impossible
  3. Find another way to avoid restarting the native SDKs
stefanosiano commented 9 months ago

The Android SDK 7.4.0 should solve this issue. Let's update it and check again

ltq918 commented 9 months ago

I added api 'io.sentry:sentry-android:7.4.0' in flutter_project/android/app/build.gradle, verified that the problem has been successfully fixed. And now using SystemNavigator.pop to exit and re-enter is faster than cold-starting an app by crossing it out from the Android task list.

Many thanks to you and all involved for your work.

buenaflor commented 9 months ago

that's great to hear! Thanks a lot @stefanosiano!

We'll bump the android sdk to 7.4.0 for the upcoming release