obsidian-livesync icon indicating copy to clipboard operation
obsidian-livesync copied to clipboard

Conflict Resolution: Obsidian Plugin - Novel Word Count

Open Aetherinox opened this issue 1 year ago β€’ 3 comments

Issue

Conflict resolution (beta) continues to ask about how to proceed with a potential issue, especially with the obsidian plugin Novel Word Count.

The problem with this particular plugin (Novel Word Count), is that it constantly writes to a json file with each character you type. I've debated on getting rid of it, but the statistics are nice.

Because the novel word count plugin constantly writes to the json file, I get spammed with conflict resolution screens between each copy of Obsidian.


Expected behaviour

  • Livesync should automatically just accept the most recent revision as the accepted copy to sync between machines.

Actually happened

  • Constantly asked about how to handle the issue.

Reproducing procedure

  1. Install https://github.com/isaaclyman/novel-word-count-obsidian
  2. Install Livesync
  3. Create a primary copy of Obsidian, copy the URL for LiveSync and add a secondary machine
  4. Start editing multiple files

Report from the LiveSync

For more information, please refer to Making the report.

Report from hatch
---- Obsidian info ----
Navigator: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) obsidian/1.5.3 Chrome/114.0.5735.289 Electron/25.8.1 Safari/537.36
FileSystem: insensitive
---- remote config ----
cluster:
  n: "1"
cors:
  credentials: "true"
  headers: accept, authorization, content-type, origin, referer, if-match
  methods: GET, PUT, POST, HEAD, DELETE, OPTIONS
  origins: "*"
chttpd:
  bind_address: 0.0.0.0
  enable_cors: "true"
  max_http_request_size: "4294967296"
  port: "5984"
admins: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷
vendor:
  name: The Apache Software Foundation
feature_flags:
  partitioned||*: "true"
chttpd_auth:
  hash_algorithms: sha256, sha
  secret: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷
indexers:
  couch_mrview: "true"
prometheus:
  additional_port: "false"
  bind_address: 127.0.0.1
  port: "17986"
httpd:
  bind_address: 127.0.0.1
  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
  uuid: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷
  view_index_dir: ./data

---- Plug-in config ---
version:0.23.22
remoteType: ""
useCustomRequestHandler: false
couchDB_URI: self-hosted(HTTPS)
couchDB_USER: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷
couchDB_PASSWORD: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷
couchDB_DBNAME: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷
liveSync: true
syncOnSave: false
syncOnStart: false
savingDelay: 200
lessInformationInLog: false
gcDelay: 0
versionUpFlash: ""
minimumChunkSize: 20
longLineThreshold: 250
showVerboseLog: false
suspendFileWatching: false
trashInsteadDelete: true
periodicReplication: false
periodicReplicationInterval: 60
syncOnFileOpen: false
encrypt: true
passphrase: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷
usePathObfuscation: false
doNotDeleteFolder: false
resolveConflictsByNewerFile: true
batchSave: false
batchSaveMinimumDelay: 5
batchSaveMaximumDelay: 60
deviceAndVaultName: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷
usePluginSettings: false
showOwnPlugins: false
showStatusOnEditor: true
showStatusOnStatusbar: true
showOnlyIconsOnEditor: false
usePluginSync: false
autoSweepPlugins: false
autoSweepPluginsPeriodic: false
notifyPluginOrSettingUpdated: false
checkIntegrityOnSave: false
batch_size: 25
batches_limit: 25
useHistory: true
disableRequestURI: true
skipOlderFilesOnSync: true
checkConflictOnlyOnOpen: false
showMergeDialogOnlyOnActive: false
syncInternalFiles: true
syncInternalFilesBeforeReplication: false
syncInternalFilesIgnorePatterns: \/node_modules\/, \/\.git\/, \/obsidian-livesync\/
syncInternalFilesInterval: 60
additionalSuffixOfDatabaseName: 99056d13ac1ed3a0
ignoreVersionCheck: false
lastReadUpdates: 23
deleteMetadataOfDeletedFiles: true
syncIgnoreRegEx: ""
syncOnlyRegEx: ""
customChunkSize: 50
readChunksOnline: true
watchInternalFileChanges: true
automaticallyDeleteMetadataOfDeletedFiles: 7
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: 30
minimumIntervalOfReadChunksOnline: 25
hashAlg: xxhash64
suspendParseReplicationResult: false
doNotSuspendOnFetching: false
useIgnoreFiles: false
ignoreFiles: .gitignore
syncOnEditorSave: false
pluginSyncExtendedSetting: {}
syncMaxSizeInMB: 50
settingSyncFile: ""
writeCredentialsForSettingSync: false
notifyAllSettingSyncFile: false
isConfigured: true
settingVersion: 10
enableCompression: false
accessKey: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷
bucket: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷(0 letters)
endpoint: Not configured or AWS
region: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷(4 letters)
secretKey: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷
useEden: false
maxChunksInEden: 10
maxTotalLengthInEden: 1024
maxAgeInEden: 10
disableCheckingConfigMismatch: false
displayLanguage: ""
enableChunkSplitterV2: false
disableWorkerForGeneratingChunks: false
processSmallFilesInUIThread: false
notifyThresholdOfRemoteStorageSize: 800
usePluginSyncV2: false
usePluginEtc: false
handleFilenameCaseSensitive: false
doNotUseFixedRevisionForChunks: false
showLongerLogInsideEditor: false
sendChunksBulk: true
sendChunksBulkMaxSize: 40
configPassphrase: ""
preset: ""
syncMode: LIVESYNC
dummy: 0

Obsidian debug info

Debug info
->Hidden file: 12800/13089
plugin:obsidian-livesync:50000, 1:25:23 PM->Hidden file: 12900/13089
plugin:obsidian-livesync:50000, 1:25:23 PM->Hidden file: 13000/13089
plugin:obsidian-livesync:50000, 1:25:23 PM->Hidden file .obsidian/plugins/novel-word-count/data.json has conflicted revisions, to keep in safe, writing to storage has been prevented
plugin:obsidian-livesync:50000, 1:25:26 PM->Hidden files scanned: 0 files had been modified

plugin:obsidian-livesync:50000, 1:25:54 PM->Replication closed
plugin:obsidian-livesync:50000, 1:26:27 PM->Hidden file conflicted:i:.obsidian/plugins/novel-word-count/data.json
plugin:obsidian-livesync:50000, 1:26:27 PM->Could not merge object
plugin:obsidian-livesync:49998 TypeError: Cannot convert undefined or null to object
    at Function.entries (<anonymous>)
    at generatePatchObj (plugin:obsidian-livesync:25285:21)
    at generatePatchObj (plugin:obsidian-livesync:25294:18)
    at generatePatchObj (plugin:obsidian-livesync:25294:18)
    at generatePatchObj (plugin:obsidian-livesync:25294:18)
    at generatePatchObj (plugin:obsidian-livesync:25294:18)
    at ObsidianLiveSyncPlugin.mergeObject (plugin:obsidian-livesync:50585:15)
    at async HiddenFileSync.conflictResolutionProcessor.QueueProcessor.suspended [as _processor] (plugin:obsidian-livesync:30835:160)
    at async QueueProcessor._runProcessor (plugin:obsidian-livesync:6947:16)
    at async batchTask (plugin:obsidian-livesync:7007:15)
plugin:obsidian-livesync:50000, 1:26:27 PM->TypeError:Cannot convert undefined or null to object
plugin:obsidian-livesync:50000, 1:26:27 PM->Object merge is not applicable.
plugin:obsidian-livesync:50000, 1:26:28 PM->Opening data-merging dialog
plugin:obsidian-livesync:50000, 1:27:10 PM->Hidden file conflicted:i:.obsidian/plugins/novel-word-count/data.json
plugin:obsidian-livesync:50000, 1:27:10 PM->Could not merge object

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
<!-- paste here -->

Screenshots

If applicable, please add screenshots to help explain your problem.

1EXbwfjDuM

Aetherinox avatar Sep 12 '24 01:09 Aetherinox

Thank you for opening the issue! This might be a bug in the merging algorithm. I will try to reproduce it later!

vrtmrz avatar Sep 15 '24 17:09 vrtmrz

Intermediate report! This has been reproduced! And, fixed to be auto-mergeable.

The next version will be released with another improvement in a few days! Thank you for your patience!

vrtmrz avatar Sep 20 '24 19:09 vrtmrz

@Aetherinox

Sorry for being late! As you know, this issue has been fixed at v0.23.23. Would you mind if I ask you to check the behaviour, please?

vrtmrz avatar Sep 30 '24 01:09 vrtmrz