nextcloud / notes-android

✎ Android client for Nextcloud Notes app.
https://play.google.com/store/apps/details?id=it.niedermann.owncloud.notes
GNU General Public License v3.0
948 stars 135 forks source link

Multiple Copy after sync failure #1939

Open Martin-By opened 12 months ago

Martin-By commented 12 months ago

Please use GitHub reactions 👍 to show that you are affected by the same issue. Please don't comment if you have no relevant information to add!

Describe the bug

I use NC 27.1.4 on hosted system together with newest NC App & DAV Droid on two Android devices (Phone & Tablet, Android 13 & 11). The Account ist managed via existing NC App Account

News created notes within a notes category cause sync Error Messages and multiple (up to hundrets) copies of this new Note

To Reproduce Steps to reproduce the behavior:

  1. Go to '…'
  2. Click on '…'
  3. Scroll down to '…'
  4. See error

Doing nothing else than creating a new Note. Reinstalling from Fdroid or Play Store does Not avoid this behavior.

Expected behavior

Not creating unwanted copies of notes

Screenshots

Smartphone (please complete the following information):

Server

*Stacktrace

App Version: 4.1.0
App Version Code: 40010090
App Flavor: fdroid

Files App Version Code: 30260090 (PROD)

---

OS Version: 5.4.210-moto-g1942d9e0ec80(d791e1-b91f3)
OS API Level: 33
Device: berlin
Manufacturer: motorola
Model (and Product): motorola edge 20 (berlin_globale)

---

java.lang.Exception: java.lang.IllegalArgumentException: Unexpected char 0xfffd at 12 in Content-Security-Policy value: default-src ���none��� ���unsafe-inline��� ���unsafe-eval���  ; object-src ���self��� ���unsafe-inline��� ���unsafe-eval��� ; script-src ���self��� ���unsafe-inline��� ���unsafe-eval��� ; img-src ���self���  https://s.w.org https://wordpress.org; style-src ���self��� ���unsafe-inline��� ���unsafe-eval���; base-uri 'self'; form-action 'self' ���unsafe-inline���; frame-src ���self��� ���unsafe-inline��� ���unsafe-eval���
    at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.pushLocalChanges(NotesServerSyncTask.java:158)
    at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.run(NotesServerSyncTask.java:94)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:487)
    at java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
    at java.lang.Thread.run(Thread.java:1012)

Screenshot_20231129-164309

[notes] Fehler: OCA\Notes\Service\NoteDoesNotExistException: at <>

  1. /var/www/vhosts/hostingxxx.a2eb8.netcup.net/WEB/WWW/nextcloud/apps/notes/lib/Service/NotesService.php line 140 OCA\Notes\Service\NotesService::getFileById("md", ["OC\Files\Node\Folder"], 105329)
  2. /var/www/vhosts/hostingxxxx.a2eb8.netcup.net/WEB/WWW/nextcloud/apps/notes/lib/Controller/NotesApiController.php line 220 OCA\Notes\Service\NotesService->delete("xxx", 105329)
  3. /var/www/vhosts/hostingxxxx.a2eb8.netcup.net/WEB/WWW/nextcloud/apps/notes/lib/Service/Util.php line 26 OCA\Notes\Controller\NotesApiController->OCA\Notes\Controller{closure}(" sensitive parameters replaced ")
  4. /var/www/vhosts/hostingxxx.a2eb8.netcup.net/WEB/WWW/nextcloud/apps/notes/lib/Controller/Helper.php line 140 OCA\Notes\Service\Util::retryIfLocked(["Closure"])
  5. /var/www/vhosts/hostingxxx.a2eb8.netcup.net/WEB/WWW/nextcloud/apps/notes/lib/Controller/NotesApiController.php line 219 OCA\Notes\Controller\Helper->handleErrorResponse(["Closure"])
  6. /var/www/vhosts/hostingxxx.a2eb8.netcup.net/WEB/WWW/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 230 OCA\Notes\Controller\NotesApiController->destroy(105329)
  7. /var/www/vhosts/hostingxxx.a2eb8.netcup.net/WEB/WWW/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 137 OC\AppFramework\Http\Dispatcher->executeController(["OCA\Notes\Co ... "], "destroy")
  8. /var/www/vhosts/hostingxxxx.a2eb8.netcup.net/WEB/WWW/nextcloud/lib/private/AppFramework/App.php line 183 OC\AppFramework\Http\Dispatcher->dispatch(["OCA\Notes\Co ... "], "destroy")
  9. /var/www/vhosts/hostingxxxx.a2eb8.netcup.net/WEB/WWW/nextcloud/lib/private/Route/Router.php line 315 OC\AppFramework\App::main("OCA\Notes\Con ... r", "destroy", ["OC\AppFramewo ... "], ["v1","105329","notes.notes_api.destroy"])
  10. /var/www/vhosts/hostingxxx.a2eb8.netcup.net/WEB/WWW/nextcloud/lib/base.php line 1068 OC\Route\Router->match("/apps/notes/api/v1/notes/105329")
    1. /var/www/vhosts/hostingxxx.a2eb8.netcup.net/WEB/WWW/nextcloud/index.php line 36 OC::handleRequest()

DELETE /index.php/apps/notes/api/v1/notes/105329? from 2a04:9740:122:1b00:c54c:241a:7a02:2105 by xxx at 2023-11-29T15:40:17+00:00

With 'xxx' partially replaced

UPDATE 2023-12-01 Today I deactivated two APPS (Versions & Open In Cryptpad) and deleted the existing copies. --> No effect, the copies are still created after creating new notes

UPDATE 23-12-04 Installing version 4.1.0 RC1 on my Android 11 Tablet shows none sync conflicts/problems so far. Multiple copies were now deleted from server. Creating new note cause no sync conflict and no multiple copies any more

Martin-By commented 11 months ago

After replacing 4.1.0 with 4.1.0 RC1 on my Android 11 Tablet with success I tried V 4.1.0 on my Android 13 Phone: still sync problems with then following creation of multiple copies.

Installing 4.1.0 RC1 on my Android 13 Phone seems to solve this problems also.

Therefore V 4.1.0 seems to have sync problems whereas RC1 Version seems to be OK.

UPDATE 2023-12-08

Update to Server App 4.9.0, Issue with Android App 4.1.0 does Not solve it.

Martin-By commented 11 months ago

Also after Update of Server to 27.1.5 the Version 4.1.0 created multiple copies after sync Error. Same for new Notes Server App 4.9.1!

Martin-By commented 11 months ago

Also Beta Version of Playstore with same issue

Martin-By commented 11 months ago

Also with server App 4.9.2 shows same issue

Martin-By commented 10 months ago

With actual updates on Playstore the combination of server (27.1.5) , client (3.27.0) and notes App (4.10). No issue anymore.

UPDATE The Problem still existiert, so I Had to Fall Back to Version 4.10RC

lapor-kris commented 7 months ago

Same happens here. On Fairphone 5 with Android 13 with Notes from F-droid (latest) and Nextcloud 28.0.4. My partner gets loads of copies of Notes. But it works great for me on my Fairphone 4 with Android 12 and Notes from F-droid. Odd...