Closed martin-arg closed 10 months ago
I'm very sorry. Have you turned on the synchronization profile function? Generally, synchronization conflicts occur because there was a problem with the last synchronization. Did you see any errors during synchronization?
I already disable profile synchronization and I don't see anything strange. What can I do to help?
I would like to ask if the synchronization configuration file was enabled when the error occurred before. I need to determine whether the problem is caused by the synchronization configuration file.
No It was't. I disable the sync of the config file.
Also, even though I only have this plug-in active in one client, I'm still getting the message "Other clients are synchronising".
Is your server up to date? (1.2.0) You can open http://your server Scroll to the bottom and the version number will be displayed.
If you are sure it is the latest version, can you do a test for me?
user_store/{user}/sync_lock
file on the server, if it existsIs your server up to date? (1.2.0) You can open http://your server Scroll to the bottom and the version number will be displayed.
yes
If you are sure it is the latest version, can you do a test for me?
1. Delete the `user_store/{user}/sync_lock` file on the server, if it exists 2. Resynchronize to see if errors occur
It exists, I delete it and try to sync again. I enable the notification in Obsidian and I never get the sync complete notification. Also, the file is still there.
~~Do you mean that after deleting the lock file, the file was regenerated after resynchronization was completed? Please delete the lock file, resynchronize, and turn on the synchronization notification to see if there is a prompt that the synchronization is completed.~~ If there is no prompt that synchronization is completed, an error occurred during the synchronization process.
Are you using a reverse proxy program such as nginx? They may limit the maximum file size, causing synchronization to fail.
if there is not:
You can use docker logs obsidian-sync-share-server
to check the logs to see if there are any errors. If it is convenient, please send me the error logs to analyze the reasons.
Are you using a reverse proxy program such as nginx? They may limit the maximum file size, causing synchronization to fail.
Yes, I am, is there a way to check this?
For test purposes, I deleted all files over 4mb, there were few and old. But no changes.
Please delete the lock file, open the development window of obsidian, and then resynchronize to see if there are any errors.
If it is convenient, please send a screenshot to me.
If there is something you don't understand, please feel free to tell me, I have time to solve the problem now
As far as I know, the default maximum upload file size of nginx is 1mb
You can try changing it to:
client_max_body_size 1000m;
I have roughly located the place where the problem occurred, but I found no logical errors after checking the code, so I added some log printing. Can you help me test it again? Thank you very much.
{vault_dir}/.obsidian/plugins/notes-sync-share/main.js
I'm very sorry for affecting your normal use.
I'm very sorry for affecting your normal use.
Don't worry, you are working for free for a program that is free. These things happened.
It doesn't seem to be taking effect. I seem to have forgotten to mention that you need to restart obsidian after replacing the file for it to take effect.
Please restart obsidian and repeat the above operations.
I'm very sorry for affecting your normal use.
Don't worry, you are working for free for a program that is free. These things happened.
Thanks for understanding, I appreciate your help.
Something strange happened, I copied the file and restarted Obsidian and synced, lots of stuff appeared, I don't know why, but I deleted and synced again and took the screenshot. The strange thing is that the main file reverts back to the original as the config file sync where enabled and it's not. I attach the picture so as not to look crazy.
And so on for a few more files.
This last sync the sync file was erased.
Also the file which is complaining about is not capitalised is permissions.md
Only the red text is printed by my plug-in, the rest are logs from other plug-ins.
Judging from the printed information, I checked my code and there was no problem. Is there a bug in Obsidian's API?
After the replacement, the synchronization was successful because the plug-in continued to execute when it encountered an error, instead of interrupting, so it was able to work normally.
Also the file which is complaining about is not capitalised is permissions.md
After your reminder, I seem to understand the cause of the problem. The logic of the plug-in is to create the file when the file does not exist, but the operating system's files are not case-sensitive, resulting in a file that does not exist when checked, but cannot be created.
Is this the case?
There is a Permissions.md file on the server There is a file called permissions.md on your local machine
Yes, for this reason I'm trying to normalise the file name, to lower case and use dot insted of spaces.
Now that the cause of the problem has been determined, I need time to see how to solve this problem perfectly. After solving it, I will notify you of the update. Now you can use the plug-in normally, because now the same error will not interrupt synchronization. .
Thank you, if there is any test you would like me to do, please let me know.
Thank you, if there is any test you would like me to do, please let me know.
ok thanks
One more question, is there anyway to push changes form the client to the server? I make some changes in the client, but when I sync, the server deletes this change. I restore the files on the client and again the server deletes these changes.
The plug-in uses the modification time to determine the latest data of the file. The new one will overwrite the old one. The situation you are talking about should be that the time on the server is relatively new. Please check the modification times of client and server files.
The folders have been deleted from the server for testing purposes.
Sorry, let me explain, I deleted the folder from the client and they were deleted from the server. Now I restore the folder, but when I synchronise they are deleted again.
Yes, if it is an empty folder and has been deleted before, it will always be deleted. You have 2 ways to solve it.
user_store/{user}/server_delete_history
file on the serverOk, this is asking too much, but in the future can you add the option to push or pull a sync manually?
this is asking too much
The two methods provided above can be solved by choosing one. Generally, you only need to ensure that there are files in the folder.
but in the future can you add the option to push or pull a sync manually?
Isn’t there a manual synchronization function? Or did I misunderstand the meaning?
As for why deleted empty folders are always deleted, you can look at the synchronization algorithm. synchronization algorithm
The folder was empty, I restore the folder and all the file inside, but the sync deleted again. Yes there is a manual sync button. The push and pull option would to force to push changes even when the algorithm says otherwise, the same with the pull, I delete some files locally, and I want to restore from the server, for example.
Let me sort out the questions:
After deleting the folder and the files in the folder locally, restore the folder and the internal files from the backup (no modifications to the files), and then synchronize the files. The folder just restored is deleted again.
do you mean this?
in the case of
Please temporarily delete the files on the server first: user_store/{user}/server_delete_history
Let me see if there is a good way to automatically solve this problem
Let me sort out the questions:
After deleting the folder and the files in the folder locally, restore the folder and the internal files from the backup (no modifications to the files), and then synchronize the files. The folder just restored is deleted again.
do you mean this?
in the case of
Please temporarily delete the files on the server first:
user_store/{user}/server_delete_history
Let me see if there is a good way to automatically solve this problem
This problem has been solved and will take effect in the next version
The solution is to modify the last modification time of the file to the current time when restoring the file, which can solve the problem.
The reason for this problem is that the modification time of the file does not change when the file is restored, and the server has remembered that you have deleted the file before, so it will ask the client to delete it. (Server deletion time > file last modification time)
New version has been released
After upgrading I receive this, over and over again There are more, but I can capture them before they vanish. Also this
Now if you find that the same file name (case-insensitive) appears on the server and the local file, this error will occur, and you need to change it to the same name as the server.
Because the server is case-sensitive, the easiest way is to delete these local files with the same name and then resynchronize them. The plug-in will automatically download these files.
I tried to automatically solve this problem, but I found that this cannot be solved perfectly because different operating systems are different: linux android case sensitive windows macos case-insensitive
As a result, there is no way to automatically solve it. For example, if there is a and A files on Linux, unexpected problems will occur if the files are synchronized to Windows.
If you have good ideas and suggestions, we can discuss them
Because the server is case-sensitive, the easiest way is to delete these local files with the same name and then resynchronize them. The plug-in will automatically download these files.
I try this and I didn't work. The pluginn deletes the files in the server.
Since the last server upgrade (maybe plugin too) I've been having serious problems syncing the vault. Firstly, I keep getting the message "Other clients are in process of synchronization" when I'm sure there aren't any. Secondly, since last Friday, I have lost some files from a folder, and I have copied them back from a backup, and when the plugin syncs they are deleted again. I have already restarted the server. I'm not really sure if there's anything else I can try.