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

Can't copy anything [Fedora 36] #47

Open
muhammadz0 opened this issue Aug 9, 2022 · 21 comments
Open

Can't copy anything [Fedora 36] #47

muhammadz0 opened this issue Aug 9, 2022 · 21 comments

Comments

@muhammadz0
Copy link

muhammadz0 commented Aug 9, 2022

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
Copy link
Owner

hezral commented Aug 9, 2022

Are you running it on X11 or Wayland?

@muhammadz0
Copy link
Author

On Wayland via XWayland

@hezral
Copy link
Owner

hezral commented Aug 10, 2022

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

@muhammadz0
Copy link
Author

well it did work sometime ago

@muhammadz0
Copy link
Author

muhammadz0 commented Aug 10, 2022

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
Copy link
Owner

hezral commented Aug 10, 2022

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
Copy link
Author

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
Copy link
Owner

hezral commented Aug 10, 2022

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
Copy link
Author

nope, Firefox

@hezral
Copy link
Owner

hezral commented Aug 10, 2022

hmm for all apps too?

@muhammadz0
Copy link
Author

yep, just tried Chromium (flatpak) and Nautilus

@hezral
Copy link
Owner

hezral commented Aug 10, 2022

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

@muhammadz0
Copy link
Author

Fedora Linux 36 64-bit,
GNOME 42.3,
Wayland

@hezral
Copy link
Owner

hezral commented Aug 10, 2022

Thanks

@hezral
Copy link
Owner

hezral commented Aug 12, 2022

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
Copy link
Author

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

@muhammadz0
Copy link
Author

muhammadz0 commented Aug 12, 2022

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

@hezral
Copy link
Owner

hezral commented Aug 13, 2022

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
Copy link
Author

Sorry, I meant via XWayland

@hezral
Copy link
Owner

hezral commented Aug 14, 2022

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
Copy link
Author

muhammadz0 commented Aug 14, 2022

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

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

No branches or pull requests

2 participants