Can't get plugs to load

Good morning,
I'm looking for help concerning my silverbullet configuration. I'm using docker and :v2 edge tag.

I have a VM with Nginx Proxy Manager installed, which is proxying sb.MYDOMAIN.COM to another VM where I have silverbullet running via docker.

In SB I managed to get libraries to mostly work, but plugs don't work. Or, to be more precise, most of the time they don't work. For instance right now after the n-th refresh the graph plug loaded, while mermaid didn't (a few refresh ago it was the other way around, but most of the time no plug works). Even libraries behave strangely: in the latest refresh for the first time the Mr-XRed math (for latex) loaded and was applied to the text.

This non deterministic behaviour really smells like a racing condition of sorts.

I tried accessing my SB with both firefox and chrome, same issues.

In the browser console I see some errors like 404 while trying to get, for instance, https://sb.MYDOMAIN.COM/.fs/_plug/mermaid.plug.js (usually both plug give the same error, this time only mermaid). I guess this is the source of all subsequent errors (like "[Client] Could not load plug _plug/mermaid.plug.js error: Plug timed out during creation" and "[index plug] An exception was thrown as a result of invoking function lintObjects error: can't access property "name", e is undefined").

My CONFIG is pretty simple:

config.set {
  plugs = {
    -- Add your plugs here
    "ghr:deepkn/silverbullet-graphview",
    "github:silverbulletmd/silverbullet-mermaid/mermaid.plug.js"
  },

  graphview = {
    ignoredPrefixes = {
      "Library",
      "Repositories",
      "themes",
      "_plug"
    },
    enableDecorations = true,
    position = "modal",
    colormap = {
      tag = {
        services = "01017a",
        notes = "02bdb6",
      },
    },
  }, --graphview


  
}

Can you help me troubleshooting this issue?

Thank you! :slight_smile:

Could you try the :latest docker tag and see if you have the same issue there?

This seems to have fixed the plugs issue.

However the Mr-XRed math plugin stopped working (again). I get this error in the console:

[Client] Error evaluating script: attempt to index a nil value at [[Library/mrmugame/Silverbullet-Math@2399]] logger.ts:43:30
t logger.ts:43
reload space_lua.ts:59
loadLuaScripts client_system.ts:211
init client.ts:279
boot.ts:241
q2 async.ts:152
boot.ts:27
boot.ts:352

...however I'm not sure if I should open a new issue for this (and where) :slight_smile:

Thanks for the help!

...too fast. I tried to add other plugs:

plugs = {
-- Add your plugs here
"github:joekrill/silverbullet-treeview/treeview.plug.js",
"ghr:deepkn/silverbullet-graphview",
"github:silverbulletmd/silverbullet-mermaid/mermaid.plug.js",
"ghr:LogeshG5/silverbullet-drawio",
"github:logeshg5/silverbullet-excalidraw/excalidraw.plug.js",

},

and it failed again (including previously working plugs like mermaid or drawio).

I still get the 404 while trying to get a subset of plugs https://sb.MYDOMAIN/.fs/_plug/PLUGNAME, and previously working plugs do not work anymore.

UPDATE: i tried to revert to having only the graphview, mermaid and drawio plugs, I then did a plugs reload/update a few times, a clientReset and refreshed a few times and now the errors disappeared... then after a few refresh graphview stopped working. I removed it and tried again and now with only mermaid and drawio it seems more stable...

Is there any way you can try to run silverbullet on localhost without proxies and see if the same? Another thing to try would be to launch SB in your current setup, but with an empty space, then add plugs to see if it breaks or if there's something else fishy going on.

You mean to have both docker and the browser running in the same machine? My docker host is a headless machine so I can't do that... Best I can do is running sb without using the proxy and connecting directly to the 3000 port inside my home network, could this be enough?

Concerning the space, it is already empty, I am starting from scratch and the only thing I changed is adding the config I posted before.

Quick update: I tried to access SB from another machine in my network (via IP_ADDRESS:3000) and it says that it is an unsupported configuration (as I am accessing via http and not https -the management of certificates is delegated to my nginx proxy manager instance). So, as the docker machien is headless, I don't have a way to access SB via localhost.

For testing you can use an SSH tunnel: TLS

Sorry for the delay.

I ran your test, and SB seems much more "stable" using the SSH tunnel. Outside the tunnel (i.e. via the proxy) I get more errors, but strangely enough the plugs which didn't work before now do work (albeit I think it is not a definitive test as the plugs failure was occasional even before...)