silverbullet icon indicating copy to clipboard operation
silverbullet copied to clipboard

'Slash commands' no longer working

Open thinkbig1979 opened this issue 11 months ago • 14 comments

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

thinkbig1979 avatar Mar 15 '24 09:03 thinkbig1979

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

tmichela avatar Mar 15 '24 09:03 tmichela

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

zefhemel avatar Mar 15 '24 11:03 zefhemel

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.

thinkbig1979 avatar Mar 16 '24 07:03 thinkbig1979

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

zefhemel avatar Mar 16 '24 09:03 zefhemel

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.

thinkbig1979 avatar Mar 16 '24 11:03 thinkbig1979

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

zefhemel avatar Mar 16 '24 14:03 zefhemel

Same issue.

thinkbig1979 avatar Mar 17 '24 08:03 thinkbig1979

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

thinkbig1979 avatar Mar 18 '24 08:03 thinkbig1979

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.

zefhemel avatar Mar 18 '24 16:03 zefhemel

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

thinkbig1979 avatar Mar 25 '24 09:03 thinkbig1979

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

zefhemel avatar Apr 20 '24 14:04 zefhemel

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.

thinkbig1979 avatar Apr 22 '24 06:04 thinkbig1979

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.

zefhemel avatar Apr 30 '24 13:04 zefhemel

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

thinkbig1979 avatar May 02 '24 12:05 thinkbig1979

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

asitemade4u avatar May 09 '24 13:05 asitemade4u

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?

zefhemel avatar May 14 '24 07:05 zefhemel

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

thinkbig1979 avatar May 14 '24 08:05 thinkbig1979

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?

zefhemel avatar May 14 '24 08:05 zefhemel

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

thinkbig1979 avatar May 14 '24 08:05 thinkbig1979

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

zefhemel avatar May 14 '24 09:05 zefhemel

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

thinkbig1979 avatar May 14 '24 11:05 thinkbig1979

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.

zefhemel avatar May 14 '24 15:05 zefhemel

Yes! That did the trick! Thanks Zef!

thinkbig1979 avatar May 15 '24 06:05 thinkbig1979

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

asitemade4u avatar May 15 '24 12:05 asitemade4u

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.

zefhemel avatar May 30 '24 16:05 zefhemel