vrtmrz / obsidian-livesync

MIT License
3.92k stars 132 forks source link

TypeError: wasm function signature contains illegal type on Android Tablet #427

Open sairus2k opened 1 month ago

sairus2k commented 1 month ago

I encountered an issue while using the LiveSync plugin (v0.23.7) on my Android tablet. The plugin fails to update the database and synchronize hidden files, repeatedly throwing the same error: TypeError: wasm function signature contains illegal type.

Logs:

Below are the relevant logs capturing the errors:

5/16/2024, 10:36:50 -> Error while UPDATE DATABASE
5/16/2024, 10:36:50 -> TypeError: wasm function signature contains illegal type
5/16/2024, 10:36:53 -> STORAGE --> DB: .obsidian/workspace-mobile.json: (hidden) Failed
5/16/2024, 10:36:53 -> TypeError: wasm function signature contains illegal type
5/16/2024, 10:36:55 -> STORAGE --> DB: .obsidian/workspace-mobile.json: (hidden) Failed
5/16/2024, 10:36:55 -> TypeError: wasm function signature contains illegal type
5/16/2024, 10:36:56 -> STORAGE --> DB: .obsidian/workspace-mobile.json: (hidden) Failed
5/16/2024, 10:36:56 -> TypeError: wasm function signature contains illegal type
5/16/2024, 10:39:24 -> STORAGE --> DB: .obsidian/workspace-mobile.json: (hidden) Failed
5/16/2024, 10:39:24 -> TypeError: wasm function signature contains illegal type

Report from the LiveSync:

Report from hatch ``` 5/16/2024, 10:36:49 -> Cache initialized 300 / 250000000000 5/16/2024, 10:36:49 -> loading plugin 5/16/2024, 10:36:49 -> Self-hosted LiveSync v0.23.7 0.23.7 5/16/2024, 10:36:49 -> xxhash for plugin initialised 5/16/2024, 10:36:49 -> Waiting for ready... 5/16/2024, 10:36:49 -> Cache initialized 10 / 1000000000 5/16/2024, 10:36:49 -> Cache initialized 300 / 50000000 5/16/2024, 10:36:49 -> Newer xxhash has been initialised 5/16/2024, 10:36:49 -> Opening Database... 5/16/2024, 10:36:49 -> Database info 5/16/2024, 10:36:49 -> { "doc_count": 21, "update_seq": 22, "db_name": "Test-/storage/emulated/0/Documents/Test-livesync-v2-indexeddb", "auto_compaction": false, "adapter": "indexeddb" } 5/16/2024, 10:36:49 -> Database is now ready. 5/16/2024, 10:36:50 -> Log window opened 5/16/2024, 10:36:50 -> Initialize and checking database files 5/16/2024, 10:36:50 -> Checking deleted files 5/16/2024, 10:36:50 -> Collecting local files on the storage 5/16/2024, 10:36:50 -> Collecting local files on the DB 5/16/2024, 10:36:50 -> Opening the key-value database 5/16/2024, 10:36:50 -> Updating database by new files 5/16/2024, 10:36:50 -> UPDATE DATABASE 5/16/2024, 10:36:50 -> UPDATE STORAGE 5/16/2024, 10:36:50 -> Deletion history skipped: Untitled.md 5/16/2024, 10:36:50 -> UPDATE STORAGE All done: DONE:1, FAILED:0 5/16/2024, 10:36:50 -> Error while UPDATE DATABASE 5/16/2024, 10:36:50 -> TypeError: wasm function signature contains illegal type 5/16/2024, 10:36:50 -> UPDATE STORAGE All done: DONE:1, FAILED:0 UPDATE DATABASE All done: DONE:0, FAILED:1 5/16/2024, 10:36:53 -> Initialized, NOW TRACKING! 5/16/2024, 10:36:53 -> Synchronizing hidden files... 5/16/2024, 10:36:53 -> Scanning hidden files. 5/16/2024, 10:36:53 -> STORAGE --> DB: .obsidian/workspace-mobile.json: (hidden) Failed 5/16/2024, 10:36:53 -> TypeError: wasm function signature contains illegal type 5/16/2024, 10:36:55 -> STORAGE --> DB: .obsidian/workspace-mobile.json: (hidden) Failed 5/16/2024, 10:36:55 -> TypeError: wasm function signature contains illegal type 5/16/2024, 10:36:56 -> Hidden files scanned: 6 files had been modified 5/16/2024, 10:36:56 -> Synchronizing hidden files done 5/16/2024, 10:36:56 -> Cache initialized 300 / 50000000 5/16/2024, 10:36:56 -> Scanning hidden files. 5/16/2024, 10:36:56 -> STORAGE --> DB: .obsidian/workspace-mobile.json: (hidden) Failed 5/16/2024, 10:36:56 -> TypeError: wasm function signature contains illegal type 5/16/2024, 10:37:01 -> Hidden files scanned: 0 files had been modified 5/16/2024, 10:37:01 -> Modifying callback of the save command 5/16/2024, 10:37:01 -> Additional safety scan.. 5/16/2024, 10:37:01 -> OneShot Sync begin... (sync) 5/16/2024, 10:37:01 -> There are no conflicted files 5/16/2024, 10:37:01 -> Additional safety scan done 5/16/2024, 10:37:01 -> Replication paused 5/16/2024, 10:37:02 -> Replication paused 5/16/2024, 10:37:02 -> Replication completed 5/16/2024, 10:39:24 -> OneShot Sync begin... (sync) 5/16/2024, 10:39:24 -> Scanning hidden files. 5/16/2024, 10:39:24 -> STORAGE --> DB: .obsidian/workspace-mobile.json: (hidden) Failed 5/16/2024, 10:39:24 -> TypeError: wasm function signature contains illegal type 5/16/2024, 10:39:24 -> Replication paused 5/16/2024, 10:39:25 -> Replication paused 5/16/2024, 10:39:25 -> Replication completed ```

Steps to Reproduce:

  1. Install the LiveSync plugin v0.23.7 on an Android tablet.
  2. Configure the plugin following the standard setup.
  3. Attempt to synchronize files including hidden files via LiveSync.

Expected Behavior: The plugin should successfully update the database and synchronize hidden files without errors.

Observed Behavior: The plugin throws a TypeError: wasm function signature contains illegal type error during database update and hidden file synchronization.

Environment:

Plugin Version: 0.23.7 Obsidian Mobile Version: 1.5.12 (134) Android Version: 10 Device Model: Huawei MediaPad M6

Additional Information: This issue seems to be related to handling of WebAssembly (wasm) functions within the plugin. Any insights or solutions to address this error would be highly appreciated.

Please let me know if you need any additional information or clarification.

Thank you for your assistance!

vrtmrz commented 1 month ago

Thank you for asking me! And sorry for being late! Possibly, Huawei's Android tablets may use their original webviews.

In the past, there have been Issues such as #231. Would you mind if I ask you to check #231 and the settings of your device, please?

sairus2k commented 1 month ago

Thank you for pointing me to the issue, it was very relevant. In my case, the Huawei WebView is based on an old Chrome browser version 78.0.3904.108. I tried installing both Google Chrome and Android System WebView from the Play Store. Unfortunately, no other options appeared in the WebView Implementation menu besides Huawei WebView. This issue seems too specific to my device and can be closed. Thanks for such a great plugin!