Skip to content

MB gets stuck in a load settings/save settings if a vault where it's installed is opened on 2 devices (Desktop + Mobile) at the same time  #311

@I-Pch

Description

@I-Pch

Please fill out these Check-boxes

  • I checked that the plugin is up to date
  • The issue persist with all other plugins and themes disabled

This Issue Occurs on

  • Windows
  • Linux
  • macOS
  • Android
  • iOS

Plugin Version

1.1.0

Describe the Issue

Hi there 😊 !

Wanting to see how a Meta Bind/JS Engine setup I'm working on looked like on mobile, I simply launched Obsidian Mobile for a quick peek 😊 ...
On Desktop, I had the Dev Tool opened and after checking if everything seemed to work as expected on mobile, I glanced at my Mac to discover that, for some reasons, Meta Bind was loading and then saving its settings every few seconds or so 🤔 ...

It was one of the first time I opened that specific vault on mobile (all my vaults are stored on & synced through iCloud) while also having the same vault opened on desktop...

I thought that maybe it was just an "iCloud" thing 😄 ...

So, just to be sure, I opened Finder on my Mac, opened the hidden .obsidian folder of the vault and saw that Meta Bind's data.json was apparently uploaded every few seconds...

The loop only stops when I close Obsidian on mobile (iPad).

While this happens, the console only reports:

...
meta-bind | Main >> settings load           plugin:obsidian-meta-bind-plugin:135 
meta-bind | Main >> settings save           plugin:obsidian-meta-bind-plugin:135
meta-bind | Main >> settings load           plugin:obsidian-meta-bind-plugin:135 
meta-bind | Main >> settings save           plugin:obsidian-meta-bind-plugin:135
meta-bind | Main >> settings load           plugin:obsidian-meta-bind-plugin:135 
meta-bind | Main >> settings save           plugin:obsidian-meta-bind-plugin:135
...

And here's a screen-recording of what I could see in the Finder and what the console was saying 😊 ...

Meta.Bind.Loop.mov

Steps to Reproduce

I am not entirely sure what precisely triggers the start of the loop 🤔...

But from what I've seen, having a vault where Meta Bind is installed and enabled opened on both desktop & mobile at the same time seems to be enough to initiate the loop.

I've tested this multiple times and I didn't really need to interact with the note opened on launch on Mobile for the loop to begin ...

The note I used for test purposes contains only this:

---
done: false
---

`INPUT[toggle:done]`

If I launch Obsidian mobile on an empty new tab (so, with no note opened at launch), the loop starts as soon as I interact with Obsidian in a way or another (closing the Debug startup time notice, opening the quick switcher to open a note, etc...).

So I'm not sure the content of a potentially opened note on launch, on mobile, does really matter 🤷‍♀️ ...

Expected Behavior

I guess that it would be nice, if possible 😊, if Meta Bind did to not try to save and sync its settings/data.json every few seconds while having the same vault opened on both desktop and mobile 😇 .

Thank you very much in advance 🙌

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behavior caused by this plugin

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions