temporarily ignore flutter secure storage errors
OmarHatem committed
Dec 9, 2024 at 14:25 UTC
93ed71f615cbac78e301045d756e3c5b0686ad02
1 file changed
+11
-3
lib/utils/exception_handler.dart
+11
-3
@@ -1,6 +1,5 @@
1
import 'dart:io';
2
3
-import 'package:cake_wallet/core/secure_storage.dart';
3
import 'package:cake_wallet/entities/preferences_key.dart';
4
import 'package:cake_wallet/generated/i18n.dart';
5
import 'package:cake_wallet/main.dart';
@@ -21,7 +20,8 @@ class ExceptionHandler {
20
static const _coolDownDurationInDays = 7;
21
static File? _file;
22
24
- static Future<void> _saveException(String? error, StackTrace? stackTrace, {String? library}) async {
23
+ static Future<void> _saveException(String? error, StackTrace? stackTrace,
24
+ {String? library}) async {
25
final appDocDir = await getAppDir();
26
27
if (_file == null) {
@@ -103,7 +103,8 @@ class ExceptionHandler {
103
return;
104
}
105
106
- if (_ignoreError(errorDetails.exception.toString())) {
106
+ if (_ignoreError(errorDetails.exception.toString()) ||
107
+ _ignoreError(errorDetails.stack.toString())) {
108
return;
109
}
110
@@ -199,6 +200,13 @@ class ExceptionHandler {
200
"input stream error",
201
"invalid signature",
202
"invalid password",
203
+ // Temporary ignored, More context: Flutter secure storage reads the values as null some times
204
+ // probably when the device was locked and then opened on Cake
205
+ // this is solved by a restart of the app
206
+ // just ignoring until we find a solution to this issue or migrate from flutter secure storage
207
+ "core/auth_service.dart:63",
208
+ "core/key_service.dart:14",
209
+ "core/wallet_loading_service.dart:132",
210
];
211
212
static Future<void> _addDeviceInfo(File file) async {