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

Settings cannot be saved in linux mint for flatpack #599

Open
taltamir opened this issue Aug 2, 2023 · 11 comments
Open

Settings cannot be saved in linux mint for flatpack #599

taltamir opened this issue Aug 2, 2023 · 11 comments
Labels
bug Something isn't working

Comments

@taltamir
Copy link

taltamir commented Aug 2, 2023

Bug description
Settings cannot be saved in linux mint for flatpack.

Steps to reproduce
Install and run crow translate.
Either
A. make changes in main window then restart the program. all changes lost
B. open settings and make any changes there. hit ok. get error and changes you made to settings are lost.

Expected behavior
Settings getting saved.

Screenshots
crow translate

Environment

  • OS: Linux Mint
  • Desktop environment: 21.2 Cinnamon
  • Crow Translate version: 2.10.8
  • Installed as Flatpack from Flathub, via built in GUI software manager
@taltamir taltamir added the bug Something isn't working label Aug 2, 2023
@Shatur
Copy link
Member

Shatur commented Aug 2, 2023

The app is trying to register itself for autostart but is failing because flatpak doesn't allow it.
@gasinvein looks like it fails to detect that the app is inside the flatpak?

Also I would recommend to update to 2.10.10 because 2.10.8 have broken selection translation.

@gasinvein
Copy link
Contributor

The app is trying to register itself for autostart but is failing because flatpak doesn't allow it.
@gasinvein looks like it fails to detect that the app is inside the flatpak?

Nah, it tries to communicate with the background portal (which means it has properly detected flatpak sandbox) but fails.

@taltamir is xdg-desktop-portal installed and running? What version is it?

Also I would recommend to update to 2.10.10 because 2.10.8 have broken selection translation.

Ugh, I guess we should just allow successful update builds to be published automatically.

@Shatur
Copy link
Member

Shatur commented Aug 3, 2023

Ugh, I guess we should just allow successful update builds to be published automatically.

Sounds awesome. Should we automate it using GitHub Actions?

@gasinvein
Copy link
Contributor

Ugh, I guess we should just allow successful update builds to be published automatically.

Sounds awesome. Should we automate it using GitHub Actions?

No, Flathub's update bot already submits PRs following upstream project updates. It's just a matter of flipping a setting to tell the bot that said PRs should be also merged on successful build.

@Shatur
Copy link
Member

Shatur commented Aug 3, 2023

Oh, got it. Sounds like a reasonable choice.

@taltamir
Copy link
Author

taltamir commented Aug 3, 2023

@taltamir is xdg-desktop-portal installed and running? What version is it?

thank you. it is installed. version:
1.14.4-1ubuntu2~22.04.1

Ugh, I guess we should just allow successful update builds to be published automatically.

That kind of automation does make a lot of sense.
It updated crow to v2.10.10

It still gives me that error when changing anything in the settings menu. However, it now correctly auto saves main window changes between sessions.
By main window settings I mean clicking the box "auto translate" and adding the languages hebrew and english to both the source and the destination quicklist.

Before today's update to crow those settings were lost each time I restarted. Now they are preserved.
... although. thinking about it, it might have been because I actually restarted the machine before. While this time I ordered crow to quit first. giving it an opportunity to save those changes in a way that restarting mint would not.

let me go test this real quick by adding another language and then calling a machine restart while crow remains running

@taltamir
Copy link
Author

taltamir commented Aug 3, 2023

I confirmed that the problem remains. I just added afrikans to destination languages on main interface and then restart the OS and the change was lost on system reboot.

It now appears to me that the "issue" I reported is actually 2 separate issues.

issue 1: can't change settings in the settings menu (not just the launch on boot setting. any setting I tried in the settings menu gives that error)

issue 2: language, and autotranslate checkbox, changes on main interface are saved correctly. but only if when and if you use the [Quit] button in the system tray. When restarting the OS those changes are lost as the [Quit] button was not pressed and thus did not trigger save.
I honestly think those should be saved as soon as they are made rather than waiting for the [Quit] button to be pressed.

@gasinvein
Copy link
Contributor

@taltamir is xdg-desktop-portal installed and running? What version is it?

thank you. it is installed. version: 1.14.4-1ubuntu2~22.04.1

It appears that 1.14 is too old and doesn't provide the required interface, see flatpak/xdg-desktop-portal#1014

@taltamir
Copy link
Author

taltamir commented Aug 4, 2023

It appears that 1.14 is too old and doesn't provide the required interface, see flatpak/xdg-desktop-portal#1014

thank you. I am looking into it further on mint side of things to get mint updated to v1.16 (latest official release).

I will also investigate some other linux distros and see when they switched (or if they switched) from 1.14 to v1.16.

out of curiosity. what method did crow translate use before 1.16? as that version is only from 4 months ago.
if a bunch of linux distros are affected it might be worthwhile to probe the version of xdg-desktop-portal and fallback to the old method in case 1.16 is unavailable.

hmm... or maybe, can flathub be set to note such compatibility problems and automatically use an older version of crow translate on affected OS? Or does flathub only keep a single latest version?
I looked into it casually a bit and I am not seeing a method to do this via flatpack. but I barely know anything about flatpack so maybe there is.

@gasinvein
Copy link
Contributor

what method did crow translate use before 1.16?

In flatpak Crow Translate didn't have a working autostart method in before the portal one.

as that version is only from 4 months ago.

No, xdg-desktop-portal 1.16 was released in December, while Crow Translate added support for it in May.

@taltamir
Copy link
Author

taltamir commented Sep 4, 2023

In flatpak Crow Translate didn't have a working autostart method in before the portal one.

What about the rest of the settings menu? It is not just autostart, any setting you try to change fails

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

3 participants