Running this on Arch Linux with the clipcascade-bin (3.2.0) package from the AUR
After a system update that bumped python-xxhash from 3.8.1 to 4.0.1, ClipCascade stopped syncing clipboard content entirely - every send and every receive fails, logging:
ERROR - Failed to send data: Strings must be encoded before hashing
ERROR - Failed to receive data: Strings must be encoded before hashing
This happens regardless of whether E2E encryption is enabled or disabled, and with any clipboard content (including a fresh, simple string), which pointed to something running unconditionally in the send/receive path rather than the cipher logic.
It loos to stem from this in clipboard/clipboard_manager.py, hash_clipboard()
def hash_clipboard(clipboard: str) -> int:
return xxhash.xxh64(clipboard).intdigest()
This passes a raw str directly to xxhash.xxh64() without encoding it to bytes first. Older versions of python-xxhash tolerated this; as of 4.0.0 the library enforces bytes-only input and raises TypeError: Strings must be encoded before hashing when given a str. Since has_clipboard_changed() (which calls this) runs at the very start of both send() and _receive() in stomp_ws/stomp_manager.py, before the cipher_enabled check, it breaks all clipboard sync unconditionally once the newer xxhash is installed — no encryption or content variable required to reproduce it.
Fix for me was making this change.
def hash_clipboard(clipboard: str) -> int:
return xxhash.xxh64(clipboard.encode("utf-8")).intdigest()
Applying that one-line change locally (/usr/share/clipcascade/clipboard/clipboard_manager.py) immediately restores normal sync.
Running this on Arch Linux with the clipcascade-bin (3.2.0) package from the AUR
After a system update that bumped python-xxhash from 3.8.1 to 4.0.1, ClipCascade stopped syncing clipboard content entirely - every send and every receive fails, logging:
ERROR - Failed to send data: Strings must be encoded before hashingERROR - Failed to receive data: Strings must be encoded before hashingThis happens regardless of whether E2E encryption is enabled or disabled, and with any clipboard content (including a fresh, simple string), which pointed to something running unconditionally in the send/receive path rather than the cipher logic.
It loos to stem from this in clipboard/clipboard_manager.py, hash_clipboard()
This passes a raw str directly to xxhash.xxh64() without encoding it to bytes first. Older versions of python-xxhash tolerated this; as of 4.0.0 the library enforces bytes-only input and raises TypeError: Strings must be encoded before hashing when given a str. Since has_clipboard_changed() (which calls this) runs at the very start of both send() and _receive() in stomp_ws/stomp_manager.py, before the cipher_enabled check, it breaks all clipboard sync unconditionally once the newer xxhash is installed — no encryption or content variable required to reproduce it.
Fix for me was making this change.
Applying that one-line change locally (/usr/share/clipcascade/clipboard/clipboard_manager.py) immediately restores normal sync.