Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Incompatible with Obsidian 1.7.2 #567

Open
liamcain opened this issue Sep 19, 2024 · 11 comments
Open

Bug: Incompatible with Obsidian 1.7.2 #567

liamcain opened this issue Sep 19, 2024 · 11 comments
Labels
bug Something isn't working

Comments

@liamcain
Copy link

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 liamcain added the bug Something isn't working label Sep 19, 2024
@daeh
Copy link

daeh commented Sep 20, 2024

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

@mitchmeister
Copy link

I have this problem too. Anyone have a workaround

@daeh
Copy link

daeh commented Sep 22, 2024

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.

@mitchmeister
Copy link

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

@cvh-obsi
Copy link

same problem for me

@SkepticMystic
Copy link
Owner

SkepticMystic commented Sep 24, 2024

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.

@liamcain
Copy link
Author

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.

@Vitalii-Kh95
Copy link

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

@mehanoid
Copy link

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

@napseis
Copy link

napseis commented Nov 21, 2024

There a workaround for me, on PC:

  • disable plugin
  • start obsidian
  • enable plugin

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

@paulmoffat
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

9 participants