From 93ed71f615cbac78e301045d756e3c5b0686ad02 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Mon, 9 Dec 2024 14:25:36 +0200 Subject: [PATCH] temporarily ignore flutter secure storage errors --- lib/utils/exception_handler.dart | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/utils/exception_handler.dart b/lib/utils/exception_handler.dart index 6f1ed35a0..7fdbf9307 100644 --- a/lib/utils/exception_handler.dart +++ b/lib/utils/exception_handler.dart @@ -1,6 +1,5 @@ import 'dart:io'; -import 'package:cake_wallet/core/secure_storage.dart'; import 'package:cake_wallet/entities/preferences_key.dart'; import 'package:cake_wallet/generated/i18n.dart'; import 'package:cake_wallet/main.dart'; @@ -21,7 +20,8 @@ class ExceptionHandler { static const _coolDownDurationInDays = 7; static File? _file; - static Future _saveException(String? error, StackTrace? stackTrace, {String? library}) async { + static Future _saveException(String? error, StackTrace? stackTrace, + {String? library}) async { final appDocDir = await getAppDir(); if (_file == null) { @@ -103,7 +103,8 @@ class ExceptionHandler { return; } - if (_ignoreError(errorDetails.exception.toString())) { + if (_ignoreError(errorDetails.exception.toString()) || + _ignoreError(errorDetails.stack.toString())) { return; } @@ -199,6 +200,13 @@ class ExceptionHandler { "input stream error", "invalid signature", "invalid password", + // Temporary ignored, More context: Flutter secure storage reads the values as null some times + // probably when the device was locked and then opened on Cake + // this is solved by a restart of the app + // just ignoring until we find a solution to this issue or migrate from flutter secure storage + "core/auth_service.dart:63", + "core/key_service.dart:14", + "core/wallet_loading_service.dart:132", ]; static Future _addDeviceInfo(File file) async {