Can't copy to clipboard

Hi,
I’ve been happily using silverbullet for a couple of months now. But I still encounter one problem. I can’t copy anything out of silverbullet using the CMD+S command for the share option.

I always get the following error in safari web browser and its PWA.:
Error running command: undefined is not an object (evaluating 'navigator.clipboard.writeText')

On Brave I get the following error:
Error running command: Cannot read properties of undefined (reading 'writeText')

On Firefox the error is:
Error running command: navigator.clipboard is undefined

So I guess the same thing on all of them.
Has anyone encountered this problem or knows a fix? Does it have to do with permissions? I’m running silverbullet selfhosted as a docker container.
I read that it could be something with https? I’m running it locally as http at the moment but could put it behind traefik with domain if necessary. Prefer the local way at the moment as I’m the only one accessing and I’m on VPN constantly anyway.

1 Like

I don’t use Brave, could this be a security restriction specifically to their browser? I use this on Chrome all the time and it works fine.

I found this: Big Regression: Latest version broke keyboard commands for copying text and pasting it · Issue #29074 · brave/brave-browser · GitHub

That seems to document this behavior. Apparently you can “fix it” by disabling a flag: Big Regression: Latest version broke keyboard commands for copying text and pasting it · Issue #29074 · brave/brave-browser · GitHub

Thanks for getting back. I tried those fixes you linked for Brave. It didn’t do it. But it happens on all browsers I tried.

I found this which I don’t know if it relates to it:

I’m using silverbullet through http as I have it running locally only and access it via vpn when away. I’ll have to try to put it behind traefik and maybe as https it will work then? Or is it working as http for you?

Ah right, yes that must be it. No I’m using it only on localhost http (where those security restrictions don’t apply) and HTTPS. http on a remote server is not a supported configuration, a bunch of things don’t work that way (like service worker, offline capability etc.)

1 Like