breadcrumbs icon indicating copy to clipboard operation
breadcrumbs copied to clipboard

Bug: Incompatible with Obsidian 1.7.2

Open liamcain opened this issue 1 year ago • 11 comments

Starting in Obsidian 1.7.2, we are now properly ensuring that plugins load in series. This means that onload is now awaited. The issue is that in Breadcrumbs v3 (the current public version), your onload function awaits waitForCache. From what I can tell, this waits until Dataview has fully loaded. Since we are now awaiting the plugin onload(), this means Dataview won't finish loading until Breadcrumbs finishes loading. This causes a deadlock in Obsidian's loading sequence. This await should not be within the plugin onload. Instead, you should wrap this in onLayoutReady and perform the polling in the background.

liamcain avatar Sep 19 '24 19:09 liamcain

Likely this issue but I have less insight. But it looks like breadcrumbs is causing Obsidan plugin loading to stall indefinitely.

I do have Dataview installed

CleanShot 2024-09-20 at 16 10 21

daeh avatar Sep 20 '24 20:09 daeh

I have this problem too. Anyone have a workaround

mitchmeister avatar Sep 22 '24 05:09 mitchmeister

If by workaround you mean a way to make breadcumbs work with Obsidian 1.7.2, I don't know. But if you just mean a way to launch obsidian without breadcrumbs, you can disable the extension until there's a fix by deleting its name from .obsidian/community-plugins.json in your vault.

daeh avatar Sep 22 '24 05:09 daeh

thanks 🙏🏻 I disabled the plugin from my iphone & reloaded on my Mac

mitchmeister avatar Sep 22 '24 05:09 mitchmeister

same problem for me

cvh-obsi avatar Sep 24 '24 11:09 cvh-obsi

Thank you for the info, Liam 🙏🏼

For now, there are two workarounds:

  1. Disable Breadcrumbs, as suggested above
  2. Upgrade to Breadcrumbs V4 beta using the BRAT plugin. See here for more info: https://github.com/SkepticMystic/breadcrumbs/blob/master/V4.md

V4 works with Obsidian 1.7.2, but also represents a new way of working with Breadcrumbs. It's not a breaking change in the sense that things should just work when you upgrade. But making changes to your hierarchies is different. Again, see the link for more info. The docs site has been updated to V4, so you can get more acquited with the changes there.

Until I am able to push V4 live into production, V3 will remain broken.

SkepticMystic avatar Sep 24 '24 17:09 SkepticMystic

In Obsidian v1.7.3, Obsidian will detect if a plugin is hanging on load and give the option to disable the plugin without needing to manually delete the plugin from the file system.

liamcain avatar Sep 24 '24 18:09 liamcain

Thank you for the info, Liam 🙏🏼

For now, there are two workarounds:

  1. Disable Breadcrumbs, as suggested above
  2. Upgrade to Breadcrumbs V4 beta using the BRAT plugin. See here for more info: https://github.com/SkepticMystic/breadcrumbs/blob/master/V4.md

V4 works with Obsidian 1.7.2, but also represents a new way of working with Breadcrumbs. It's not a breaking change in the sense that things should just work when you upgrade. But making changes to your hierarchies is different. Again, see the link for more info. The docs site has been updated to V4, so you can get more acquited with the changes there.

Until I am able to push V4 live into production, V3 will remain broken.

If only the plugin worked at all. Every view I try to open says "plugin created this view has gone away" Which makes it pretty much useless to me at the moment. The plugin is a core to my note structure though. So I hope it's fixed soon=)

Vitalii-Kh95 avatar Oct 17 '24 22:10 Vitalii-Kh95

There is a workaround. It works with the delayed loading in "plugin groups". But there is still an issue with "plugin created this view has gone away".

mehanoid avatar Oct 18 '24 06:10 mehanoid

There a workaround for me, on PC:

  • disable plugin
  • start obsidian
  • enable plugin

And it works as expected, while we wait for the update.

napseis avatar Nov 21 '24 09:11 napseis

@liamcain is correct.

Within main.js : "var BCPlugin = class extends import_obsidian44.Plugin {" I merely commented out the call to "waitForCache" and copied the contents of it below the comment but wrapped it in a "app.workspace.onLayoutReady(async () => {"; as per how I understood liamcane's proposed solution.

//await waitForCache(this);
app.workspace.onLayoutReady(async () => {
  var _a;
  if (app.plugins.enabledPlugins.has("dataview")) {
    let basename;
    while (!basename || !app.plugins.plugins.dataview.api.page(basename)) {
      await wait(100);
      basename = (_a = getCurrFile()) == null ? void 0 : _a.basename;
    }
  } else {
    await waitForResolvedLinks();
  }
});

I am not sure if this is the best way to resolve this, I am in no way an Obsidian plugin, Javascript or Typescript programmer but I know enough about C/C++ to be dangerous and even attempt to try this.

And it works. It allows breadcrumbs to load and there seems to be no detriment to its functionality from what I can tell; atleast in how I am using it within my my vault.

I am not sure why @SkepticMystic will not even attempt a band-aid fix in the least and why he merely just suggests disabling the plugin or updating to the beta v4; which I understand is not yet ready for prime-time.

paulmoffat avatar Dec 04 '24 20:12 paulmoffat