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

Doesn't save my configurations/Wont auto load #70

Closed
Devynko opened this issue Oct 24, 2020 · 11 comments · Fixed by flathub/io.github.antimicrox.antimicrox#7
Closed

Doesn't save my configurations/Wont auto load #70

Devynko opened this issue Oct 24, 2020 · 11 comments · Fixed by flathub/io.github.antimicrox.antimicrox#7
Assignees
Labels
bug Something isn't working

Comments

@Devynko
Copy link

Devynko commented Oct 24, 2020

Like the title says, It is not saving my configurations.

I am clicking the save as, naming the config, then saving. When I open my files, its not there.

Configuration
I am using elementary os, and I have downloaded the App Center version 3.1.2

@Devynko Devynko added the bug Something isn't working label Oct 24, 2020
@Devynko
Copy link
Author

Devynko commented Oct 24, 2020

I fixed the issue by setting the profile directory to /home/devyn/.var/app/io.github.antimicrox.antimicrox

@Devynko Devynko closed this as completed Oct 24, 2020
@Gildum
Copy link

Gildum commented Apr 4, 2021

Thanks for the tip Devynko! I had the exact same issue on MX Linux 19.3 and your solution works! I'm using AntiMicroX version 3.1.5

By default the profiles were saved in the /home directory and the created files were hidden and have weird names:
.xdp_example1.SBDI10
.xdp_example2.XVLY00

Saving the profiles in any other directory also results in the same issue. But now that they are saved in .var/app/io.github.antimicrox.antimicrox/ the profiles are not hidden and properly named:
example3.gamecontroller.amgp

So since it does seem like a bug, wouldn't it be best to reopen this issue?

@pktiuk
Copy link
Member

pktiuk commented Apr 4, 2021

It is definitely a bug. I think this is also caused by flatpak packaging. Just like #123.
Maybe we should just change accessibility setting and grant antimicrox access to filesystem.

@pktiuk pktiuk reopened this Apr 4, 2021
@pktiuk
Copy link
Member

pktiuk commented Apr 4, 2021

@gombosg What do you think? Could you take care of it?

@gombosg
Copy link
Collaborator

gombosg commented Apr 12, 2021

Yes, I'll take a look. :)

@gombosg
Copy link
Collaborator

gombosg commented Apr 18, 2021

@pktiuk I was able to repro this. This is only in Flatpak version.
When saving a config file

  • If you give it no extension, or not .amgp extension, it would save like .xdp-filename.gamecontroller.amgp-EAK6bq
  • If you give it .amgp extension manually, it saves the file correctly.

I need to figure out how this works, but IMO it's not a flatpak permission issue. (Some portal issue probably)

On non-flatpak, native, the file is always named with the correct extension.

@gombosg
Copy link
Collaborator

gombosg commented Apr 18, 2021

We need to look at what this is doing since this is the save as window. It might not be able to properly access files for renaming, in a flatpak context.

@gombosg
Copy link
Collaborator

gombosg commented Apr 18, 2021

I narrowed down the problem area to this.

Basically, it renames the file by adding an extension to it when the user hasn't set any.

What happens is that the flatpak doesn't have access to the host file system, but the file chooser portal makes the selected file available:

The selected files will be made accessible to the application via the document portal, and the returned URI will point into the document portal fuse filesystem in /run/user/$UID/doc/.

Looks like, we get a reference to the selected file as an URI, but when we rename it, we start pointing to a file that doesn't exist in the "portal fuse FS".

Let's play with QFileDialog...

@gombosg
Copy link
Collaborator

gombosg commented Apr 18, 2021

I tried manually setting the suffix, with no success.

Damn, found 2 related bugs, which point to many other:
flatpak/xdg-desktop-portal-gtk#191
flatpak/xdg-desktop-portal#496

Looks like this issue is not fixed.

I also tried setting a default file name, but it also didn't show up in the dialog.

The only workaround I currently see is setting filesystem=home access in the Flatpak manifest. Which is discouraged. 🤷🏽‍♂️

@pktiuk
Copy link
Member

pktiuk commented Apr 21, 2021

The only workaround I currently see is setting filesystem=home access in the Flatpak manifest. Which is discouraged.

I think we should do it, at least until flatpak will fix this.
But before doing it we should check safety of this change. Will changing filesystem affect currrent users and their saves? What will happen during update containing this change?

@gombosg
Copy link
Collaborator

gombosg commented Apr 29, 2021

There is no risk, so I'm releasing the new version with filesystem=home.

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

Successfully merging a pull request may close this issue.

4 participants