kasmtech / KasmVNC

Modern VNC Server and client, web based and secure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KasmVNC client errors something about `clipboard-read` when connected

roobre opened this issue · comments

Describe the bug

Upon connecting to the web URL, a KasmVNC error shows up:
image

'clipboard-read' (value of 'name' member of PermissionDescriptor) is not a valid value for enumeration PermissionName.</div><div class="noVNC_stack">connect@https://slicer.printer.terabox.moe/vnc/dist/main.bundle.js:24353:29
start@https://slicer.printer.terabox.moe/vnc/dist/main.bundle.js:23126:10
424/prime/&lt;/&lt;/&lt;@https://slicer.printer.terabox.moe/vnc/dist/main.bundle.js:23063:21

Additionally (maybe unrelated), every time I click on the screen, no matter whether it is a left or right click, a context menu with a single Paste item shows up:
image

If I dismiss this menu (by clicking elsewhere), it does not come again until the cursor exits the VNC viewport and enters again.

System Description

I'm using KasmVNC as a part of https://github.com/linuxserver/docker-cura. I chose to report the issue here as it does not seem particularly related to the application included in the container, but rather to KasmVNC itself.

root@kubeklipper-cura-6d6d9d9f99-dlhvs:/# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

root@kubeklipper-cura-6d6d9d9f99-dlhvs:/# uname -a
Linux kubeklipper-cura-6d6d9d9f99-dlhvs 6.6.15-2-lts #1 SMP PREEMPT_DYNAMIC Fri, 02 Feb 2024 17:04:24 +0000 x86_64 GNU/Linux

KasmVNC Details

root@kubeklipper-cura-6d6d9d9f99-dlhvs:/# Xvnc -version

Xvnc KasmVNC 1.2.0 - built Feb 10 2024 21:43:15
Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
See http://kasmweb.com for information on KasmVNC.
Underlying X server release 12014000, The X.Org Foundation

To Reproduce
Steps to reproduce the behavior (for non-installation issues):

  1. Open the URL where KasmVNC is configured to listen on

Expected behavior
No error should pop up.

Browser

  • Device: PC
  • OS: Linux
  • Browser: Firefox
  • Version: Mozilla/5.0 (X11; Linux x86_64; rv:124.0) Gecko/20100101 Firefox/124.0

@roobre thank you for reporting the issue. Unfortunately, I am unable to replicate the issues on our own builds. Linuxserver builds KasmVNC on their own and the line numbers in your error message don't quite line up with our versioned release of 1.2.0, so I am not exactly sure...

I am using Ubuntu Jammy as my client and connecting to an Ubuntu Jammy Kasm Workspace image running KasmVNC 1.2.0. I am using Firefox version 123.0 as the client.

Generally speaking though, we do not ask for permission to the clipboard on Firefox, because Firefox does not support the Clipboard API. Your version of Firefox shows 124.0, but that version is not available, so I suspect you are running a dev preview or something. Can you try a standard version of Firefox, which should be 123.0. Perhaps Firefox has changed something with respect to the permissions API in 124 that is causing us to fail.

That's unfortunate :(

I do think we're in the right track with the clipboard thing though, if I open the client using Chromium none of the two weird things happen (neither the error nor the strange context menu).

Your version of Firefox shows 124.0, but that version is not available, so I suspect you are running a dev preview or something.

That is correct, I daily drive Firefox developer edition which is based on the beta version of Firefox. I gave it a try on Firefox 123.0 and, just like Chrome, no issues there. For the sake of completeness, I tried this on a --safe-mode window of Firefox 124 and the issue is still there, so I don't think one of my addons is causing this.

To summarize:

  • Chromium: ✅ No error
  • Firefox 123: ✅ No error
  • Firefox developer edition (124): ❌ Error
  • Firefox developer edition --safe-mode (124): ❌ Error

Do you think it would be worth for you to try to reproduce this on your side using Firefox developer edition? It could be that firefox has recently made changes with the clipboard API, and in that case users of the non-developer version might get affected as well when the current beta gets promoted.

As a workaround, on FF 124.0b4 setting dom.events.asyncClipboard.clipboardItem to false seems to get rid of the error window, and doing the same for dom.events.asyncClipboard.readText prevents the annoying context menu item from appearing on every click. This might break clipboard functionality in other websites though.

Can confirm, also had this issue on 125.0b4 (64-bits) but was fixed when upgrading to 125.0b7 (64-bits)

maybe this fixed it:
https://bugzilla.mozilla.org/show_bug.cgi?id=1877400

This issue was fixed in the latest release of KasmVNC

clipboard-read (value of 'name' membe rof PermissionDescriptor) is not a valid value for enumartion PermissionName
I got this error message out of the blue on 1.14.0 and cannot click it away. I thought upgrading to 1.15.0 it will resolve it. But no, it is still there with following workspace

Debian
Thunderbird
Discord
Tor Browser.

Screenshot_2024-06-22-16-12-49_17888

I am running this on a VPS debian bookworm based.

commented
image image

firefox 127.0.1
kasm 1.3.1
ubuntu 22.04

The problem still exists.

@mmcclaskey
I still experience this issue on my windows + firefox installation using ubuntu jammy by kasmweb:
grafik
grafik

Anything I can do?