vrtmrz / obsidian-livesync

MIT License
5.13k stars 167 forks source link

Sync issue for iOS device #526

Open Oneel77 opened 3 weeks ago

Oneel77 commented 3 weeks ago

Actually happened

Reproducing procedure

  1. Create a new note on iOS
  2. Synchronising has begun.
  3. Finally get the following message on my second device Windows 11 30/10/2024 20:40:12->Some chunks are not exists both on remote and local database. 30/10/2024 20:40:12->Exception raised while retrieving chunks 30/10/2024 20:40:12->Chunks of Test.md (f:7773cd) are not valid. (p1) 30/10/2024 20:40:12->Something went wrong while gathering content of Test.md (f:7773cd, 2-8be9e488) 30/10/2024 20:40:12->Replication completed

Plug-in log for iOS

---- Obsidian info ---- Navigator: Mozilla/5.0 (iPhone; CPU iPhone OS 18_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 FileSystem: sensitive ---- 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 max_http_request_size: "4294967296" port: "5984" require_valid_user: "true" admins: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 vendor: name: The Apache Software Foundation nouveau: url: http://127.0.0.1:5987/ 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: 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 max_document_size: "50000000" single_node: "true" uuid: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 view_index_dir: ./data ---- Plug-in config --- version:0.24.0 remoteType: "" useCustomRequestHandler: false couchDB_URI: self-hosted(HTTPS) couchDB_USER: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 couchDB_PASSWORD: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 couchDB_DBNAME: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 liveSync: false syncOnSave: false syncOnStart: true savingDelay: 200 lessInformationInLog: false gcDelay: 0 versionUpFlash: "" minimumChunkSize: 20 longLineThreshold: 250 showVerboseLog: false suspendFileWatching: false trashInsteadDelete: true periodicReplication: true periodicReplicationInterval: 60 syncOnFileOpen: true encrypt: true passphrase: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 usePathObfuscation: true doNotDeleteFolder: false resolveConflictsByNewerFile: false batchSave: true 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: 50 batches_limit: 50 useHistory: true disableRequestURI: true skipOlderFilesOnSync: true checkConflictOnlyOnOpen: false showMergeDialogOnlyOnActive: false syncInternalFiles: false syncInternalFilesBeforeReplication: false syncInternalFilesIgnorePatterns: \/node_modules\/, \/\.git\/, \/obsidian-livesync\/ syncInternalFilesInterval: 60 additionalSuffixOfDatabaseName: documents/oneel_obsidian_vault ignoreVersionCheck: false lastReadUpdates: 0 deleteMetadataOfDeletedFiles: false syncIgnoreRegEx: "" syncOnlyRegEx: "" customChunkSize: 50 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: 100 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: -1 usePluginSyncV2: false usePluginEtc: false showLongerLogInsideEditor: false sendChunksBulk: false sendChunksBulkMaxSize: 1 useSegmenter: false useAdvancedMode: false usePowerUserMode: false useEdgeCaseMode: false enableDebugTools: false configPassphrase: "" preset: "" syncMode: PERIODIC dummy: 0
LenKIM commented 3 weeks ago

same as problem.

pajikos commented 3 weeks ago

the same problem for me

birlorg commented 2 weeks ago

I'm very new, but this is what made it work for me:

From your desktop, make sure you do the rebuild step, and verify steps, and run the checks and then push all the fix buttons. Once the desktop seems happy and fabulous after restarts, then go back to iOS and delete the config(reset), then set it up again. Use the SETUP URI function to make life easier.

It takes a little bit of fiddling, but once it works, it seems stable(so far).

EfrainCabral commented 2 weeks ago

Same problem on iOS. The option to use a copied URI brings you to the file menu, and never let you to paste the uri. After setting up (minio) manually and check the connection is successful but it never Fetch from remote nor rebuild from the device. The buttons to fetch and rebuild does not works. I tried to configure first on the laptop and it works ok. But on the iPhone it is not working. Just to discard a problem of access to the bucket, the option to lock on remote is able to add the flag file on the bucket ( this is just to confirm that the plugin can read and write on the bucket) .

vrtmrz commented 2 weeks ago

Thank you for opening the issue! If you are using CouchDB and migrated from the old versions, some chunks could be missing due to the bug. Please run Resend chunks from every device, or Rebuild everything from the most reliable device. Sorry for your inconvenience.

@EfrainCabral The problem while using bucket is a possibly caused by the different reason. If you have not configured CORS on the bucket, please try enabling Use custom handler on especially mobile device.

EfrainCabral commented 2 weeks ago

Thanks for your response. In my case Im using Minio. I have done a successful bucket delete from the plugin, then tried a rebuild with no results. It's like the Rebuild button does nothing. The same happens with the Fetch button. The log does not show any activity when trying to rebuild. Another abnormal behavior is the status icons disappears intermittently from the editor when I switch from one page to another one. The curious with the same Minio server it worked before the release. Thanks for your help.

EfrainCabral commented 1 week ago

Hi @vrtmrz I finally got it working. The steps I did were:

  1. Make a backup of the vault and save it aside.
  2. Delete the Obsidian vault on iOS.
  3. Delete the vault on Windows.
  4. From Windows delete all the content of the bucket(Minio) from the plugin.
  5. Create two or three test files from scratch, and do a Rebuild from the plugin on Windows.
  6. Activate the advanced options in Windows and iOS plugin to set the behavior when there are conflicts (keep the newest file).
  7. Deactivate the plugin on iOS. Restart Obsidian and activate the plugin again. Then it asked me to do a Fetch on iOS which I confirmed.
  8. After doing some successful bi-directional tests, I then loaded backedup vault content on Windows (but not on iOS).
  9. Then from iOS i got to replicate the content correctly, fetching all the vault automatically.(not manual fetch)

For now it is working well. Conclusion: something happens when you try to configure on iOS as the first device, something does not work correctly. But if you start it from Windows or another OS it should work fine. On the other hand it is still impossible to copy a setup URI on iOS, the plugin does not open the text box to copy the URI, the setup has to be done manually.

I hope these comments can help anyone who has a similar problem.

birlorg commented 1 week ago

On the other hand it is still impossible to copy a setup URI on iOS, the plugin does not open the text box to copy the URI, the setup has to be done manually.

I can't remember where I got my setup URI, but I would guess I got it from my desktop. I was able to use the URI on iOS without issue though. I long-held to get the copy/paste menu and then pasted the URI out of my password manager.

I'm not using minio. I'm using couchdb. Perhaps that is part of the difference, though I don't know why the setup URI stuff would care as far as copy/paste goes.

quyda88 commented 1 week ago

Resend chunks

HoΖ° to run that command "Resend chunks"? Please, show for me. Thanks!

Oneel77 commented 4 days ago

@vrtmrz Hi, Rebuild everything command does not solved my sync issue with iOS.