From 9feb356fadd3dc5c3d916124d9339b5813759183 Mon Sep 17 00:00:00 2001 From: Matthias Nehlsen Date: Tue, 25 Apr 2023 00:55:55 +0200 Subject: [PATCH] Fix sync getting stuck on key mismatch --- CHANGELOG.md | 3 +++ lib/sync/inbox/process_message.dart | 9 +++++++++ lib/themes/theme.dart | 5 ----- pubspec.yaml | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b5f9e3d4..8c7a71844 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Sync assistant styling - Upgraded dependencies +### Fixed: +- Sync getting stuck after generating new sync key and on reading sync message encrypted with old key + ## [0.8.329] - 2023-04-23 ### Changed: - Upgrade flutter_quill lib diff --git a/lib/sync/inbox/process_message.dart b/lib/sync/inbox/process_message.dart index f68808639..20adeeaaf 100644 --- a/lib/sync/inbox/process_message.dart +++ b/lib/sync/inbox/process_message.dart @@ -1,5 +1,6 @@ import 'dart:async'; +import 'package:cryptography/cryptography.dart'; import 'package:enough_mail/enough_mail.dart'; import 'package:flutter/foundation.dart'; import 'package:lotti/classes/config.dart'; @@ -116,6 +117,14 @@ Future fetchByUid({ subDomain: '_fetchByUid', ); rethrow; + } on SecretBoxAuthenticationError catch (e) { + await setLastReadUid(uid); + loggingDb.captureException( + e, + domain: 'INBOX_SERVICE', + subDomain: '_fetchByUid skipping', + ); + rethrow; } catch (e, stackTrace) { loggingDb.captureException( e, diff --git a/lib/themes/theme.dart b/lib/themes/theme.dart index 1b5a7010c..1cebe4e0c 100644 --- a/lib/themes/theme.dart +++ b/lib/themes/theme.dart @@ -170,11 +170,6 @@ TextStyle buttonLabelStyleLarger() => TextStyle( fontSize: 20, ); -TextStyle settingsLabelStyle() => TextStyle( - color: styleConfig().primaryTextColor, - fontSize: fontSizeMedium, - ); - TextStyle choiceLabelStyle() => TextStyle( color: styleConfig().primaryTextColor, fontSize: fontSizeMedium, diff --git a/pubspec.yaml b/pubspec.yaml index ebb815ee4..dea2eeae0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: lotti description: Achieve your goals and keep your data private with Lotti. publish_to: 'none' -version: 0.9.330+2030 +version: 0.9.330+2031 msix_config: display_name: LottiApp