File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
packages/supabase_flutter/lib/src Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,8 @@ class HiveLocalStorage extends LocalStorage {
87
87
encryptionCipher = HiveAesCipher (base64Url.decode (encryptionKey! ));
88
88
}
89
89
await Hive .initFlutter ('auth' );
90
- await Hive .openBox (_hiveBoxName, encryptionCipher: encryptionCipher);
90
+ await Hive .openBox (_hiveBoxName, encryptionCipher: encryptionCipher)
91
+ .timeout (const Duration (seconds: 1 ));
91
92
}
92
93
93
94
@override
@@ -185,7 +186,12 @@ class MigrationLocalStorage extends LocalStorage {
185
186
await Hive .initFlutter ('auth' );
186
187
hiveLocalStorage = const HiveLocalStorage ();
187
188
await sharedPreferencesLocalStorage.initialize ();
188
- await migrate ();
189
+ try {
190
+ await migrate ();
191
+ } on TimeoutException {
192
+ // Ignore TimeoutException thrown by Hive methods
193
+ // https://github.com/supabase/supabase-flutter/issues/794
194
+ }
189
195
}
190
196
191
197
@visibleForTesting
You can’t perform that action at this time.
0 commit comments