vrtmrz / obsidian-livesync

MIT License
3.93k stars 132 forks source link

Conflict resolve window is uncloseable #368

Open gerroon opened 5 months ago

gerroon commented 5 months ago

Hi

The latest update must have broken the conflict resolution window because once opened I can not close the window, like I keep picking files to resolve but it does not seem to be doing anything, it keep showing me the same list and I cant decrease the number of conflicting files in that drop down menu. I tested it on IOS and Windows.

The other problem is that there should not be a conflict at this point because I did "fetch" on these devices. I am not sure why it keeps showing me the conflicting files dropdown.

I am using 0.22

vrtmrz commented 5 months ago

Thank you for opening this issue! In Self-hosted LiveSync, conflict is not only a local problem. Once the note has been conflicted in two or more modifications, both of the notes will be sent to the remote database to prevent unexpected overwriting. The client will not store the transferred notes in the storage while it has conflicts. (And, clients will make another different conflict with each modification). Therefore, fetching again is just retrieving the fact of being conflicted. It is designed behaviour.

And more than two conflicts could be kept at the same time. I think that the issue could have happened to this specification. (If every conflict revision has a different timestamp, it could be so). Unfortunately, we are not able to count the conflicts from the UI. Possibly we have to improve this.

I will address it as one of the improvements in the feature version. However, the easiest way to resolve this now is to rebuild databases. Acutally, we are based on files, so both databases could be ephemeral.

However, it costs a bit of time and traffic, so I regret to ask you this but would you mind if I ask you to rebuild databases after backing your vault up?

gerroon commented 5 months ago

However, it costs a bit of time and traffic, so I regret to ask you this but would you mind if I ask you to rebuild databases after backing your vault up?

Actually I have done that many times, fetch, rebuild, repair etc on the IOS client and on Windows clients, nothing helped. There seems to be a logic with conflicts somewhere there that does not align well.

vrtmrz commented 5 months ago

I am really sorry about that. I strongly hope to fix the problem.

May I ask you to share your log and configuration? The configuration can be dumped from the Make report button on the Hatch pane, in the setting dialogue. Both of Windows and iOS, please. And, the log can be stored in the file by enabling Write logs into the file. It would be helpful if you could share the logs while the repeated resolution dialogue is displayed.

vrtmrz commented 5 months ago

Excuse me for the posting in a row.

While writing the reply to #371, I realised that it might be related to #371. If so, v0.22.3 might improve this.

I hope that the situation goes well. Thank you for your contribution!

vrtmrz commented 5 months ago

I have identified some additional issues related to conflict resolution. In some cases, we had not been able to resolve conflicts completely, as you had initially mentioned. This seems to be a compounded issue. Thank you for your patience with frequent and unreliable versions.

Earlier today, I released version 0.22.4, which fixes these problems. Would you kindly check this version, please?