Repository navigation
Improve sync error handling - #3401
alperozturk96 wants to merge 3 commits into
Conversation
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
| default -> { | ||
| try { | ||
| AccountImporter.onActivityResult(requestCode, resultCode, data, this, (ssoAccount) -> { | ||
| ApiProvider.getInstance().invalidateAPICache(ssoAccount); |
There was a problem hiding this comment.
clear cache and post new account
| private boolean syncOnlyOnWifi; | ||
| private final MutableLiveData<Boolean> syncStatus = new MutableLiveData<>(false); | ||
| private final MutableLiveData<ArrayList<Throwable>> syncErrors = new MutableLiveData<>(); | ||
| private final SingleLiveEvent<ArrayList<Throwable>> syncErrors = new SingleLiveEvent<>(); |
There was a problem hiding this comment.
MainActivity subscribed again it got the last sync failure again, even if later syncs had succeeded. SingleLiveEvent delivers each batch once.
| HTTP_UNAVAILABLE -> MAINTENANCE | ||
| HTTP_INSUFFICIENT_STORAGE -> INSUFFICIENT_STORAGE | ||
| SSO_LOCAL_FAILURE -> SERVER_UNREACHABLE | ||
| SSO_LOCAL_FAILURE -> null |
There was a problem hiding this comment.
900 doesn't mean SERVER_UNREACHABLE
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| Documentation | 6 minor |
🟢 Metrics 6 complexity · 0 duplication
Metric Results Complexity 6 Duplication 0
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
📱 QA build
The QA build installs alongside a released Nextcloud app, so you can keep Downloading the file requires a GitHub account, so open this link on the |
Issue
After the Files app was reinstalled, Notes couldn't sync anymore ("token mismatch")
The app said "server unreachable" instead of the real reason.
The only advice was "remove and add the account", which deletes unsynced notes.
Old errors kept popping up even after syncing worked again.
How to reproduce?
Changes
SSO Library PR: nextcloud/Android-SingleSignOn#1099
🤖 AI (if applicable)