Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copying to clipboard is broken on Wayland #6812

Closed
1 task done
mirenradia opened this issue Nov 6, 2023 · 20 comments · Fixed by #7508
Closed
1 task done

Copying to clipboard is broken on Wayland #6812

mirenradia opened this issue Nov 6, 2023 · 20 comments · Fixed by #7508
Labels
bug desktop Desktop Application

Comments

@mirenradia
Copy link

mirenradia commented Nov 6, 2023

Steps To Reproduce

  1. Launch with the flags --enable-features=UseOzonePlatform --ozone-platform=wayland (to enable native Wayland mode)
  2. Log in.
  3. Open an entry in Bitwarden.
  4. Click the button to copy something (e.g. username/password).
  5. Inspect system clipboard or attempt to paste copied item.

Expected Result

The item is successfully copied to clipboard.

Actual Result

The item is not copied to the clipboard.

Screenshots or Videos

No response

Additional Context

This was not a problem before I updated to 2023.10.0 (e.g. on 2023.9.3). I have tested the downgrading fixes the problem.

Here is some information about my system:

KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.110.0
Qt Version: 5.15.11
Kernel Version: 6.5.9-200.fc38.x86_64 (64-bit)
Graphics Platform: Wayland

I am using the RPM package downloaded from the release tab in this repo.

Operating System

Linux

Operating System Version

Fedora Linux 38 (KDE)

Installation method

Other

Build Version

2023.10.0

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
@mirenradia mirenradia added bug desktop Desktop Application labels Nov 6, 2023
@pffont
Copy link

pffont commented Nov 8, 2023

Not sure if it's related, but in my case I can copy to clipboard but can't paste using mouse wheel, only with CRLT+V.
I noticed it after upgrade to version 2023.10.1

@mirenradia
Copy link
Author

Still broken on 2023.10.1 for me.

@wpost
Copy link

wpost commented Nov 11, 2023

For what it's worth, I see the same behavior (items are not copied to the clipboard) using 2023.10.0 and 2023.10.1 even though I'm on X11 (openSUSE 15.3, using AppImage). Like the original reporter, downgrading to 2023.9.3 fixes it for me.

@solopasha
Copy link

Works for me after enabling the wayland-data-control feature of the arboard crate. https://github.com/solopasha/bitwarden_flatpak/blob/build-from-source/wayland-clipboard.patch

@almereyda
Copy link

almereyda commented Nov 13, 2023

@solopasha Could you provide some instructions on how to build a release from your FlatPak, or offer those changes upstream in a Pull Request against flathub/com.bitwarden.desktop?

Apart from that, I can only confirm that downgrading and pinning helped to resolve the clipboard issue.

flatpak remote-info --log flathub com.bitwarden.desktop
sudo flatpak update --commit=d484e7474b902fb30a39acafd054b2027cf6ec4acca65266319e517a9fdce902 com.bitwarden.desktop
sudo flatpak pin com.bitwarden.desktop//d484e7474b902fb30a39acafd054b2027cf6ec4acca65266319e517a9fdce902

When looking at the commit log, it also became visible that there were many changes in the Wayland-related area, which each on their own could explain the regression observed here (https://github.com/flathub/com.bitwarden.desktop/commits/master).

  1. 2023-10-20 Flatpak runtime upgrade from 22.08 to 23.08 flathub/com.bitwarden.desktop@0ba81cb
  2. 2023-11-02 Bitwarden upgrade to 2023.10.0 flathub/com.bitwarden.desktop@e18bf45
  3. 2023-11-07 Bitwarden upgrade to 2023.10.1 flathub/com.bitwarden.desktop@58755ae
  4. 2023-12-12 Wayland by default, disable X11 socket, activate fallback-X11 flathub/com.bitwarden.desktop@1eef6b2

Any of these could have gone wrong, and two come with environmental side-effects, especially the Flatpak upgrade. I suspect it is a combination of the recent change of the underlying Flatpak runtime, the change to a new Bitwarden runtime and some configuration issues with the Flatpak sockets.

@ghisvail
Copy link
Contributor

Works for me after enabling the wayland-data-control feature of the arboard crate. https://github.com/solopasha/bitwarden_flatpak/blob/build-from-source/wayland-clipboard.patch

Did you forward the proposed changes upstream?

@solopasha
Copy link

Did you forward the proposed changes upstream?

I didn't. Because I don't want to test it on X11 or other platforms.

amarshall added a commit to amarshall/nixpkgs that referenced this issue Nov 14, 2023
amarshall added a commit to amarshall/bitwarden-clients that referenced this issue Jan 10, 2024
@justin13888
Copy link

I use Bitwarden with a completely different way. I use Fedora on Wayland Gnome, running Bitwarden installed through Flatpak. But it works. So could it be some bug for your particular setup?

@amadeushaessler
Copy link

amadeushaessler commented Jan 15, 2024

Same issue here on Arch on Wayland (Hyprland). I'm using the official package from the Arch Repository (2024.1.0).

@cmvanb
Copy link

cmvanb commented Jan 15, 2024

I also have this issue on Arch (river wm). It's a must-have feature IMO. I downgraded to 2023.9.2-1, the last version which works.

I use Bitwarden with a completely different way. I use Fedora on Wayland Gnome, running Bitwarden installed through Flatpak. But it works. So could it be some bug for your particular setup?

The flatpak is not an official distribution of Bitwarden, it's community maintained.

@djsmith85 djsmith85 linked a pull request Jan 15, 2024 that will close this issue
@justin13888
Copy link

My Bitwarden client version (distributed as through that community-maintained Flatpak) is 2024.1.0. I haven't been on Arch for a while so can't say about the state of the package. OP says they are on KDE Fedora. Regardless, I'm unable to replicate the issue, and so I was wondering if it could be an issue particular to only some Wayland setups.

@flaviocamilo
Copy link

Same issue here, on Wayland, but using Sway (--ozone-platform-hint=auto and verified by swaymsg -t get_tree that it is correctly on Wayland) on Gentoo. Bitwarden version 2023.12.0. Previous (and working) version installed was 2023.7.1, so I can't say in which version between the bug was introduced. Official package from the distribution (no Flatpak).

Getting the following error in log:

Error occurred in handler for 'clipboard.read': [Error: The clipboard contents were not available in the requested format or the clipboard is empty.] {
  code: 'GenericFailure'
}

@Duckrinium
Copy link

Duckrinium commented Feb 2, 2024

[small workaround for now]

I tried to drag and drop username/password blocks into app fields and that did fill fields, so if you can do this, here is that workaround while issue is up, hope that helps to ease the bothersome select-copy-paste :)

@rodhfr
Copy link

rodhfr commented Feb 9, 2024

The issue persists with the Flatpak, however, today I successfully installed the Bitwarden package version 2024.2.0-1 via pacman, and the copy-paste functionality is now working. I'm using Hyprland 0.24.0.

@kristanner2015
Copy link

I'm still having this problem with 2024.2.0 on gentoo KDE Plasma Wayland. I use the AppImage and copy-paste has been broken since 2023.10. I wasn't even aware you could drag-and-drop fields from the app. That does appear to work.

@dani-garcia
Copy link
Member

Hey everyone, the Wayland fix mentioned here and in PR #7508 is merged now and should be available in release 2024.3.0, which should fix all the wayland clipboard copy issues.

@bzar
Copy link

bzar commented Mar 13, 2024

Just installed 2024.3.0 from flathub, copy still not working on Sway.

@mirenradia
Copy link
Author

I know the flatpak isn't officially supported but FWIW it works for me on KDE Plasma 5.27.10.

@kristanner2015
Copy link

Confirm the copy paste functionality is working now with AppImage client under KDE Plasma on Wayland with latest 2024.3.0 release.

@bzar
Copy link

bzar commented Mar 14, 2024

Okay, tested 2024.3.0 from pacman and it works. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug desktop Desktop Application
Projects
None yet
Development

Successfully merging a pull request may close this issue.