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

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

Open xtpcool opened this issue 2 years ago • 11 comments

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 avatar Nov 29 '23 23:11 xtpcool

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. 2. Here is the verbose version 1701323303_2ZC8vpcc

xtpcool avatar Nov 30 '23 05:11 xtpcool

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

slimx avatar Dec 04 '23 02:12 slimx

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.

xtpcool avatar Dec 04 '23 09:12 xtpcool

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 avatar Dec 04 '23 10:12 vrtmrz

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!

vrtmrz avatar Dec 04 '23 10:12 vrtmrz

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!

xtpcool avatar Dec 04 '23 14:12 xtpcool

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.

slimx avatar Dec 05 '23 06:12 slimx

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.)

xtpcool avatar Dec 05 '23 07:12 xtpcool

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 avatar Dec 05 '23 08:12 vrtmrz

@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

vrtmrz avatar Dec 05 '23 08:12 vrtmrz

@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

xtpcool avatar Dec 05 '23 08:12 xtpcool