vrtmrz / obsidian-livesync

MIT License
3.96k stars 134 forks source link

How to resolve "Some files have been left conflicted!”? #270

Open hidehide55 opened 10 months ago

hidehide55 commented 10 months ago

Thank you for providing a great plugin.

Whenever I start Obsidian, I get the following message:

Some files have been left conflicted! Please resolve them by "Pick a file to resolve conflict". The list is written in the log.

When I "Pick a file to resolve conflict", I get the following note, but nothing appears when I click on it. 無題のファイル.md

This is the log.

2023/8/23 10:19:52->Some files have been left conflicted! Please resolve them by "Pick a file to resolve conflict". The list is written in the log.
2023/8/23 10:19:52->Conflicted: 無題のファイル.md

This is the Developer Tools Console.

plugin:obsidian-livesync:23103 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '1')
    at splitDiffPiece (plugin:obsidian-livesync:23103:35)
    at ObsidianLiveSyncPlugin.mergeSensibly (plugin:obsidian-livesync:23126:38)
    at async ObsidianLiveSyncPlugin.getConflictedStatus (plugin:obsidian-livesync:23247:21)
    at async eval (plugin:obsidian-livesync:23385:17)
    at async runWithLock (plugin:obsidian-livesync:2847:12)
    at async ObsidianLiveSyncPlugin.showIfConflicted (plugin:obsidian-livesync:23384:5)
    at async ObsidianLiveSyncPlugin.resolveConflicted (plugin:obsidian-livesync:21974:175)
    at async ObsidianLiveSyncPlugin.pickFileForResolve (plugin:obsidian-livesync:21968:7)
splitDiffPiece  @   plugin:obsidian-livesync:23103
mergeSensibly   @   plugin:obsidian-livesync:23126
await in mergeSensibly (async)      
callback    @   plugin:obsidian-livesync:22196
P_  @   app.js:1
t.onChooseItem  @   app.js:1
t.onChooseSuggestion    @   app.js:1
t.selectSuggestion  @   app.js:1
e.useSelectedItem   @   app.js:1
(anonymous) @   app.js:1
e.handleKey @   app.js:1
e.onKeyEvent    @   app.js:1

The next time Obsidian starts, the same behavior will occur.

I get the same message at startup on other terminals I am syncing with. The behavior is also the same when I run "Pick a file to resolve conflict" on that terminal. And there is no "無題のファイル" on any terminal.

How can I resolve this?


Below is the same question written in Japanese.


Some files have been left conflicted! を解消したい

素晴らしい plugin を提供していただき、ありがとうございます。

Obsidian 起動時に、毎回下記が表示されます。 Some files have been left conflicted! Please resolve them by "Pick a file to resolve conflict". The list is written in the log.

指示にしたがい、"Pick a file to resolve conflict" を実行すると、下記のノートが表示されますが、クリックしても何も表示されません。 無題のファイル.md

その時のログです。 略

Developer Tools の Console 表示です。 略

次回の Obsidian 起動時にも同様な動きになります。

同期している他の端末でも、起動時に同様にメッセージが表示されます。"Pick a file to resolve conflict" を実行した場合の挙動も同じです。 そして、どの端末にも「無題のファイル」は存在しません。

どうすれば、解消できるでしょうか。

vrtmrz commented 10 months ago

Thank you for opening this issue! I have heard about this issue, but could not be reproduced in a while. However, now, your information brought the light!

Conflict checks could fail if notes were deleted or did not contain any lines.

Fixed at v0.19.18. Could you please check the behaviour?

こんにちは!イシューを作っていただいてありがとうございます。 これ、聞いてはいたのですが、どうも再現できずにいました。

今回頂いた情報でバッチリわかりまして、削除された文書(もしくは、空行の文書)が競合した場合、これが起こってしまっていました。

v0.19.18で修正しましたので、ご確認いただけますか?

hidehide55 commented 10 months ago

Thank you for your quick response. The problem has been resolved by updating the plugin.

Start -> Error message -> Update plugin -> Exit Start -> Error message -> "Pick a file to resolve conflict" -> 無題のファイル.md click -> nothing shown -> exit Start -> no error message

I updated the plugin for the other terminals as well and no more problems.

Thank you very much.


早速の対応ありがとうございます。 plugin のアップデートにより、問題は解消されました。

起動 -> エラー表示 -> plugin アップデート -> 終了 起動 -> エラー表示 -> "Pick a file to resolve conflict" -> 無題のファイル.md クリック -> 何も表示されない -> 終了 起動 -> エラー表示なし

他の端末も plugin をアップデートし、問題無しとなりました。

ありがとうございました。