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
921 stars 134 forks source link

Synchronization Failed pushLocalChanges #1620

Closed lindsayschm closed 1 year ago

lindsayschm commented 1 year 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

Everytime I attempt to use the application, it throws a constant synchronization error. This has been happening for months, with every version of the application. Issue persists after fully reinstalling nextcloud and notes on phone, including wiping all the data as described In the FAQ. Some things will sync despite throwing the error, like content changes; other things like deletes fail.

To Reproduce Steps to reproduce the behavior:

  1. Install. Connect account.
  2. Open Notes.
  3. Error.

Expected behavior

The Notes app syncs with the server without failing.

Screenshots

Smartphone (please complete the following information):

Server

Stacktrace

App Version: 3.7.1
App Version Code: 3007001
App Flavor: fdroid

Files App Version Code: 30230090

---

OS Version: 4.4.153-17214672(G955USQU8DUD3)
OS API Level: 28
Device: dream2qltesq
Manufacturer: samsung
Model (and Product): SM-G955U (dream2qltesq)

---

java.lang.Exception: {"errorType":"TypeError"}

    at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.pushLocalChanges(NotesServerSyncTask.java:174)
    at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.run(NotesServerSyncTask.java:94)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:459)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:764)

java.lang.Exception: {"errorType":"TypeError"}

    at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.pushLocalChanges(NotesServerSyncTask.java:174)
    at it.niedermann.owncloud.notes.persistence.NotesServerSyncTask.run(NotesServerSyncTask.java:94)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:459)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:764)
stefan-niedermann commented 1 year ago

Can youbplease check your server logs after this error appeared? Is there any hint?

sudo-Tiz commented 1 year ago

Similar issue since last nextcloud android app update v3.23.0 (01/12/22). Might not be compatible with nextcloud notes android app ? I downgraded nextcloud android app to v3.22.3 and it works now. (reason why i haven't logs)

lindsayschm commented 1 year ago

well. hell. i finally got a chance to go look at my logs. i'm not so sure this has to do with this application in particular now.

i've actually been getting emails from my system about this but didn't realize what it was telling me... now i do.

ideas?

(edit note: i did go into my server and reinstall notes. tried again, nothing changed. still throwing the same error.)

TypeError: OCA\Files_Reader\Hooks::OCA\Files_Reader\{closure}(): Argument #1 ($node) must be of type OCA\Files_Reader\Node, OC\Files\Node\File given

    <<closure>>
    OCA\Files_Reader\Hooks::OCA\Files_Reader\{closure}("*** sensiti ... *")

    /usr/share/nextcloud/lib/private/Hooks/EmitterTrait.php - line 106:
    call_user_func_array()

    /usr/share/nextcloud/lib/private/Hooks/PublicEmitter.php - line 40:
    OC\Hooks\BasicEmitter->emit()

    /usr/share/nextcloud/lib/private/Files/Node/Root.php - line 143:
    OC\Hooks\PublicEmitter->emit()

    /usr/share/nextcloud/lib/private/Files/Node/Node.php - line 117:
    OC\Files\Node\Root->emit()

    /usr/share/nextcloud/lib/private/Files/Node/File.php - line 129:
    OC\Files\Node\Node->sendHooks()

    /usr/share/nextcloud/apps/notes/lib/Service/NotesService.php - line 132:
    OC\Files\Node\File->delete()

    /usr/share/nextcloud/apps/notes/lib/Controller/NotesApiController.php - line 220:
    OCA\Notes\Service\NotesService->delete()

    /usr/share/nextcloud/apps/notes/lib/Service/Util.php - line 26:
    OCA\Notes\Controller\NotesApiController->OCA\Notes\Controller\{closure}("*** sensiti ... *")

    /usr/share/nextcloud/apps/notes/lib/Controller/Helper.php - line 140:
    OCA\Notes\Service\Util::retryIfLocked()

    /usr/share/nextcloud/apps/notes/lib/Controller/NotesApiController.php - line 222:
    OCA\Notes\Controller\Helper->handleErrorResponse()

    /usr/share/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 225:
    OCA\Notes\Controller\NotesApiController->destroy()

    /usr/share/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 133:
    OC\AppFramework\Http\Dispatcher->executeController()

    /usr/share/nextcloud/lib/private/AppFramework/App.php - line 172:
    OC\AppFramework\Http\Dispatcher->dispatch()

    /usr/share/nextcloud/lib/private/Route/Router.php - line 298:
    OC\AppFramework\App::main()

    /usr/share/nextcloud/lib/base.php - line 1030:
    OC\Route\Router->match()

    /usr/share/nextcloud/index.php - line 36:
    OC::handleRequest()
stefan-niedermann commented 1 year ago

@korelstar any idea?

lindsayschm commented 1 year ago

In a strange turn of events, this issue seems to have resolved itself. I double checked, and no systems have changed versions. The only thing that has changed is that i went in yesterday on another system and updated a bunch of notes and then deleted a bunch. The only thing I can think is that maybe one of the notes I deleted was malformed in such a way that it was breaking things.

Marking this tentatively as closed because the problem has gone away, and hoping I don't have to reopen it. Thank y'all for your time.

stefan-niedermann commented 1 year ago

Thanks for the update, feel free to reopen in case it occurs again of course.