Skip to content

crash: Sync crashes when remote highlights file already exists #30

@MySTerY1747

Description

@MySTerY1747

Bug: Sync crashes when remote highlights file already exists (WebDAV / Nextcloud)

Description

When using the plugin to sync book highlights to a Nextcloud server via WebDAV, the first sync works correctly, but subsequent sync attempts cause KOReader to hang indefinitely.

The device gets stuck on the message:

“Syncing book highlights. This may take a while.”

At this point, KOReader is unresponsive and the only way to recover is to force-restart the device.

Expected behavior

  • Sync should complete successfully whether or not a highlights file with the same name already exists on the server.
  • Existing files should either be overwritten, updated, or merged without crashing.

Actual behavior

  • First sync (when the remote file does not exist): works as expected.
  • Second sync (when the remote file already exists): KOReader freezes indefinitely.
  • No error message is shown.
  • Sync cannot be cancelled once started.

Workaround

If I manually:

  1. Open my Nextcloud server
  2. Delete the existing highlights file
  3. Trigger sync again from KOReader

The sync completes successfully, just like the first time.

This strongly suggests the plugin has an issue handling existing remote files with the same name (e.g. overwrite or conflict handling).

Environment

  • Device: Kindle Paperwhite (10th generation)
  • KOReader version: latest stable (at time of writing)
  • Plugin version: 0.7.1
  • Sync backend: Nextcloud via WebDAV

Additional notes

  • The issue is fully reproducible.
  • Happens consistently on every second sync attempt unless the remote file is deleted beforehand.

Let me know if logs or additional debugging info would help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions