From 73b45e2590655a992cec409503c0693df845914e Mon Sep 17 00:00:00 2001 From: "Lucas.Xu" Date: Sat, 17 Aug 2024 19:17:01 +0800 Subject: [PATCH] chore: remove sentry --- frontend/appflowy_flutter/ios/Podfile.lock | 11 ------- .../presentation/home/mobile_home_page.dart | 9 ------ .../appflowy_flutter/lib/startup/startup.dart | 1 - .../lib/startup/tasks/prelude.dart | 1 - .../lib/startup/tasks/sentry.dart | 30 ------------------- .../home/desktop_home_screen.dart | 9 ------ frontend/appflowy_flutter/pubspec.lock | 16 ---------- frontend/appflowy_flutter/pubspec.yaml | 2 -- 8 files changed, 79 deletions(-) delete mode 100644 frontend/appflowy_flutter/lib/startup/tasks/sentry.dart diff --git a/frontend/appflowy_flutter/ios/Podfile.lock b/frontend/appflowy_flutter/ios/Podfile.lock index 8829c71074..ed45f077de 100644 --- a/frontend/appflowy_flutter/ios/Podfile.lock +++ b/frontend/appflowy_flutter/ios/Podfile.lock @@ -67,11 +67,6 @@ PODS: - SDWebImage (5.14.2): - SDWebImage/Core (= 5.14.2) - SDWebImage/Core (5.14.2) - - Sentry/HybridSDK (8.33.0) - - sentry_flutter (8.7.0): - - Flutter - - FlutterMacOS - - Sentry/HybridSDK (= 8.33.0) - share_plus (0.0.1): - Flutter - shared_preferences_foundation (0.0.1): @@ -103,7 +98,6 @@ DEPENDENCIES: - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) - - sentry_flutter (from `.symlinks/plugins/sentry_flutter/ios`) - share_plus (from `.symlinks/plugins/share_plus/ios`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) - sqflite (from `.symlinks/plugins/sqflite/darwin`) @@ -116,7 +110,6 @@ SPEC REPOS: - DKPhotoGallery - ReachabilitySwift - SDWebImage - - Sentry - SwiftyGif - Toast @@ -151,8 +144,6 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/path_provider_foundation/darwin" permission_handler_apple: :path: ".symlinks/plugins/permission_handler_apple/ios" - sentry_flutter: - :path: ".symlinks/plugins/sentry_flutter/ios" share_plus: :path: ".symlinks/plugins/share_plus/ios" shared_preferences_foundation: @@ -184,8 +175,6 @@ SPEC CHECKSUMS: permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2 ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 SDWebImage: b9a731e1d6307f44ca703b3976d18c24ca561e84 - Sentry: 8560050221424aef0bebc8e31eedf00af80f90a6 - sentry_flutter: e26b861f744e5037a3faf9bf56603ec65d658a61 share_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5 shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695 sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/home/mobile_home_page.dart b/frontend/appflowy_flutter/lib/mobile/presentation/home/mobile_home_page.dart index f590f19bf9..70f7adfada 100644 --- a/frontend/appflowy_flutter/lib/mobile/presentation/home/mobile_home_page.dart +++ b/frontend/appflowy_flutter/lib/mobile/presentation/home/mobile_home_page.dart @@ -27,7 +27,6 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:provider/provider.dart'; -import 'package:sentry/sentry.dart'; import 'package:toastification/toastification.dart'; class MobileHomeScreen extends StatelessWidget { @@ -66,14 +65,6 @@ class MobileHomeScreen extends StatelessWidget { return const WorkspaceFailedScreen(); } - Sentry.configureScope( - (scope) => scope.setUser( - SentryUser( - id: userProfile.id.toString(), - ), - ), - ); - return Scaffold( body: SafeArea( bottom: false, diff --git a/frontend/appflowy_flutter/lib/startup/startup.dart b/frontend/appflowy_flutter/lib/startup/startup.dart index 213e5f6227..3dac4f229c 100644 --- a/frontend/appflowy_flutter/lib/startup/startup.dart +++ b/frontend/appflowy_flutter/lib/startup/startup.dart @@ -110,7 +110,6 @@ class FlowyRunner { // this task should be first task, for handling platform errors. // don't catch errors in test mode if (!mode.isUnitTest) const PlatformErrorCatcherTask(), - if (!mode.isUnitTest) const InitSentryTask(), // this task should be second task, for handling memory leak. // there's a flag named _enable in memory_leak_detector.dart. If it's false, the task will be ignored. MemoryLeakDetectorTask(), diff --git a/frontend/appflowy_flutter/lib/startup/tasks/prelude.dart b/frontend/appflowy_flutter/lib/startup/tasks/prelude.dart index 2c3aced3ab..dbdbfdc552 100644 --- a/frontend/appflowy_flutter/lib/startup/tasks/prelude.dart +++ b/frontend/appflowy_flutter/lib/startup/tasks/prelude.dart @@ -11,6 +11,5 @@ export 'platform_error_catcher.dart'; export 'platform_service.dart'; export 'recent_service_task.dart'; export 'rust_sdk.dart'; -export 'sentry.dart'; export 'supabase_task.dart'; export 'windows.dart'; diff --git a/frontend/appflowy_flutter/lib/startup/tasks/sentry.dart b/frontend/appflowy_flutter/lib/startup/tasks/sentry.dart deleted file mode 100644 index f2be7cb56d..0000000000 --- a/frontend/appflowy_flutter/lib/startup/tasks/sentry.dart +++ /dev/null @@ -1,30 +0,0 @@ -import '../startup.dart'; - -class InitSentryTask extends LaunchTask { - const InitSentryTask(); - - @override - Future initialize(LaunchContext context) async { - // Disable sentry temporarily, it will cause the app unresponsive - return; - - // const dsn = Env.sentryDsn; - // if (dsn.isEmpty) { - // Log.info('Sentry DSN is not set, skipping initialization'); - // return; - // } - - // Log.info('Initializing Sentry'); - - // await SentryFlutter.init( - // (options) { - // options.dsn = dsn; - // options.tracesSampleRate = 0.1; - // options.profilesSampleRate = 0.1; - // }, - // ); - } - - @override - Future dispose() async {} -} diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/home/desktop_home_screen.dart b/frontend/appflowy_flutter/lib/workspace/presentation/home/desktop_home_screen.dart index a8d768aa79..2b2c48c787 100644 --- a/frontend/appflowy_flutter/lib/workspace/presentation/home/desktop_home_screen.dart +++ b/frontend/appflowy_flutter/lib/workspace/presentation/home/desktop_home_screen.dart @@ -26,7 +26,6 @@ import 'package:appflowy_backend/protobuf/flowy-user/protobuf.dart' import 'package:flowy_infra_ui/style_widget/container.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:sentry/sentry.dart'; import 'package:sized_context/sized_context.dart'; import 'package:styled_widget/styled_widget.dart'; @@ -68,14 +67,6 @@ class DesktopHomeScreen extends StatelessWidget { return const WorkspaceFailedScreen(); } - Sentry.configureScope( - (scope) => scope.setUser( - SentryUser( - id: userProfile.id.toString(), - ), - ), - ); - return AFFocusManager( child: MultiBlocProvider( key: ValueKey(userProfile.id), diff --git a/frontend/appflowy_flutter/pubspec.lock b/frontend/appflowy_flutter/pubspec.lock index 267fb80c21..3a40d6cb30 100644 --- a/frontend/appflowy_flutter/pubspec.lock +++ b/frontend/appflowy_flutter/pubspec.lock @@ -1723,22 +1723,6 @@ packages: url: "https://pub.dev" source: hosted version: "0.3.8" - sentry: - dependency: "direct main" - description: - name: sentry - sha256: "0f787e27ff617e4f88f7074977240406a9c5509444bac64a4dfa5b3200fb5632" - url: "https://pub.dev" - source: hosted - version: "8.7.0" - sentry_flutter: - dependency: "direct main" - description: - name: sentry_flutter - sha256: fbbb47d72ccca48be25bf3c2ced6ab6e872991af3a0ba78e54be8d138f2e053f - url: "https://pub.dev" - source: hosted - version: "8.7.0" share_plus: dependency: "direct main" description: diff --git a/frontend/appflowy_flutter/pubspec.yaml b/frontend/appflowy_flutter/pubspec.yaml index d6a7f61930..081e02449e 100644 --- a/frontend/appflowy_flutter/pubspec.yaml +++ b/frontend/appflowy_flutter/pubspec.yaml @@ -151,8 +151,6 @@ dependencies: scroll_to_index: ^3.0.1 extended_text_field: ^15.0.0 extended_text_library: ^12.0.0 - sentry_flutter: ^8.7.0 - sentry: ^8.7.0 dev_dependencies: flutter_lints: ^4.0.0