vrtmrz / obsidian-livesync

MIT License
3.93k stars 132 forks source link

Unable to sync data properly on older versions of iOS such as 14.8. #341

Open xtpcool opened 7 months ago

xtpcool commented 7 months ago

First of all, thank you for your work. As the title suggests, the plugin cannot run on older systems such as iOS 14.8. I have jailbroken my phone and am unable to update the system. Can you help solve this problem?

Abstract

Unable to sync ios with self hosted couchdb, even though sync works for linux and macos.

Expected behaviour

remote database gets installed to iphone

Actually happened

The connection to the database seems to be fine. Connection check results in success. OneShot sync begins, but no files appear to be pulled. "Looking for the point last synchronized point message" gets logged, nothing happens after that. When clicking replication button, message shows that replication is already in progress

Reproducing procedure

Press fetch and replace local db button on ios.

Plug-in log

Plug-in log ``` 2023/ 11/30 上午7:37:01->loading plugin 2023/11/30 上午7:37:01->Self-hosted Live Sync 70. 21.2 0.21.2 2023/11/30 上午7:37:01->waiting for read Y... **2023/11/30 上午7:37:01->CompileError:Web Assembly . Module doesn't parse at byte 9 0: references are not enabled, in funct ion at index 3** 2023/11/30 上午7:37:01->0pening Database 2023/11/30 上午7:37:01->Database is now ready. 2023/11/30 上午7:37:01->Initialize and C hecking database files 2023/11/30 上午7:37:01->Checking deleted files 2023/11/30 上午7:37:01->Updating databas e by new files 2023/11/30 上午7:37:01->UPDATE DATABASE ```

Maybe the problem is here : CompileError:Web Assembly . Module doesn't parse at byte 90:references are not enabled, in function at index 3

Same as #335 ,But I can't upgrade my system due to jailbreaking.

xtpcool commented 7 months ago

1.The application is deployed on QNAP NAS, with Nginx (https) used as a reverse proxy and FRP mapping done through a VPS on the public network.

  1. Here is the verbose version 1701323303_2ZC8vpcc
slimx commented 7 months ago

same error,I think it's hard to get a fix.

xtpcool commented 7 months ago

Sad , I'm considering using Syncthing for synchronization, but the user experience of Syncthing on the iOS platform is not that great.

same error,I think it's hard to get a fix.

vrtmrz commented 7 months ago

Thank you for opening the issue! I understood the situation! Possibly we can use some native function for fallback implementation, If we sacrifice a bit of performance. Fortunately, we have added a configuration for hash algorithm, recently. We can add a native one too.

Would you mind if I ask you to try the next version, please?

vrtmrz commented 7 months ago

I have released v0.21.3; which is able to use fallback hash function! (And also, it automatically used if no hash function available. However, all devices should use same hash function, please set fallback also on other devices. It can be configured on the Hatch pane on the setting diaglogue.).

I hope that this version would solve our problems!

xtpcool commented 7 months ago

Thank you very much for your work. After updating to the latest version, there are no more errors, but the program still cannot be updated. It seems that the program stops updating after a few files, even after I re-fetch and rebuild the DB. What is confusing is that there are no error messages, but the program is not working properly.

And, if I manually click "Replicate" again, it will prompt me that "Replication is already in progress."

1701700792_HSm5ODnI

I have released v0.21.3; which is able to use fallback hash function! (And also, it automatically used if no hash function available. However, all devices should use same hash function, please set fallback also on other devices. It can be configured on the Hatch pane on the setting diaglogue.).

I hope that this version would solve our problems!

slimx commented 7 months ago

Sad , I'm considering using Syncthing for synchronization, but the user experience of Syncthing on the iOS platform is not that great.

same error,I think it's hard to get a fix.

I am also using syncthing, there is a gui version called mobius sync. It works with filza. All you need to do is create a soft link to the obsidian database in the documents of mobius sync.

xtpcool commented 7 months ago

Sad , I'm considering using Syncthing for synchronization, but the user experience of Syncthing on the iOS platform is not that great.

same error,I think it's hard to get a fix.

I am also using syncthing, there is a gui version called mobius sync. It works with filza. All you need to do is create a soft link to the obsidian database in the documents of mobius sync.

Thank you, I have switched to the new version of the iOS app, which now supports selecting shared directories from other apps without the need for soft link. (The only issue is that it cannot sync in the background, but it's running well otherwise. It's just a minor problem.)

vrtmrz commented 7 months ago

Hi! It is a relief to know that everyone is not in fatal trouble.

However, I am not sure why the fallback implementation does not work well. I know that you are not having so much trouble while using other solutions, but would you please enable the verbose log and let me see the log? And, if the verbose log is enabled and no such errors are shown, actually it may take some time, especially in the first replication.

vrtmrz commented 7 months ago

@xtpcool Oh, I found a bit of interesting output in the logs. Your Self-hosted LiveSync seems to suspend database reflection. While rebuilding, Suspend database reflection and Suspend file watching are disabled automatically. If your (re)building procedure has failed, These configurations might be kept disabled unintendedly. Would you please disable them like below, and try again? image

xtpcool commented 7 months ago

@xtpcool Oh, I found a bit of interesting output in the logs. Your Self-hosted LiveSync seems to suspend database reflection. While rebuilding, Suspend database reflection and Suspend file watching are disabled automatically. If your (re)building procedure has failed, These configurations might be kept disabled unintendedly. Would you please disable them like below, and try again?图像

I have tried it and there was no other response. Below is the log with verbose mode enabled. The last few lines show that there was no log output after syncing a few files. 20231205164142 20231205164451