cherrytree icon indicating copy to clipboard operation
cherrytree copied to clipboard

[Bug] Copy-Paste works fine within CherryTree, but it doesn't work if its any other application.

Open PranavBhattarai opened this issue 2 years ago • 17 comments

CherryTree 0.99.53
Fedora Workstation 37
Wayland, GNOME ver 43.2

Neither the shortkey (i.e. Ctrl + C) nor right-clicking any word to copy-and-paste works.

Screencast from 2023-01-18 14-08-42.webm

In the video above, I have tried to copy a text named "data" a couple of times and tried to paste it into a note editor but it doesn't work/respond. But if you try to copy-paste words inside CherryTree, it does work correctly.

Edit: doesn't ---> does (typo)

PranavBhattarai avatar Jan 18 '23 08:01 PranavBhattarai

I have a virtual machine with Fedora 37 Gnome Wayland so I tried this but couldn't reproduce using the default text editor as recipient. Is this happening systematically for you or only some times?

giuspen avatar Jan 25 '23 12:01 giuspen

Is this happening systematically for you or only sometimes?

No, a guy commented a day before yesterday. I got the email about his comments. But he/she deleted the comment for some reason, I guess. He/she said that he/she had to lunch the CherryTree with root permission (which is not a good approach).

This bug is so weird. I use ChatGPT (in Firefox) these days for documenting a lot of topics. And not being able to copy-paste the topics between two apps is really annoying/infuriating.

If I copy something from CherryTree to Firefox, nothing is pasted. If I copy something from Firefox to CherryTree, it works fine. Things should work vice-versa, but sadly its not the case. I can't copy anything outside is CherryTree.

Is there a flag/command that I can use in order to trace the bug, then do let me know. But this bug exists for real.

And, no, this happens quite a lot of time. In previous releases, there was a rare experience. But nowadays, it's so frequent, I can say, "This happens ALL the time".

PranavBhattarai avatar Jan 25 '23 23:01 PranavBhattarai

If instead of Copy (Ctrl+C) you use Copy as Plain Text (Shift+Ctrl+C) does it make any difference?

Would you be able to build cherrytree from the latest source code as described in https://github.com/giuspen/cherrytree#building-cherrytree-on-fedora and run from the terminal and report if you see differences? And also if you see any strange print on the terminal?

I did see the post later deleted. Can you also just for once and for sake of testing run as root cherrytree and see if that works?

giuspen avatar Jan 26 '23 21:01 giuspen

If instead of Copy (Ctrl+C) you use Copy as Plain Text (Shift+Ctrl+C) does it make any difference?

I tried both the Copy-As-Plain-Text option and shortkey (Shift+Ctrl+C), but I don't think it made any difference.

CherryTree launched from the terminal without root.

~ ❯❯❯ flatpak run net.giuspen.cherrytree
[2023-01-27 10:51:04.028] [gtk] [critical] Class::register_derived_type(): base_query.type_name is NULL.
[2023-01-27 10:51:04.033] [   ] [debug] /home/pranav/.var/app/net.giuspen.cherrytree/config/cherrytree/config.cfg parsed
[2023-01-27 10:51:04.130] [   ] [debug] autosave is started
[2023-01-27 10:51:04.368] [   ] [debug] Node name: Unit 10
[2023-01-27 10:51:33.231] [   ] [debug] shift images in MenuBar/context menu
[2023-01-27 10:52:04.216] [   ] [debug] autosave: no needs to save file
[2023-01-27 10:53:04.275] [   ] [debug] autosave: no needs to save file 

CheeryTree launched from the terminal with root.

root@x ~# flatpak run net.giuspen.cherrytree
[2023-01-27 10:56:04.080] [gtk] [warning] Couldn't connect to accessibility bus: Failed to connect to socket /run/user/1000/at-spi/bus: No such file or directory
Gtk-Message: 10:56:04.112: Failed to load module "canberra-gtk-module"
Gtk-Message: 10:56:04.112: Failed to load module "pk-gtk-module"
Gtk-Message: 10:56:04.122: Failed to load module "canberra-gtk-module"
Gtk-Message: 10:56:04.122: Failed to load module "pk-gtk-module"
[2023-01-27 10:56:04.122] [gtk] [critical] Class::register_derived_type(): base_query.type_name is NULL.
[2023-01-27 10:56:04.129] [   ] [warning] /root/.var/app/net.giuspen.cherrytree/config/cherrytree/config.cfg missing
[2023-01-27 10:56:04.558] [   ] [debug] autosave is started
[2023-01-27 10:56:14.495] [   ] [debug] shift images in MenuBar/context menu
[2023-01-27 10:56:35.890] [   ] [debug] Node name: Routine
[2023-01-27 10:56:46.439] [   ] [debug] Node name: Unit 1
root@x ~#

Can you also just for once and for sake of testing run as root cherrytree and see if that works?

@giuspen yes, copy-paste works if I launch CherryTree as root.

PranavBhattarai avatar Jan 27 '23 05:01 PranavBhattarai

Looks like an issue with flatpak and wayland. I shall attach a native package for you to try instead.

giuspen avatar Jan 27 '23 20:01 giuspen

Can you try https://www.giuspen.net/software/cherrytree-0.99.53.99~Fedora37_amd64.rpm It is marked as 0.99.53 but it is in fact the latest build, very very close to 0.99.54 If can be useful I'll release a package for Fedora37 as well in the 0.99.54 release that will happen on Sunday

giuspen avatar Jan 27 '23 20:01 giuspen

The domain is down or something? @giuspen I can't seem to visit the website, tried even google search to manually go to your official website.

Edit: Can you just upload the package here? I even tried using Chromium to see if the link opens or the main website opens. image Country: Nepal

PranavBhattarai avatar Jan 28 '23 13:01 PranavBhattarai

@PranavBhattarai hmm strange.. I can access the website without problems (Im from Germany). Perhaps the problem is connected with the geo-location somehow.. could you re-route your geolocation? BTW, nice to see that website is being maintained, just saw now new demo pics etc.

MJimitater avatar Jan 28 '23 13:01 MJimitater

@Mjimitater can you please upload the rpm package here?

Re-routing my geolocation means paid VPN service. And my country doesn't normally allow/support Paypal AFAIK.

I tried Tor Browser to see if the website works since it uses "Tor Network", but the result is the same. The website doesn't load.

PranavBhattarai avatar Jan 28 '23 13:01 PranavBhattarai

@PranavBhattarai I tried to upload the package here but without success. It allows me to upload such binaries only when I do the release ( https://github.com/giuspen/cherrytree/releases ). I plan to release tomorrow and I will create also a Fedora37 package is that ok? otherwise just send me an email privately and I will answer attaching the package. My email is in help--about dialog

giuspen avatar Jan 28 '23 19:01 giuspen

I downloaded the rpm package from my office network. But failed to install due to dependencies issues as you can see:

~/Downloads ❯❯❯ sudo rpm -i cherrytree-0.99.53.99_Fedora37_amd64.rpm                                                                ✘ 1
error: Failed dependencies:
	gtksourceviewmm3 is needed by cherrytree-0.99.53-1.x86_64
	libcurl-minimal is needed by cherrytree-0.99.53-1.x86_64
	libgtksourceviewmm-3.0.so.0()(64bit) is needed by cherrytree-0.99.53-1.x86_64
	libspdlog.so.1()(64bit) is needed by cherrytree-0.99.53-1.x86_64
	libxml++ is needed by cherrytree-0.99.53-1.x86_64
	libxml++-2.6.so.2()(64bit) is needed by cherrytree-0.99.53-1.x86_64
	spdlog is needed by cherrytree-0.99.53-1.x86_64
~/Downloads ❯❯❯                                

@giuspen Should I try to install all dependencies one by one?

Edit: The list is so big...

~/Downloads ❯❯❯ sudo dnf install gtksourceviewmm3 libcurl-minimal libgtksourceviewmm-3.0.so.0 libspdlog.so.1 libxml++ libxml++-2.6.so.2 spdlog
Fedora 37 - x86_64 - Updates                                                                           6.0 kB/s | 5.1 kB     00:00
Fedora 37 - x86_64 - Updates                                                                           153 kB/s | 2.2 MB     00:14
Fedora Modular 37 - x86_64 - Updates                                                                   3.9 kB/s | 4.2 kB     00:01
RPM Fusion for Fedora 37 - Free - Updates                                                              5.9 kB/s |  10 kB     00:01
RPM Fusion for Fedora 37 - Nonfree - Updates                                                           9.3 kB/s |  11 kB     00:01
Visual Studio Code                                                                                     831  B/s | 2.0 kB     00:02
Visual Studio Code                                                                                     3.6 MB/s |  32 MB     00:08
Dependencies resolved.

 Problem: problem with installed package libcurl-7.85.0-5.fc37.x86_64
  - package libcurl-minimal-7.85.0-5.fc37.x86_64 conflicts with libcurl(x86-64) provided by libcurl-7.85.0-5.fc37.x86_64
  - package libcurl-minimal-7.85.0-5.fc37.x86_64 conflicts with libcurl(x86-64) provided by libcurl-7.85.0-1.fc37.x86_64
  - cannot install the best candidate for the job
=======================================================================================================================================
 Package                                     Architecture            Version                            Repository                Size
=======================================================================================================================================
Installing:
 gtksourceviewmm3                            i686                    3.18.0-15.fc37                     fedora                   114 k
 libcurl-minimal                             i686                    7.85.0-5.fc37                      updates                  260 k
 libxml++                                    i686                    2.42.2-1.fc37                      fedora                   105 k
 spdlog                                      i686                    1.10.0-3.fc37                      fedora                   156 k
Installing dependencies:
 alsa-lib                                    i686                    1.2.8-2.fc37                       updates                  548 k
 at-spi2-atk                                 i686                    2.38.0-5.fc37                      fedora                    91 k
 at-spi2-core                                i686                    2.44.1-2.fc37                      fedora                   199 k
 atk                                         i686                    2.38.0-2.fc37                      fedora                   290 k
 atkmm                                       i686                    2.28.3-1.fc37                      fedora                    99 k
 avahi-libs                                  i686                    0.8-18.fc37                        updates                   72 k
 bzip2-libs                                  i686                    1.0.8-12.fc37                      fedora                    41 k
 cairo                                       i686                    1.17.6-2.fc37                      fedora                   721 k
 cairo-gobject                               i686                    1.17.6-2.fc37                      fedora                    17 k
 cairomm                                     i686                    1.14.4-1.fc37                      fedora                    69 k
 colord-libs                                 i686                    1.4.6-2.fc37                       fedora                   243 k
 cups-libs                                   i686                    1:2.4.2-5.fc37                     updates                  284 k
 dbus-libs                                   i686                    1:1.14.4-1.fc37                    updates                  166 k
 elfutils-libelf                             i686                    0.188-3.fc37                       updates                  203 k
 elfutils-libs                               i686                    0.188-3.fc37                       updates                  287 k
 flac-libs                                   i686                    1.3.4-2.fc37                       fedora                   235 k
 fmt                                         i686                    9.1.0-1.fc37                       fedora                   122 k
 fontconfig                                  i686                    2.14.1-2.fc37                      updates                  305 k
 freetype                                    i686                    2.12.1-3.fc37                      fedora                   418 k
 fribidi                                     i686                    1.0.12-2.fc37                      fedora                    89 k
 gdk-pixbuf2                                 i686                    2.42.10-1.fc37                     fedora                   491 k
 gdk-pixbuf2-modules                         i686                    2.42.10-1.fc37                     fedora                    90 k
 glib2                                       i686                    2.74.1-2.fc37                      fedora                   2.8 M
 glibc                                       i686                    2.36-9.fc37                        updates                  1.9 M
 glibmm2.4                                   i686                    2.66.5-2.fc37                      fedora                   732 k
 gmp                                         i686                    1:6.2.1-3.fc37                     fedora                   305 k
 gnutls                                      i686                    3.7.8-3.fc37                       updates                  1.1 M
 graphite2                                   i686                    1.3.14-10.fc37                     fedora                    96 k
 gsm                                         i686                    1.0.22-1.fc37                      fedora                    36 k
 gstreamer1                                  i686                    1.20.5-1.fc37                      updates                  1.5 M
 gtk3                                        i686                    3.24.36-1.fc37                     updates                  5.2 M
 gtkmm3.0                                    i686                    3.24.7-2.fc37                      fedora                   1.1 M
 gtksourceview3                              i686                    3.24.11-8.fc37                     fedora                   639 k
 harfbuzz                                    i686                    5.2.0-1.fc37                       fedora                   823 k
 jbigkit-libs                                i686                    2.1-24.fc37                        fedora                    53 k
 json-glib                                   i686                    1.6.6-3.fc37                       fedora                   166 k
 keyutils-libs                               i686                    1.6.1-5.fc37                       fedora                    32 k
 krb5-libs                                   i686                    1.19.2-13.fc37                     updates                  770 k
 lame-libs                                   i686                    3.100-13.fc37                      fedora                   341 k
 lcms2                                       i686                    2.14-1.fc37                        updates                  192 k
 libX11                                      i686                    1.8.1-2.fc37                       fedora                   671 k
 libXau                                      i686                    1.0.10-1.fc37                      fedora                    32 k
 libXcomposite                               i686                    0.4.5-8.fc37                       fedora                    24 k
 libXcursor                                  i686                    1.2.1-2.fc37                       fedora                    32 k
 libXdamage                                  i686                    1.1.5-8.fc37                       fedora                    22 k
 libXext                                     i686                    1.3.4-9.fc37                       fedora                    42 k
 libXfixes                                   i686                    6.0.0-4.fc37                       fedora                    20 k
 libXft                                      i686                    2.3.4-3.fc37                       fedora                    64 k
 libXi                                       i686                    1.8-3.fc37                         fedora                    42 k
 libXinerama                                 i686                    1.1.4-11.fc37                      fedora                    14 k
 libXrandr                                   i686                    1.5.2-9.fc37                       fedora                    29 k
 libXrender                                  i686                    0.9.10-17.fc37                     fedora                    29 k
 libXtst                                     i686                    1.2.3-17.fc37                      fedora                    21 k
 libasyncns                                  i686                    0.8-23.fc37                        fedora                    30 k
 libblkid                                    i686                    2.38.1-1.fc37                      fedora                   117 k
 libbrotli                                   i686                    1.0.9-9.fc37                       fedora                   317 k
 libcanberra                                 i686                    0.30-29.fc37                       fedora                    87 k
 libcap                                      i686                    2.48-5.fc37                        fedora                    68 k
 libcloudproviders                           i686                    0.3.1-6.fc37                       fedora                    47 k
 libcom_err                                  i686                    1.46.5-3.fc37                      fedora                    26 k
 libdatrie                                   i686                    0.2.13-4.fc37                      fedora                    33 k
 libepoxy                                    i686                    1.5.10-2.fc37                      fedora                   252 k
 libevent                                    i686                    2.1.12-7.fc37                      fedora                   279 k
 libffi                                      i686                    3.4.2-9.fc37                       fedora                    36 k
 libgcc                                      i686                    12.2.1-4.fc37                      updates                  118 k
 libgusb                                     i686                    0.4.3-1.fc37                       updates                   63 k
 libicu                                      i686                    71.1-2.fc37                        fedora                    10 M
 libidn2                                     i686                    2.3.4-1.fc37                       updates                  161 k
 libjpeg-turbo                               i686                    2.1.3-2.fc37                       fedora                   199 k
 libmount                                    i686                    2.38.1-1.fc37                      fedora                   141 k
 libnghttp2                                  i686                    1.51.0-1.fc37                      updates                   80 k
 libogg                                      i686                    2:1.3.5-4.fc37                     fedora                    34 k
 libpng                                      i686                    2:1.6.37-13.fc37                   fedora                   127 k
 libproxy                                    i686                    0.4.18-3.fc37                      fedora                    77 k
 libpsl                                      i686                    0.21.1-6.fc37                      fedora                    64 k
 libselinux                                  i686                    3.4-5.fc37                         fedora                    91 k
 libsepol                                    i686                    3.4-3.fc37                         fedora                   335 k
 libsigc++20                                 i686                    2.10.8-2.fc37                      fedora                    40 k
 libsndfile                                  i686                    1.1.0-4.fc37                       fedora                   240 k
 libsoup3                                    i686                    3.2.2-2.fc37                       updates                  407 k
 libstdc++                                   i686                    12.2.1-4.fc37                      updates                  853 k
 libstemmer                                  i686                    0-19.585svn.fc37                   fedora                    78 k
 libtasn1                                    i686                    4.19.0-1.fc37                      updates                   76 k
 libtdb                                      i686                    1.4.7-3.fc37                       fedora                    54 k
 libthai                                     i686                    0.1.29-3.fc37                      fedora                   214 k
 libtiff                                     i686                    4.4.0-4.fc37                       fedora                   215 k
 libtool-ltdl                                i686                    2.4.7-2.fc37                       fedora                    39 k
 libtracker-sparql                           i686                    3.4.2-1.fc37                       updates                  379 k
 libunistring                                i686                    1.0-2.fc37                         fedora                   551 k
 libunwind                                   i686                    1.6.2-5.fc37                       updates                   65 k
 libusb1                                     i686                    1.0.25-9.fc37                      fedora                    77 k
 libuuid                                     i686                    2.38.1-1.fc37                      fedora                    29 k
 libverto                                    i686                    0.3.2-4.fc37                       fedora                    21 k
 libvorbis                                   i686                    1:1.3.7-6.fc37                     fedora                   194 k
 libwayland-client                           i686                    1.21.0-1.fc37                      fedora                    33 k
 libwayland-cursor                           i686                    1.21.0-1.fc37                      fedora                    20 k
 libwayland-egl                              i686                    1.21.0-1.fc37                      fedora                    13 k
 libwebp                                     i686                    1.3.0-1.fc37                       updates                  293 k
 libxcb                                      i686                    1.13.1-10.fc37                     fedora                   252 k
 libxkbcommon                                i686                    1.4.1-2.fc37                       fedora                   145 k
 libxml2                                     i686                    2.10.3-2.fc37                      updates                  745 k
 libzstd                                     i686                    1.5.2-3.fc37                       fedora                   274 k
 lz4-libs                                    i686                    1.9.4-1.fc37                       updates                   70 k
 mpg123-libs                                 i686                    1.31.2-1.fc37                      updates                  353 k
 nettle                                      i686                    3.8-2.fc37                         fedora                   430 k
 openssl-libs                                i686                    1:3.0.5-3.fc37                     fedora                   2.1 M
 opus                                        i686                    1.3.1-11.fc37                      fedora                   204 k
 p11-kit                                     i686                    0.24.1-3.fc37                      fedora                   351 k
 pango                                       i686                    1.50.12-1.fc37                     updates                  357 k
 pangomm                                     i686                    2.46.3-1.fc37                      fedora                    75 k
 pcre2                                       i686                    10.40-1.fc37.1                     fedora                   234 k
 pixman                                      i686                    0.40.0-6.fc37                      fedora                   291 k
 pulseaudio-libs                             i686                    16.1-1.fc37                        fedora                   693 k
 sqlite-libs                                 i686                    3.40.0-1.fc37                      updates                  705 k
 systemd-libs                                i686                    251.10-588.fc37                    updates                  650 k
 xz-libs                                     i686                    5.4.1-1.fc37                       updates                  119 k
 zlib                                        i686                    1.2.12-5.fc37                      fedora                    92 k
Installing weak dependencies:
 dconf                                       i686                    0.40.0-7.fc37                      fedora                   113 k
 elfutils-debuginfod-client                  i686                    0.188-3.fc37                       updates                   41 k
 glib-networking                             i686                    2.74.0-1.fc37                      fedora                   208 k
 glibc-gconv-extra                           i686                    2.36-9.fc37                        updates                  1.7 M
 libcanberra-gtk3                            i686                    0.30-29.fc37                       fedora                    32 k
 openssl-pkcs11                              i686                    0.4.12-2.fc37                      fedora                    76 k
Skipping packages with conflicts:
(add '--best --allowerasing' to command line to force their upgrade):
 libcurl                                     x86_64                  7.85.0-1.fc37                      fedora                   304 k
 libcurl-minimal                             x86_64                  7.85.0-5.fc37                      updates                  239 k

Transaction Summary
=======================================================================================================================================
Install  127 Packages
Skip       2 Packages

Total download size: 51 M
Installed size: 171 M
Is this ok [y/N]: n
Operation aborted.
~/Downloads ❯❯❯

If I am not wrong, is this what people refer to as "dependencies hell"?! Conflicting packages... Is it safe to press yes?

PranavBhattarai avatar Jan 30 '23 04:01 PranavBhattarai

I'm surprised about the xorg libraries. It is safe though to install packages from the standard library.

giuspen avatar Jan 30 '23 12:01 giuspen

@giuspen Sorry I didn't install the above package but we have good news.

The bug seems to be resolved/healed in the new version of CherryTree 0.99.54. I can now copy-paste between CT and other apps (like Firefox). So I guess we can close this issue?

PranavBhattarai avatar Feb 02 '23 05:02 PranavBhattarai

Thank you @PranavBhattarai is it the 0.99.54 flatpak version working or the fedora native package that I built?

giuspen avatar Feb 02 '23 19:02 giuspen

@giuspen Flatpak

PranavBhattarai avatar Feb 03 '23 05:02 PranavBhattarai

Can this be reopened or I better to create a new one?

Ubuntu 22.04
Linux 6.5.0-1025-oem
CherryTree 1.1.4 (snap)
Wayland Gnome and KDE

Cannot copy text from CherryTree to any other APP. Can copy from others apps to CherryTree.

Nyanraltotlapun avatar Jul 17 '24 20:07 Nyanraltotlapun

Hi, I have the same problem but I can copy it into a text editor, browser and libreoffice. I can copy text to other programs if I run cherrytree in sudo.

DimShpInt avatar Sep 02 '24 06:09 DimShpInt