hezral / clips

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

Clips open and instantly closes #23

Closed diogopessoa closed 2 years ago

diogopessoa commented 2 years ago

When I click to open Clips or execute the keyboard shortcut, Clips opens and closes instantly. The apps in the Appcenter are all up to date.

What can I do?

hezral commented 2 years ago

Please open Terminal then run flatpak run com.github.hezral.clips and paste the output

diogopessoa commented 2 years ago

Follow the result:

2021-09-23 12:36:45.353784 startup Gtk-Message: 12:36:45.397: Failed to load module "canberra-gtk-module" 2021-09-23 12:36:45.402796 open_db Found ClipsDB [(0, 'main', '/home/diogo/.var/app/com.github.hezral.clips/cache/com.github.hezral.clips/com.github.hezral.clips.db')] 2021-09-23 12:36:45.881188 start load_clips Gtk-Message: 12:36:46.226: Failed to load module "canberra-gtk-module" Gtk-Message: 12:36:46.228: Failed to load module "canberra-gtk-module" Gtk-Message: 12:36:46.348: Failed to load module "canberra-gtk-module" Gtk-Message: 12:36:46.350: Failed to load module "canberra-gtk-module" Gtk-Message: 12:36:46.448: Failed to load module "canberra-gtk-module" Gtk-Message: 12:36:46.455: Failed to load module "canberra-gtk-module" Gtk-Message: 12:36:46.461: Failed to load module "canberra-gtk-module" Gtk-Message: 12:36:46.463: Failed to load module "canberra-gtk-module" Gtk-Message: 12:36:46.556: Failed to load module "canberra-gtk-module" Gtk-Message: 12:36:46.558: Failed to load module "canberra-gtk-module" Gtk-Message: 12:36:46.560: Failed to load module "canberra-gtk-module" Gtk-Message: 12:36:46.562: Failed to load module "canberra-gtk-module" 2021-09-23 12:36:46.652410 finish load_clips Gtk-Message: 12:36:46.785: Failed to load module "canberra-gtk-module" Gtk-Message: 12:36:46.787: Failed to load module "canberra-gtk-module" Gtk-Message: 12:36:46.870: Failed to load module "canberra-gtk-module" Gtk-Message: 12:36:46.872: Failed to load module "canberra-gtk-module" Gtk-Message: 12:36:46.967: Failed to load module "canberra-gtk-module" Gtk-Message: 12:36:46.972: Failed to load module "canberra-gtk-module"

hezral commented 2 years ago

Thanks. It looks like its running fine. Did you enabled hide on startup and disabled persistent mode?

diogopessoa commented 2 years ago

I had disabled hide on startup and persistent mode. The only one that was activated was always on top.

hezral commented 2 years ago

Can you quit and move this folder elsewhere /home/yourusername/.var/app/com.github.hezral.clips/config Then run the app again

diogopessoa commented 2 years ago

I did what you instructed and Clips opened again. Then I changed the settings for this:

clips_021-09-24 05-23-29

After that Clips opened and closed instantly. Again I restored the default Settings of Clips and left Persisnte Mode enabled. With this I realized that Clips works normally. Would that be a Bug?

I didn't want to use Clips with Persisnte Mode.

hezral commented 2 years ago

Persistent Mode when enabled means the Clips window will stay open util ESC key is pressed or the window is closed and Clips runs in the background.

Disabling Persistent Mode means when the window focus changes from Clips to another app window, Clips automatically closes the window and runs in the background.

Hide on startup is as it says, Clips window will not show when it is first launched and it will run in the background until it is called via shortcut key or launching it via the launcher.

It is intended behavior.

diogopessoa commented 2 years ago

I recorded a video to better demonstrate:

https://user-images.githubusercontent.com/12633864/134698253-a479c367-1b2d-4c6f-8b2b-764a99422058.mp4

when I deactivate Persistent Mode, Clips closes immediately without me doing any action.

hezral commented 2 years ago

Thanks. I can't seem to reproduce this. Can you leave the persistent mode disabled. Then run from terminal again to see the output from terminal. Make sure to close any running process of Clips before that.

Btw which version are you running?

diogopessoa commented 2 years ago

a screenshot before closing processes:

Captura de tela de 2021-09-24 21 10 50

and now after having closed all Clips processes:

https://user-images.githubusercontent.com/12633864/134751480-141115ba-c66c-4e67-9996-ef10f1f15d1e.mp4

The version 1.0.3 of Clips.

hezral commented 2 years ago

Thanks again. Can you uninstall, move the ~/.var/app/com.github.hezral.clips/config to another location, then install using the flatpak bundle here https://github.com/hezral/clips/suites/3870285586/artifacts/96282255

I updated the code for detecting window states which the persistent mode depends on.

diogopessoa commented 2 years ago

https://user-images.githubusercontent.com/12633864/134766925-21d39dc8-2a24-4f0a-a3e0-55f977bd3918.mp4

I did as you asked. Is there anything else I can do?

hezral commented 2 years ago

Thanks a lot. I'm not quite sure why its happening that way as i've tested on other machines and it works fine. Must be some conflict with your particular setup.

For now i guess the workaround is to keep Persistent Mode enabled.

If you don't mind, you could do a test with a new user account with no extra configs for the user account and see if it happens as well.

Btw, the flatpak bundle you've installed won't auto update so after you're done testing, you need to install the one from AppCenter.

I will keep the issue open in case there are other people facing the same issue.

diogopessoa commented 2 years ago

I have news.

I have identified that the Persistent Mode option, when not activated, has problems if Clips is not installed per-user applications. in my case i installed Flatpak apps system-wide. but now when I installed Clips per-user, it worked.

Captura de tela de 2021-09-26 20-40-52

Captura de tela de 2021-09-27 06-27-51

hezral commented 2 years ago

I see. How did you install it as system?

diogopessoa commented 2 years ago

Just add the Flathub repository to the system:

`flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo`

After this, you can choose in AppCenter whether you will want to install in per-user or system-wide mode. In my case, I prefer to install all apps with 'flathub system', because my /home is separated on HDD, and the system / is on SSD which is much faster.

hezral commented 2 years ago

i see. i don't know why persistent mode would behave differently if its installed system-wide.. i need to research a bit. the code itself is only checking active window and Clip's window state.

hezral commented 2 years ago

Can you trying using this daily build and see if the problem still exist? I've changed the whole code for handling the persistent mode.

https://github.com/hezral/clips/actions/runs/1333958172

diogopessoa commented 2 years ago

Now Clips works normally with Persistent Mode disabled or atived. Good work!

hezral commented 2 years ago

Cool, thanks for confirming. Next release will be out soon.