Android: Note stuck in synchronization loop after editing until note is deleted from server

未关闭
#3,442 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
22/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
活跃
技术栈
android, java
领域
mobile

调研方向

The failure is raised from pushLocalChanges in NotesServerSyncTask.java (around line 150), which run() calls at line 99; the logged exception comes from the SSO InputStreamBinder. Start by reading how pushLocalChanges picks and retries an edited note, and why a failed push is never marked as done. Done means a note that fails to push stops looping and either syncs or surfaces a conflict, confirmed by a sync test. The reporter has no reproduction steps, so reproducing the loop first is the main hurdle.

由索引模型根据 Issue 内容生成。

描述

0. Needs triage bug
This issue respects the following points:
Describe the bug

Environment:

  • Nextcloud Notes Android app
  • Nextcloud server:35.0.3
  • Android: 12
  • Notes app version: 35.0.0

Issue:

Sometimes after editing a note on the Android app, the note fails to synchronize correctly.

The application then appears to enter an endless synchronization loop. The note remains unsynchronized and the issue persists even after:

  • forcing synchronization
  • restarting the application
  • rebooting the phone

The only workaround I found is:

  1. Open Notes from the web interface or desktop.
  2. Delete the problematic note.
  3. The Android app starts synchronizing normally again.
  4. The deleted note unexpectedly reappears on the server, apparently pushed back from the mobile application.

Expected behavior:

  • The note should synchronize normally after editing.
  • A synchronization conflict should be detected and handled gracefully if necessary.
  • The application should not enter an endless sync loop.

Actual behavior:

  • One note becomes stuck.
  • Synchronization keeps failing repeatedly.
  • Restarting the device does not solve the issue.
  • Deleting the note on the server temporarily restores synchronization.
  • The deleted note is recreated from the mobile client during the next synchronization.

Additional information:

I am attaching the error log generated by the mobile application.

Expected behavior
Notes Android version

35.0.0

Notes server version

6.1.0

Nextcloud Android version

35.0.2

Nextcloud version

35.0.3

Device

redmi note 10

Android Version

12

App Store
  • Google Play Store
  • F-Droid
  • Huawei App Gallery
Stacktrace

App Version: 35.0.0
App Version Code: 350000090
App Flavor: play

Files App Version Code: 350000290 (PROD)


OS Version: 4.14.186-perf-g0d9078479a02(V13.0.3.0.SKSEUXM)
OS API Level: 31
Device: camellian
Manufacturer: Xiaomi
Model (and Product): M2103K19G (camellian_eea)


java.lang.Exception: {"errorType":"Exception"}
[com.nextcloud.android.sso.InputStreamBinder.processRequestV2(InputStreamBinder.java:440), com.nextcloud.android.sso.InputStreamBinder.performNextcloudRequestAndBodyStreamV2(InputStreamBinder.java:113), com.nextcloud.android.sso.InputStreamBinder.performNextcloudRequestV2(InputStreamBinder.java:96), com.nextcloud.android.sso.aidl.IInputStreamService$Stub.onTransact(IInputStreamService.java:112), android.os.Binder.execTransactInternal(Binder.java:1179), android.os.Binder.execTransact(Binder.java:1143)]
at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.pushLocalChanges(NotesServerSyncTask.java:150)
at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.run(NotesServerSyncTask.java:99)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:520)
at java.util.concurrent.FutureTask.run(FutureTask.java:328)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1100)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:1571)

主要语言
Java
星标
1.1k
派生
177
平均合并
12 小时 24 分钟
30 天内合并 PR
26

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

nextcloud/notes-android 的其他 Issue

查看 nextcloud/notes-android 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。