vrtmrz / obsidian-livesync

MIT License
3.96k stars 134 forks source link

Can't resolve "Some files have been left conflicted", Files Don't Exist #274

Open jwreford opened 10 months ago

jwreford commented 10 months ago

Abstract

Each device says 'Some files have been left conflicted. Please resolve them by "Pick a file to resolve conflict". The list is written in the log. However files do not exist on any of my 3 devices, and there is no dialog box to resolve the conflict.

Everything was working fine for me until earlier today. I had made lots of changes to my vault on one device, and when I opened another device I choose to 'Do later' the conflict resolution. After this I couldn't get the dialog box back to resolve the conflicts, so I manually corrected each device's vault.

Expected behaviour

These files don't exist, so they shouldn't be conflicted. Also, I should see a dialog box that I can choose an option to resolve the conflict.

Actually happened

There is no dialog box so the message appears each time I start Obsidian on any device.

Reproducing procedure

Open Obsidian, and wait for the notification message to appear. It happens consistently, every time.

Note: If you do not catch the reproducing procedure, please let me know the frequency and signs.

Report materials

If the information is not available, do not hesitate to report it as it is. You can also of course omit it if you think this is indeed unnecessary. If it is necessary, I will ask you.

Report from the LiveSync

For more information, please refer to Making the report.

Report from hatch ``` ----remote config---- cors: credentials: "true" headers: accept, authorization, content-type, origin, referer max_age: "3600" methods: GET,PUT,POST,HEAD,DELETE origins: app://obsidian.md,capacitor://localhost,http://localhost chttpd: bind_address: any enable_cors: "true" max_http_request_size: "4294967296" port: "5984" require_valid_user: "true" admins: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 vendor: name: The Apache Software Foundation feature_flags: partitioned||*: "true" chttpd_auth: authentication_redirect: /_utils/session.html hash_algorithms: sha256, sha require_valid_user: "true" indexers: couch_mrview: "true" prometheus: additional_port: "false" bind_address: 127.0.0.1 port: "17986" httpd: WWW-Authenticate: Basic realm="couchdb" bind_address: 0.0.0.0 enable_cors: "true" port: "5986" smoosh: state_dir: ./data couch_httpd_auth: authentication_db: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 secret: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 authentication_redirect: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 couchdb_engines: couch: couch_bt_engine couchdb: database_dir: ./data max_document_size: "50000000" single_node: "true" uuid: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 view_index_dir: ./data ---- Plug-in config --- couchDB_URI: self-hosted couchDB_USER: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 couchDB_PASSWORD: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 couchDB_DBNAME: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 liveSync: true syncOnSave: false syncOnStart: false savingDelay: 200 lessInformationInLog: false gcDelay: 0 versionUpFlash: "" minimumChunkSize: 20 longLineThreshold: 250 showVerboseLog: true suspendFileWatching: false trashInsteadDelete: true periodicReplication: false periodicReplicationInterval: 60 syncOnFileOpen: false encrypt: true passphrase: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 usePathObfuscation: false doNotDeleteFolder: false resolveConflictsByNewerFile: false batchSave: false deviceAndVaultName: "" usePluginSettings: false showOwnPlugins: false showStatusOnEditor: true usePluginSync: true autoSweepPlugins: true autoSweepPluginsPeriodic: true notifyPluginOrSettingUpdated: false checkIntegrityOnSave: false batch_size: 50 batches_limit: 40 useHistory: true disableRequestURI: true skipOlderFilesOnSync: true checkConflictOnlyOnOpen: false syncInternalFiles: false syncInternalFilesBeforeReplication: false syncInternalFilesIgnorePatterns: \/node_modules\/, \/\.git\/, \/obsidian-livesync\/ syncInternalFilesInterval: 60 additionalSuffixOfDatabaseName: "" ignoreVersionCheck: false lastReadUpdates: 19 deleteMetadataOfDeletedFiles: false syncIgnoreRegEx: "" syncOnlyRegEx: "" customChunkSize: 100 readChunksOnline: true watchInternalFileChanges: true automaticallyDeleteMetadataOfDeletedFiles: 0 disableMarkdownAutoMerge: false writeDocumentsIfConflicted: false useDynamicIterationCount: false syncAfterMerge: false configPassphraseStore: "" encryptedPassphrase: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 encryptedCouchDBConnection: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 permitEmptyPassphrase: false useIndexedDBAdapter: true useTimeouts: false writeLogToTheFile: false doNotPaceReplication: false hashCacheMaxCount: 300 hashCacheMaxAmount: 50 concurrencyOfReadChunksOnline: 100 minimumIntervalOfReadChunksOnline: 333 hashAlg: xxhash64 suspendParseReplicationResult: false doNotSuspendOnFetching: false useIgnoreFiles: false ignoreFiles: .gitignore ```

Plug-in log

We can see the log by tapping the Document box icon. If you noticed something suspicious, please let me know. Note: Please enable Verbose Log. For detail, refer to Logging, please.

Plug-in log ``` 29/08/2023, 21:33:41->All files enumerated 29/08/2023, 21:33:41->Additional safety scan.. 29/08/2023, 21:33:41->Before LiveSync, start OneShot once... 29/08/2023, 21:33:41->OneShot Sync begin... (pullOnly) 29/08/2023, 21:33:41->Some files have been left conflicted! Please resolve them by "Pick a file to resolve conflict". The list is written in the log. 29/08/2023, 21:33:41->Conflicted: 3D Printing/GCode.md 29/08/2023, 21:33:41->Conflicted: 3D Printing/GCode.md.edtz 29/08/2023, 21:33:41->Conflicted: Day Planners/Day Planner-20230827.md 29/08/2023, 21:33:41->Conflicted: Day Planners/Day Planner-20230829.md 29/08/2023, 21:33:41->Conflicted: Untitled.md 29/08/2023, 21:33:41->Conflicted: Untitled.md.edtz 29/08/2023, 21:33:41->Conflicted: Work/Adobe.md 29/08/2023, 21:33:41->Conflicted: Work/Email.md 29/08/2023, 21:33:41->Conflicted: Work/.md 29/08/2023, 21:33:41->Additional safety scan done 29/08/2023, 21:33:41->All files enumerated 29/08/2023, 21:33:42->Replication activated 29/08/2023, 21:33:42->Replication paused 29/08/2023, 21:33:42->Replication completed 29/08/2023, 21:33:42->LiveSync begin... 29/08/2023, 21:33:42->Replication activated 29/08/2023, 21:33:42->Replication paused 29/08/2023, 21:33:42->Replication activated ```

Let me know if there is any other information or logs you need. Thanks so much for creating this plugin!

JamborJan commented 10 months ago

I have the same issue. Over and over again, I get the error for a non-existing file. The file was there before, but I renamed it in the meantime.

Update: this issue https://github.com/vrtmrz/obsidian-livesync/issues/270 suggests, that a newer version of the plugin should fix the problem. At least in my case version 0.19.18 didn't solve the problem.

jwreford commented 10 months ago

I can confirm that I was also seeing the issue on 0.19.18. I ended up blowing away the server, uninstalling the plugin on all my devices, and starting again which resolved it, and since then I haven't seen it so I can't troubleshoot further. But I'm a bit scared to dismiss a conflict resolution dialog the next time one comes up.

In my case, I think the issue may have come from a combination of things including that I renamed the vault on one of my devices.

If you do try to fix it by completely starting over, I needed to remove the plugin on all my devices otherwise the conflict error would come back again.

sysconf16 commented 10 months ago

This is an issue I am also facing, despite being on the latest revision of the plugin.

jwreford commented 10 months ago

I found that there is actually a command pallet option for resolving conflicts. CTRL + P and then search for β€˜Livesync’. A couple of the commands that LiveSync can perform are related to resolving conflicted files. I did that and it resolved all my conflicts. I feel a bit silly for not checking this earlier! I assumed that there was a dialog but I think the notification is advising us to run the conflict command.

Thank you Vrtmrz for this fantastic plug-in!

vrtmrz commented 10 months ago

Sorry for the delay in getting back to you! Yes, there are several commands regarding revisions and conflicts! The half of problem is that there is no documentation, even though there are many useful features...

However, this would be improved. I will add the link to open that menu in the notification.

@sysconf16 Would you mind if I ask you for more details? Does your problems have been resolved in the same way?

jwreford commented 9 months ago

@vrtmrz If you need any help with the documentation I'd be happy to contribute.