ArkHost/HelixNotes
14
150
Fork
You've already forked HelixNotes
13

WebDAV sync deletes local notes after first sync #102

Closed
opened 2026年06月12日 09:53:58 +02:00 by jury6390 · 6 comments

Environment

  • OS: Windows 11 24H2 / Linux Mint
  • HelixNotes version: 1.30
  • WebDAV vendor: Infomaniak kDrive

Description

After configuring WebDAV sync with an app password and running "Sync Now", all notes are uploaded correctly to the remote server but are deleted locally. Only the folder structure is preserved on the local machine.

Steps to reproduce

  1. Create an app password on Infomaniak kDrive
  2. Create a dedicated folder (e.g. /Docs/Notes/HelixNotes)
  3. In HelixNotes settings, enter the WebDAV URL: https://<id>.connect.kdrive.infomaniak.com/Docs/Notes/HelixNotes
  4. Run "Test Connection" — reports success
  5. Run "Sync Now" and wait ~2 minutes

Expected behavior

Notes are synced bidirectionally. Local notes remain intact after sync.

Actual behavior

Notes are uploaded to kDrive successfully, but deleted from the local machine. Only the folder tree remains locally.

Notes

Reproducible on both Windows 11 24H2 and Linux Mint with the same WebDAV endpoint.

**Environment** - **OS:** Windows 11 24H2 / Linux Mint - **HelixNotes version:** 1.30 - **WebDAV vendor:** Infomaniak kDrive ## Description After configuring WebDAV sync with an app password and running "Sync Now", all notes are uploaded correctly to the remote server but are deleted locally. Only the folder structure is preserved on the local machine. ## Steps to reproduce 1. Create an app password on Infomaniak kDrive 2. Create a dedicated folder (e.g. `/Docs/Notes/HelixNotes`) 3. In HelixNotes settings, enter the WebDAV URL: `https://<id>.connect.kdrive.infomaniak.com/Docs/Notes/HelixNotes` 4. Run "Test Connection" — reports success 5. Run "Sync Now" and wait ~2 minutes ## Expected behavior Notes are synced bidirectionally. Local notes remain intact after sync. ## Actual behavior Notes are uploaded to kDrive successfully, but deleted from the local machine. Only the folder tree remains locally. ## Notes Reproducible on both Windows 11 24H2 and Linux Mint with the same WebDAV endpoint.

Thanks for the report.
What happened is kDrive's WebDAV returns file paths in a format HelixNotes didn't recognize, so after the first sync it thought the notes were gone from the server and cleared the local copies. The next release adds a guard so the sync stops with an error rather than removing local files when it can't read the server's paths.

To actually add kDrive support I need to see how its server reports paths. If you're up for a terminal command, run this and paste the output (redact note titles if you like):
curl -s -u "YOUR_EMAIL:YOUR_APP_PASSWORD" -X PROPFIND -H "Depth: 1" https://YOUR_ID.connect.kdrive.infomaniak.com/Docs/Notes/HelixNotes/" | head -c 4000

Use the kDrive app-password credentials you put in HelixNotes, and the same subdomain (YOUR_ID) from your sync URL. The <d:href> values in that XML are exactly what I need. Thanks!

Thanks for the report. What happened is kDrive's WebDAV returns file paths in a format HelixNotes didn't recognize, so after the first sync it thought the notes were gone from the server and cleared the local copies. The next release adds a guard so the sync stops with an error rather than removing local files when it can't read the server's paths. To actually add kDrive support I need to see how its server reports paths. If you're up for a terminal command, run this and paste the output (redact note titles if you like): curl -s -u "YOUR_EMAIL:YOUR_APP_PASSWORD" -X PROPFIND -H "Depth: 1" https://YOUR_ID.connect.kdrive.infomaniak.com/Docs/Notes/HelixNotes/" | head -c 4000 Use the kDrive app-password credentials you put in HelixNotes, and the same subdomain (YOUR_ID) from your sync URL. The `<d:href>` values in that XML are exactly what I need. Thanks!

Here are the two outputs, one for each path.

Path 1 — simple path (Docs/Notes/HelixNotes), the one I had configured in HelixNotes:

Command:

curl -v -u "MAIL:PASS" -X PROPFIND -H "Depth: 1" "https://{MY_ID}.connect.kdrive.infomaniak.com/Docs/Notes/HelixNotes/" | head -c 4000

Output:

<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns">
 <d:response><d:href>/Docs/Notes/HelixNotes/</d:href><d:propstat><d:prop><d:getlastmodified>2026年6月12日 11:18:29 GMT</d:getlastmodified><d:getcontentlength>13238911</d:getcontentlength><d:resourcetype><d:collection/></d:resourcetype><d:quota-used-bytes>13238911</d:quota-used-bytes><d:quota-available-bytes>2664670232052</d:quota-available-bytes><d:getetag>&quot;a87ff679a2f3e71d9181a67b7542122c&quot;</d:getetag></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response>
 <d:response><d:href>/Docs/Notes/HelixNotes/.helixnotes/</d:href>...</d:response>
 <d:response><d:href>/Docs/Notes/HelixNotes/Articoli/</d:href>...</d:response>
 <d:response><d:href>/Docs/Notes/HelixNotes/Work/</d:href>...</d:response>
 <d:response><d:href>/Docs/Notes/HelixNotes/Tech/</d:href>...</d:response>
 <d:response><d:href>/Docs/Notes/HelixNotes/Vario/</d:href>...</d:response>
 <d:response><d:href>/Docs/Notes/HelixNotes/Viaggi/</d:href>...</d:response>
 <d:response><d:href>/Docs/Notes/HelixNotes/scripts/</d:href>...</d:response>
</d:multistatus>

Path 2 — a nested path with square brackets and spaces in the folder name ([006] Documenti/Note/HelixNotes), URL-encoded as %5B006%5D%20Documenti/Note/HelixNotes:

Command:

curl -s -u "MAIL:PASS" -X PROPFIND -H "Depth: 1" "https://{MY_ID}.connect.kdrive.infomaniak.com/%5B006%5D%20Documenti/Note/HelixNotes/" | head -c 4000

Output:

<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns">
 <d:response><d:href>/%5b006%5d%20Documenti/Note/HelixNotes/</d:href>...</d:response>
 <d:response><d:href>/%5b006%5d%20Documenti/Note/HelixNotes/.helixnotes/</d:href>...</d:response>
 <d:response><d:href>/%5b006%5d%20Documenti/Note/HelixNotes/Articoli/</d:href>...</d:response>
 <d:response><d:href>/%5b006%5d%20Documenti/Note/HelixNotes/Work/</d:href>...</d:response>
 <d:response><d:href>/%5b006%5d%20Documenti/Note/HelixNotes/Tech/</d:href>...</d:response>
 <d:response><d:href>/%5b006%5d%20Documenti/Note/HelixNotes/Vario/</d:href>...</d:response>
 <d:response><d:href>/%5b006%5d%20Documenti/Note/HelixNotes/Viaggi/</d:href>...</d:response>
 <d:response><d:href>/%5b006%5d%20Documenti/Note/HelixNotes/scripts/</d:href>...</d:response>
</d:multistatus>

One thing I noticed: kDrive always returns <d:href> values with lowercase URL-encoding (%5b, %5d) regardless of what case you send in the request. Might be worth keeping in mind for the path comparison logic.

Here are the two outputs, one for each path. **Path 1 — simple path (`Docs/Notes/HelixNotes`), the one I had configured in HelixNotes:** Command: ``` curl -v -u "MAIL:PASS" -X PROPFIND -H "Depth: 1" "https://{MY_ID}.connect.kdrive.infomaniak.com/Docs/Notes/HelixNotes/" | head -c 4000 ``` Output: ```xml <?xml version="1.0"?> <d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns"> <d:response><d:href>/Docs/Notes/HelixNotes/</d:href><d:propstat><d:prop><d:getlastmodified>2026年6月12日 11:18:29 GMT</d:getlastmodified><d:getcontentlength>13238911</d:getcontentlength><d:resourcetype><d:collection/></d:resourcetype><d:quota-used-bytes>13238911</d:quota-used-bytes><d:quota-available-bytes>2664670232052</d:quota-available-bytes><d:getetag>&quot;a87ff679a2f3e71d9181a67b7542122c&quot;</d:getetag></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response> <d:response><d:href>/Docs/Notes/HelixNotes/.helixnotes/</d:href>...</d:response> <d:response><d:href>/Docs/Notes/HelixNotes/Articoli/</d:href>...</d:response> <d:response><d:href>/Docs/Notes/HelixNotes/Work/</d:href>...</d:response> <d:response><d:href>/Docs/Notes/HelixNotes/Tech/</d:href>...</d:response> <d:response><d:href>/Docs/Notes/HelixNotes/Vario/</d:href>...</d:response> <d:response><d:href>/Docs/Notes/HelixNotes/Viaggi/</d:href>...</d:response> <d:response><d:href>/Docs/Notes/HelixNotes/scripts/</d:href>...</d:response> </d:multistatus> ``` **Path 2 — a nested path with square brackets and spaces in the folder name (`[006] Documenti/Note/HelixNotes`), URL-encoded as `%5B006%5D%20Documenti/Note/HelixNotes`:** Command: ``` curl -s -u "MAIL:PASS" -X PROPFIND -H "Depth: 1" "https://{MY_ID}.connect.kdrive.infomaniak.com/%5B006%5D%20Documenti/Note/HelixNotes/" | head -c 4000 ``` Output: ```xml <?xml version="1.0"?> <d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns"> <d:response><d:href>/%5b006%5d%20Documenti/Note/HelixNotes/</d:href>...</d:response> <d:response><d:href>/%5b006%5d%20Documenti/Note/HelixNotes/.helixnotes/</d:href>...</d:response> <d:response><d:href>/%5b006%5d%20Documenti/Note/HelixNotes/Articoli/</d:href>...</d:response> <d:response><d:href>/%5b006%5d%20Documenti/Note/HelixNotes/Work/</d:href>...</d:response> <d:response><d:href>/%5b006%5d%20Documenti/Note/HelixNotes/Tech/</d:href>...</d:response> <d:response><d:href>/%5b006%5d%20Documenti/Note/HelixNotes/Vario/</d:href>...</d:response> <d:response><d:href>/%5b006%5d%20Documenti/Note/HelixNotes/Viaggi/</d:href>...</d:response> <d:response><d:href>/%5b006%5d%20Documenti/Note/HelixNotes/scripts/</d:href>...</d:response> </d:multistatus> ``` One thing I noticed: kDrive always returns `<d:href>` values with lowercase URL-encoding (`%5b`, `%5d`) regardless of what case you send in the request. Might be worth keeping in mind for the path comparison logic.

The issue was path encoding. kDrive returns hrefs with lowercase percent-encoding (%5b/%5d for the [ ] in your [006] Documenti folder), while HelixNotes was generating the base path with uppercase (%5B/%5D). The strings didn't match, so after the first sync the app thought the server had no files and deleted the local copies.
Two fixes for the next release: paths are now compared in an encoding-agnostic way, and the app will stop with an error rather than delete local files if it can't read the remote listing. Both your plain path and [006] Documenti path are tested and mapping correctly now.

The issue was path encoding. kDrive returns hrefs with lowercase percent-encoding (%5b/%5d for the [ ] in your [006] Documenti folder), while HelixNotes was generating the base path with uppercase (%5B/%5D). The strings didn't match, so after the first sync the app thought the server had no files and deleted the local copies. Two fixes for the next release: paths are now compared in an encoding-agnostic way, and the app will stop with an error rather than delete local files if it can't read the remote listing. Both your plain path and [006] Documenti path are tested and mapping correctly now.

I have actually encountered a similar problem. For testing using a self hosted webDAV server (Sync-in) I tried to sync Desktop and Android with a copy of my HelixNotes data. Connecting via webDAV was no problem. I then started the sync - all files were uploaded to the server. Once completed I could see all the files in the attachment folder disappear! The notes themselves actually stayed in place, it was all the attachments that were deleted.

What docker hosted webDAV server would you recommend using?

What are the supported Authentication protocols? vaggeliskls/webdav-server and bytemark/webdav servers are not working with HelixNotes. Trying to log in results in an error. They both let me login fine in a browser.

I have actually encountered a similar problem. For testing using a self hosted webDAV server (Sync-in) I tried to sync Desktop and Android with a copy of my HelixNotes data. Connecting via webDAV was no problem. I then started the sync - all files were uploaded to the server. Once completed I could see all the files in the attachment folder disappear! The notes themselves actually stayed in place, it was all the attachments that were deleted. What docker hosted webDAV server would you recommend using? What are the supported Authentication protocols? vaggeliskls/webdav-server and bytemark/webdav servers are not working with HelixNotes. Trying to log in results in an error. They both let me login fine in a browser.

@ArkHost wrote in #102 (comment):

The issue was path encoding. kDrive returns hrefs with lowercase percent-encoding (%5b/%5d for the [ ] in your [006] Documenti folder), while HelixNotes was generating the base path with uppercase (%5B/%5D). The strings didn't match, so after the first sync the app thought the server had no files and deleted the local copies. Two fixes for the next release: paths are now compared in an encoding-agnostic way, and the app will stop with an error rather than delete local files if it can't read the remote listing. Both your plain path and [006] Documenti path are tested and mapping correctly now.

Thanks a lot, i'll test it in the new release.

Best regards

@ArkHost wrote in https://codeberg.org/ArkHost/HelixNotes/issues/102#issuecomment-17346902: > The issue was path encoding. kDrive returns hrefs with lowercase percent-encoding (%5b/%5d for the [ ] in your [006] Documenti folder), while HelixNotes was generating the base path with uppercase (%5B/%5D). The strings didn't match, so after the first sync the app thought the server had no files and deleted the local copies. Two fixes for the next release: paths are now compared in an encoding-agnostic way, and the app will stop with an error rather than delete local files if it can't read the remote listing. Both your plain path and [006] Documenti path are tested and mapping correctly now. Thanks a lot, i'll test it in the new release. Best regards

This should be fixed in the newest version. Closing this issue

This should be fixed in the newest version. Closing this issue
Sign in to join this conversation.
No Branch/Tag specified
main
fix/vault-indication
v1.3.3
v1.3.2
v1.3.1
v1.3.0
v1.2.9
v1.2.8
v1.2.7
v1.2.6
v1.2.5
v1.2.4
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.1.9
v1.1.8
v1.1.7
v1.1.6
v1.1.5
v1.1.4
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.9
v1.0.8
v1.0.7
v1.0.6
v1.0.5
v1.0.4
v1.0.3
v1.0.2
v1.0.1
v1.0.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ArkHost/HelixNotes#102
Reference in a new issue
ArkHost/HelixNotes
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?