martinstoeckli / SilentNotes

SilentNotes is a simple note taking app which respects your privacy.

Home Page:https://www.martinstoeckli.ch/silentnotes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problems with WebDav synchronization

Joackk opened this issue · comments

Describe the bug
I synced with onedirve for the first time, and the sync work of mobile phone and computer was very normal, but after they worked normally for a period of time, the pc side suddenly indicated that the sync could not be synchronized, but the mobile side was still normal. So I tried to build an Intranet webdav service. The phone still works fine, but the pc still has the same error message, and I tried the same error on my other computer
Also I notice that after I click Continue here, webdav doesn't seem to get any requests, but my network is fine. I tried web access and everything worked fine.The problem is only on the pc side. I also tried to uninstall and reinstall it, but the problem still exists
image

Platform (please complete the following information):

  • OS: [Windows]

Additional context
I also tested locally built webdav in other applications, and they all worked

Thank you for reporting, it seems that there are 2 different problems.

1) Synchronization with OneDrive

Since it already worked successfully, one can rule out invalid credentials. So maybe the OAuth2 refresh token expired, in this case SilentNotes shout ask for a new login again though. Could you check if a manual sync (pressing the cloud button) will ask for new credentials? One could also remove the connection from the settings page (when asked to keep the online repository just remove the connection and keep the repository) and force a new authentication by reconnect to the same OneDrive account.

2) Locale WebDav server

When SilentNotes is not able to connect to a WebDav server, whether locale or remote, it is worth to try to connect with the Windows explorer (not Internet Exporer). If a connection with the explorer is possible, SilentNotees should be able to connect with the exact same url/credentials. If the server is locale and only visible in the LAN, it is save to use it without SSL (http:// instead of https://), the repository will be encrypted anyway and a self signed certificate would need additional steps to be recognized on all connected devices.

@martinstoeckli
Thank you for your reply. These are indeed two issues

Problem 1: After testing, I found that this issue seems to be due to my use of a proxy. After I shut down the proxy software, it resumed normal operation

Question 2: However, the above issue still exists locally even without using a proxy. Are you referring to using Resource Manager to map network drives? I can map the network drive normally, but I still cannot use it properly
image

The webdav I built using hacdias/webdav

I meant the Windows file explorer, you can find it by typing "explorer" into the start menu, but from your screenshot I think you already found the correct one. There has to be a ⋯ menu entry like "Add network address" (not sure how it is written in english), there you can add the WebDav URL. If the explorer can connect to this WebDav directory, SilentNotes should be able too.

A valid WebDav URL starts with either "https://" or "http://", as in your first screenshot, because WebDav uses the http protocoll. Your second screenshot shows a network path UNC though, so the explorer would not access this directory via WebDav, rather see it as a shared network directory.

As per your reminder, I have searched again for how to set it up. I think this should be what you are referring to?
image

It's hard to tell for sure, but it could be right yes. Did it ask for a password?

If this is correct, then perhaps the problem is not on webdav, and my Wind notes still have the same issue

It's hard to tell for sure, but it could be right yes. Did it ask for a password?

He asked me to enter my account and password

To sum it up:

  • On Windows the Explorer can connect to this directory, and has the privileges to copy files to it.
  • The Android SilentNotes installation is able to connect to this WebDav URL.

I'm a bit at a loss, there was an earlier version which didn't request enough privileges to access locale WebDav directories, but I assume that you installed a newer one like 7.3.*. Without being able to debug this, I don't see how I could solve this problem. Maybe the server has a unique response format, but then it wouldn't work on Android neither and it would show up in the protocol you seem to have access to.

@martinstoeckli
This issue is quite strange, I only encountered this problem with the Windows version of SilentNotes, while the mobile version works fine. At the same time, I have tested other software that supports WebDAV, and they all work normally. I'm not quite sure where the problem lies. I installed it from the Microsoft Store the day before yesterday, so I believe it should be the latest version.

@martinstoeckli
Additionally, there's another peculiar phenomenon. When SilentNotes uses my locally built WebDAV, there are no request records in my WebDAV log. However, there are request records when I use a file explorer, browser, or other software. Only when using SilentNotes, there is no change. I am wondering if perhaps it does not send any records? However, it connects to OneDrive normally.

It seems that somehow SilentNotes doesn't have privileges to access this location. This will change in version 8.0 anyaway, because it will no longer be a sandboxed UWP app, rather it will be a new Maui/Blazor/Wasm application. A lot of restrictions will fall away, which is not only an improvement in my opinion, but it's the new way a Windows app is meant to work.

Currently I'm struggling with the deployment of the test version to the store, but once resolved I hope I can release the new version soon.

Thank you for your answer. Will a separate installation package be released? I originally wanted to grab his request to see if she was working properly, but the location of the Microsoft Store installation seems peculiar and I can't find the location he found

You can find the downloaded installer on SilentNotes homepage: https://www.martinstoeckli.ch/silentnotes , see the box "sideloading".

Thank you, I have found him. I tested other software that supports webdav backup on my computer again today, and they are all working properly. I think we can rule out the issue with webdav