Content ‘awareness’ lag (stuck cache?) on iOS / iPadOS

Once you’ve done the above, delete everything above this line.

Steps to reproduce

I’m sorry, I don’t know how to cause the bug, only how to detect that the bug is happening. :frowning:

Did you follow the troubleshooting guide? [Y/N]

Yes. I have a vault of 5230 files, but it is currently working in Restricted Mode, no CSS Snippets, Default Theme in use.

Expected result

Expected result is that Obsidian is aware of new notes added, or new edits of existing notes. When the bug happens, certain features stop being ‘aware’ of new notes or that notes have been modified.

For example:

  • I expect Base Views to be always aware of new notes which match their filter criteria
  • I expect the Rebuild button (Settings → Files and links → Rebuild) to refresh / rebuild the index (which I am assuming the index underlies the bug) when clicked
  • When I have plugins enabled, Dataview blocks which display all the files created today will not display notes created from when the bug starts, onwards. In Notebook Navigator, when I add an image to a note, NN displays usually displays it as a thumbnail in the file entry in the file listing. When the bug happens, this stops working. Etc.

Actual result

When the bug has started to happen, Base Views which should display new notes, won’t - they will only display notes that Obsidian was aware of before / until the bug presented.

Similarly, clicking on the Rebuild button (Settings → Files and links → Rebuild) will do nothing when the bug is happening. Clicking on it multiple times will result in nothing.

To fix Obsidian when the bug is happening, I have to do one of the following:

  • Force quit Obsidian and then open it again
  • Or, switch to a different vault and then switch back again

Doing either of the above will make Obsidian behave as expected for a period of time until the bug happens again and it stops being ‘aware’ of new notes etc, requiring another force quit again and again and again. This bug is happening multiple times a day unfortunately.

Environment

SYSTEM INFO:
Operating system: ios 18.7.2 (Apple iPad13,4)
Obsidian version: 1.10.6 (256)
API version: v1.10.6
Login status: logged in
Language: en
Catalyst license: supporter
Live preview: on
Base theme: light
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

I have also tried entirely removing Obsidian from my iPad and reinstalling it. The bug still happens after doing this.

The vault is stored locally on my iPad - i am not using iCloud etc to store and sync.

This issue was happening long before Bases were introduced as a feature - as noted above, previously most commonly I would be aware of it through Dataview blocks not showing newly added / modified notes. E.g., on my note for a specific book, I would have a Dataview block which would list all notes for books by the same author. At various intervals I’d add a book note which should have been listed, and it wouldn’t until a force quit and restart.

Dataview and some Bases queries require a refresh to update. Have you tried closing and reopening the file with the query, or navigating away and then back to the file?

Hi @dawni , yes, I have tried closing and reopening files without luck. I also am not sure that would explain the Rebuild button stopping working?

Can you explain what you mean by the Rebuild button “will do nothing”? I assumed you meant it didn’t update the base and dataview queries. But do you mean that Obsidian gives no signs that a cache rebuild is taking place—no wait circle, no restart?

If that’s the case, then you might have some other kind of freeze going on, possibly not specifically or solely about being “aware” of cache changes.

When the issue arises, do you notice other features that don’t work? Does the console log any errors or useful info? (Press Ctrl + Shift + I / Cmd + Opt + I to open DevTools then click on the Console tab.)

I have an issue I’ve been meaning to report which might be another manifestation of the same thing. Sometimes Obsidian “forgets” that headings exist. The Outline is empty despite the note containing headings, and trying to link to a heading in the note shows no link suggestions. Reloading the vault cures it until next time.

I don’t use bases much yet, don’t use DataView at all, and haven’t seen problems with rebuilding the cache on the occasions I’ve done it.

2 Likes

Unfortunately, I don’t think the Console Log is available on iPad / iOS.

Yes, when Obsidian is ‘healthy’, clicking on the Rebuild button does visible activity. A progress bar pops up, for example.

When Obsidian is ‘unhealthy’ (lagging in awareness of changes), clicking on Rebuild does nothing at all. It is as though someone has unhooked the onClick event from the button.

I can’t say that there is a 100% relationship between the two symptoms, but so far it’s 100% when I notice the lag and then click on the Rebuild button.

Oops I confused this thread with another that’s on desktop. On mobile, the community plugin Logstravaganza can write the console log to a file.

Here come a bunch of things clarify about the environment, some for troubleshooting, some for trying to reproduce:

  • Are your vault files on any sync services? iCloud, Obsidian Sync, Google Drive, etc.
  • What kind of files does it happen with: markdown only (that you’ve noticed) or which other types?
  • When it happens, do the new files show up in Obsidian’s core file explorer (not Notebook Navigator)? If so, does tapping on them successfully open them?
  • Your environment says restricted mode is on when you tested. Is a non-updating base the canary that lets you know the issue has arisen again? Or are there additional symptoms (what)? Or does it happen so frequently that you can try to rebuild cache at random times in restricted mode and be likely to catch the issue?
  • How frequently does it seem to happen, and with any set-up in particular? If you can’t think of what to describe, maybe grab a screenshot of your workspace when it happens and (redact then) show it here.
  • It sounds like all of the UI except the cache button remains responsive, that you can still navigate settings and tabs. If that’s right, then when it happens, could you go to some other button in settings to click it? …to find out whether it’s specifically the Rebuild button or if other buttons in Settings are also unresponsive.

Ohhh.

AFewMistakesAgo,
When it happens, see if you have the symptom CawlinTeffid has: empty Outline and no heading link suggestions.

Quickly replying to this particular message - yes, confirming the behaviour @CawlinTeffid has noticed. When the behaviour I am experiencing is happening, the Outline panel is also blank. It still works for any file created before the problem starts, but not after. See screenshot. Also note, if I go to a file last modified before the problem - it will show the headings. If I modify that file in any way, go to another file, then come back, the Outline will now be blank. Force quit + restart and the Outline panel will go back to displaying the headers as expected.

1 Like

Sycing

No, my vault is local on my iPad. I use Obsidian Syncing, I do not use iCloud etc.

Type of files

I’ve only noticed this with MD files, but this is predominantly what I interact with.

Do the files show up in Obsidian’s core file explorer

Yes, and yes, tapping them opens the file as expected. Also, for what it’s worth, they also show in Notebook Navigator’s file lists, although as mentioned previously, they won’t update with a thumbnail if you add an image to the file.

Canary

It used to be that I would notice an entry I had just created wasn’t showing up in a Dataview result even though it matched the criteria. This still is the case, but I have moved to using Bases instead of Dataview in a lot of cases, so this is where I most often notice that new or changed content isn’t reflected in the records being displayed now.

A common example is when I add a book to my To Be Read list, the Template I use has an embedded Base which will show all notes in my vault where there is a Tag of ‘Book’ and an ‘Author’ property with the same value as the Author property in the current note.

When the problem is happening, this embedded Base will not update to show book notes from the current file’s Author.

It usually happens multiple times a day, but I haven’t yet worked out what the trigger might be.

UI

Yes, in general, the UI still appears to respond, but the Rebuild button specifically doesn’t. Definitely will try other buttons next time it presents.

Adding: as far as I can tell, all other UI elements in the Settings panels work when the Rebuild button stops working. E.g., I can check for updates to Themes, and install updates. I can launch the Help page, and so on.

There is a better one that replicates desktop console, Advanced Debug Mode:

But I fail to see whether a stale state like that would be displayed with any errors in the console.
(I could not install the latest version on my iPad (1.7.x install was successful).) I do not use the tablet anymore.

There is another plugin by that person, Codescript Toolkit, which also works on mobile. With that one can reload the active page that may help refresh the cache and get rid of the stale state:

But I think some other commands should be run instead. A reload of the app sounds expensive.
More info in that thread how to add these scripts to the plugin/app.

I changed the title to add a little more detail and include iOS (was “Content ‘awareness’ lag on iPad”). I feel like there must be a better description we could use there, but nothing has come to me yet.

1 Like

I have been aware of this problem for a long time, but was discouraged from asking about it because I didn’t know how to describe it with any accuracy. I still don’t like “Content ‘awareness’ lag”. :frowning: :man_shrugging:

I thought maybe the nil-action click on the Rebuild button might throw a (useful?) error into the log.

Another symptom: if I add a note after the problem is happening, I can still link to it via the popup list from another note by typing [[]]. However, if the new note has an alias, that alias is not visible in the popup until force-quit + restart etc.

1 Like

I trust we or someone will find the words eventually. :slightly_smiling_face:

1 Like

Contrary to what I said above, I have noticed at least one instance of Notebook Navigator having no folders / files listed when the problem is happening. E.g.:

Whereas, Obsidian’s own file navigator is still working.

  • Does this happen with restricted mode on?

  • Does this happen only on iPad or on other devices as well?

  • Do you have markdown files larger than 50KB?

Hi @WhiteNoise ,

Yes, this does happen in Restricted Mode.

I have only ever noticed this on my iPad, however this is the device I use the most.

I have 4 markdown files larger than 50KB (3 of which are saved Wikipedia articles) and another that isn’t far off. Should I remove / break apart these files?

For the record, I’ve just enabled Restricted Mode again and will post when the content goes stale again.