From a9678918a3554bfb9a62f3ccf7789b69713ce3a6 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Sun, 4 Oct 2020 12:32:29 +0200 Subject: [PATCH] fix: More debug logs --- lib/components/matrix.dart | 5 ++++- lib/utils/famedlysdk_store.dart | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/components/matrix.dart b/lib/components/matrix.dart index d4b51ce..cc35c21 100644 --- a/lib/components/matrix.dart +++ b/lib/components/matrix.dart @@ -85,7 +85,9 @@ class MatrixState extends State { void _initWithStore() async { var initLoginState = client.onLoginStateChanged.stream.first; try { - client.database = await getDatabase(client); + client.database = await getDatabase(client).timeout( + Duration(seconds: 15), + ); client.connect(); if (await initLoginState == LoginState.logged && PlatformInfos.isMobile) { await FirebaseController.setupFirebase( @@ -97,6 +99,7 @@ class MatrixState extends State { } catch (e, s) { client.onLoginStateChanged.sink.addError(e, s); captureException(e, s); + rethrow; } } diff --git a/lib/utils/famedlysdk_store.dart b/lib/utils/famedlysdk_store.dart index 5752ce7..246827f 100644 --- a/lib/utils/famedlysdk_store.dart +++ b/lib/utils/famedlysdk_store.dart @@ -31,7 +31,9 @@ Future getDatabase(Client client) async { filename: 'moor.sqlite', password: password, ); + debugPrint('[Moor] Database has been created'); if (needMigration) { + debugPrint('[Moor] Start migration'); await migrate(client.clientName, _db, store); await store.setItem('database-password', password); }