silverbulletmd / silverbullet

The knowledge tinkerer's notebook
https://silverbullet.md
MIT License
2.34k stars 169 forks source link

'Slash commands' no longer working #811

Closed thinkbig1979 closed 4 months ago

thinkbig1979 commented 6 months ago

Upgraded to latest (0.7.6) this morning. Initially had issues due to treeview plug throwing an error, but solved that by following instructions listed in another issue. However, hitting the / key no longer does anything, where previously I would get a little menu and I could type /h2 for example, and it would change the line into an H2 heading. Hitting / now simply types a slash, and no menu is invoked. I cannot find any related settings, nor any mention of such an issue in the issues section.

Running: Ubuntu 20.04.6 LTS Deno 1.41.3 Silverbullet 0.7.6

tmichela commented 6 months ago

I had this too. A quick workaround is to reload the page bypassing the cache: CTRL + SHIFT + R on firefox

zefhemel commented 6 months ago

This sounds like a caching issue indeed. Try to reload the page a few times.

thinkbig1979 commented 6 months ago

Cleared local storage and "cookies and site data" multiple times, refreshed using ctrl+r and ctrl+shift+r multiple times and even restarted silverbullet. The issue persists unfortunately.

zefhemel commented 6 months ago

Can you have a look at your browser's JavaScript console and what errors are there? Have you installed any third party plugs?

thinkbig1979 commented 6 months ago

I've tested this on Edge and Firefox on windows, and on Firefox on Linux. I'm not running any browser extensions on Edge, whereas I am running quite a few on Firefox. Same thing in all scenarios.

I've deleted all plugs, removed them from the _plugs directory, cleared any settings related to the plugs, and restarted silverbullet. Cleaned out all local storage related to the webapp in both browsers and the issue still persists.

Zero errors in the console on both browsers. Zero Deno errors other than shown below.

The `--unstable` flag is deprecated and will be removed in Deno 2.0. Use granular `--unstable-*` flags instead.
Learn more at: https://docs.deno.com/runtime/manual/tools/unstable_flags
The `Deno.openKv` API was used with `--unstable` flag. The `--unstable` flag is deprecated and will be removed in Deno 2.0. Use granular `--unstable-kv` instead.

Interestingly, this issue is not present on the online silverbullet playground. There, the slash key works just fine (from the same machines and browsers).

Really seems to be something wrong with my install by the looks of it.

zefhemel commented 6 months ago

And if you point silverbullet at an empty folder, does that help?

thinkbig1979 commented 6 months ago

Same issue.

thinkbig1979 commented 6 months ago

What's the best way to neatly and completely uninstall silverbullet? That way I can try a clean install.

zefhemel commented 6 months ago

Depending on how you installed Deno, one way would be to remove your ~/.deno folder, which will likely also uninstall Deno. After that follow https://silverbullet.md/Install/Deno again.

Then run it on an empty folder and perhaps on a new port (-p 3005 for instance) to be sure there's absolutely no caching going on.

thinkbig1979 commented 6 months ago

Unfortunately, none of the above has had any effect. Puzzling.

zefhemel commented 5 months ago

Is this issue still happening, or did it somehow resolve itself?

thinkbig1979 commented 5 months ago

Still happening, and I just tested running SilverBullet as a docker container, and it still had the same issue on my server. So it's not a browser thing, it's not a SilverBullet thing or a Deno thing. The only thing the bare metal install and the docker container have in common is the reverse proxy I'm using and the underlying system kernel etc. I will do a test shortly to bypass the reverse proxy (I'll just open the docker mapped port temporarily. Will post here as soon as I have that result.

zefhemel commented 5 months ago

Very odd. The only possible explanation I have is some sort of caching. I've just released 0.7.7, perhaps upgrading to that somehow magically fixes things.

thinkbig1979 commented 5 months ago

Just tried accessing the server directly through the exposed ports from docker to take the reverse proxy out of the equation. I'm afraid the problem still persists. Even tried accessing it from a cleanly installed machine running a browser I've never used. No difference. 😥

asitemade4u commented 4 months ago

Same issue here with a self-hosted docker installation. The Browser (Brave) console complains with a warning:

A preload for 'https://sbt.qtpl.net/.client/client.js' is found, but is not used because the request credentials mode does not match. Consider taking a look at crossorigin attribute.

Update: Actually, I tried all versions until 0.6.1 and it did not work either...

zefhemel commented 4 months ago

Ok I just installed Brave again on Mac and tested both on https://play.silverbullet.md/ (user: silverbullet password: silverbullet) as well as my own installation and slash commands work perfectly. Does this not work for you either?

thinkbig1979 commented 4 months ago

That's what's so strange. The playground works perfectly for me. image

But on the same browser or any other browser, if I go to my self-hosted version, the issue remains. image

zefhemel commented 4 months ago

And you have a valid SSL certificate, you load SB through https://sbt.qtpl.net (that's referenced in your comment) and you don't have weird authentication proxies or whatever on top?

thinkbig1979 commented 4 months ago

Just spun up a new container, and fresh installed chromium. Same issue on my end. image

Can't speak for @asitemade4u , but for me: image

zefhemel commented 4 months ago

The default install of SilverBullet may not come with any slash commands I think, did you install the core library? https://silverbullet.md/Library/Core

thinkbig1979 commented 4 months ago

If it's included in the default docker container at image: zefhemel/silverbullet, then yes, otherwise, no.

zefhemel commented 4 months ago

Please follow the instructions in that link in that case. It's part of the new onboarding page to do this, but if you already had a space you may not have seen this.

thinkbig1979 commented 4 months ago

Yes! That did the trick! Thanks Zef!

asitemade4u commented 4 months ago

Worked for me too, thanks! My feeling is that you should include the library by default in the docker installation.

zefhemel commented 4 months ago

I'm closing this, since I think we found the root cause. I'll think if I can find a better way to distribute a default library without having to do an explicit import.