hezral / clips

Multi format clipboard manager with extra features
GNU General Public License v3.0
39 stars 1 forks source link

Can't copy anything [Fedora 36] #47

Open muhammadz0 opened 1 year ago

muhammadz0 commented 1 year ago

Here's the output with flatpak run com.github.hezral.clips --debug After copying some text

running in debug mode
waiting for clipboard event
Traceback (most recent call last):
  File "/app/share/com.github.hezral.clips/clips/cache_manager.py", line 311, in update_cache
    data_tuple = clipboard_manager.clipboard_changed(clipboard, event)
  File "/app/share/com.github.hezral.clips/clips/clipboard_manager.py", line 75, in clipboard_changed
    clipboard_contents = self.get_clipboard_contents(clipboard, event, active_app)
  File "/app/share/com.github.hezral.clips/clips/clipboard_manager.py", line 114, in get_clipboard_contents
    if "WPS" in active_app and not "WPS" in supported_target[2]:
TypeError: argument of type 'NoneType' is not iterable
Active App: (None, None)
Traceback (most recent call last):
  File "/app/share/com.github.hezral.clips/clips/cache_manager.py", line 311, in update_cache
    data_tuple = clipboard_manager.clipboard_changed(clipboard, event)
  File "/app/share/com.github.hezral.clips/clips/clipboard_manager.py", line 75, in clipboard_changed
    clipboard_contents = self.get_clipboard_contents(clipboard, event, active_app)
  File "/app/share/com.github.hezral.clips/clips/clipboard_manager.py", line 114, in get_clipboard_contents
    if "WPS" in active_app and not "WPS" in supported_target[2]:
TypeError: argument of type 'NoneType' is not iterable
Gtk-Message: 22:49:18.896: Failed to load module "canberra-gtk-module"
Gtk-Message: 22:49:18.896: Failed to load module "pk-gtk-module"
Active App: (None, None)
Current clipboard offers formats:  8
0 text/plain
1 text/plain;charset=utf-8
Current clipboard offers formats:  8
0 text/plain
1 text/plain;charset=utf-8
hezral commented 1 year ago

Are you running it on X11 or Wayland?

muhammadz0 commented 1 year ago

On Wayland via XWayland

hezral commented 1 year ago

It doesn't work on wayland. Haven't tested on xwayland either

muhammadz0 commented 1 year ago

well it did work sometime ago

muhammadz0 commented 1 year ago

Well, I reinstalled the app and elementary SDK, and now it doesn't show the error with --debug Only this, after copying text in Firefox (system):

Current clipboard offers formats:  12
0 text/x-moz-url-priv
1 text/plain
2 text/plain;charset=utf-8
3 text/_moz_htmlinfo
4 text/_moz_htmlcontext
5 text/html
hezral commented 1 year ago

so, you're running it on xwayland right. technically it would work since thats x11, try running it without the --debug and see what errors are showing up.

muhammadz0 commented 1 year ago

Ah, again:

Traceback (most recent call last):
  File "/app/share/com.github.hezral.clips/clips/cache_manager.py", line 311, in update_cache
    data_tuple = clipboard_manager.clipboard_changed(clipboard, event)
  File "/app/share/com.github.hezral.clips/clips/clipboard_manager.py", line 75, in clipboard_changed
    clipboard_contents = self.get_clipboard_contents(clipboard, event, active_app)
  File "/app/share/com.github.hezral.clips/clips/clipboard_manager.py", line 114, in get_clipboard_contents
    if "WPS" in active_app and not "WPS" in supported_target[2]:
TypeError: argument of type 'NoneType' is not iterable
hezral commented 1 year ago

thanks that narrows it. hmm are you trying to copy something in WPS Office? I havent update this part of the code for awhile and it worked when i tested it last time

muhammadz0 commented 1 year ago

nope, Firefox

hezral commented 1 year ago

hmm for all apps too?

muhammadz0 commented 1 year ago

yep, just tried Chromium (flatpak) and Nautilus

hezral commented 1 year ago

Ok, I'll try to reproduce this. Can you share your setup? OS, desktop environment

muhammadz0 commented 1 year ago

Fedora Linux 36 64-bit, GNOME 42.3, Wayland

hezral commented 1 year ago

Thanks

hezral commented 1 year ago

Can you try moving the cache folder ~/.var/app/com.github.hezral.clips somewhere else and restart the app?

I just tried on Fedora 36, Gnome 42, X11 and it's working fine

image

muhammadz0 commented 1 year ago

hmm, didn't work. I had already tried that multiple times. Also tried resetting the permissions. Didn't work

muhammadz0 commented 1 year ago

I tried it in X11 session, and it did work, however still the same on Wayland. Can you try on Wayland?

hezral commented 1 year ago

Wayland won't work as-is for this app. I'm working on a gnome shell extension version of Clips which will work on Wayland and X11

image

muhammadz0 commented 1 year ago

Sorry, I meant via XWayland

hezral commented 1 year ago

Which specific xwayland app did it worked with? Firefox, Chromium, Nautilus are all wayland not xwayland.

In any case, it wouldn't have worked to begin with really since the backend fully relies on X11 and won't start in Wayland.

muhammadz0 commented 1 year ago

ah sorry mb. Actually now that I remember, I used Code-OSS with XWayland, and it was the only app I used for Clips I think. Sorry my bad