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 open file in certain kde runtime based apps #1276

Closed
eszlari opened this issue Dec 24, 2017 · 23 comments
Closed

Can't open file in certain kde runtime based apps #1276

eszlari opened this issue Dec 24, 2017 · 23 comments

Comments

@eszlari
Copy link

eszlari commented Dec 24, 2017

I can't open a file in the following kde runtime based apps:

  • io.mgba.mGBA (File -> Load ROM)
  • org.fedoraproject.MediaWriter (Custom image)
  • org.subsurface_divelog.Subsurface (File -> Open logbook)

It works in the following apps:

  • net.mediaarea.MediaInfo (wxwidgets, gnome runtime)
  • org.gnome.gedit (gnome runtime)
  • org.videolan.VLC (freedesktop runtime)
  • org.musescore.MuseScore (also kde runtime based, but working!)

Tested on Ubuntu 17.10 and Fedora 27.

@Alexander-Wilms
Copy link

I can't reproduce this in Subsurface. Was there a runtime update in the meantime?

@eszlari
Copy link
Author

eszlari commented Jan 8, 2018

I think, I found the cause. If you run:

$ flatpak run --command=sh org.subsurface_divelog.Subsurface

Then inside the sandbox:

$ rm /run/run/user/1000/flatpak-info
$ subsurface

Now the file open dialog pops up again normally.

KDE/flatpak-kde-runtime@d176712

static bool checkRunningUnderFlatpak()
{
#if QT_CONFIG(dbus)
    return !QStandardPaths::locate(QStandardPaths::RuntimeLocation, QLatin1String("flatpak-info")).isEmpty();
#else
    return false;
#endif // QT_CONFIG(dbus)
}

@grulja
Copy link
Contributor

grulja commented Jan 8, 2018

Should be fixed with the next KDE runtime update.

@eszlari
Copy link
Author

eszlari commented Jan 10, 2018

With the updated runtime all apps I tested worked, except one: org.fedoraproject.MediaWriter

@julianrichen
Copy link

@eszlari it should have been fixed with the KDE runtime update. You might want to notify @MartinBriza if that's the case here:
FedoraQt/MediaWriter#144

@eszlari
Copy link
Author

eszlari commented Jan 10, 2018

Maybe org.fedoraproject.MediaWriter needs to be rebuild against the updated runtime, I don't know. But since the trick to $ rm /run/user/1000/flatpak-info still works, I think its not the app's fault.

@grulja
Copy link
Contributor

grulja commented Jan 15, 2018

Can you please now verify with latest runtime? There should be an update with a fix which hopefully fixes this issue.

@eszlari
Copy link
Author

eszlari commented Jan 15, 2018

It works now.

@eszlari
Copy link
Author

eszlari commented Feb 7, 2018

@grulja After the rebuild of the kde runtime (flatpak/freedesktop-sdk-base#15), it seems, this bug is back again in a specific circumstance: Running https://github.com/flathub/org.kde.krita under KDE. Other Qt apps are not affected (as far as I tested) and under GNOME there's no problem.

@matwey
Copy link

matwey commented Jul 26, 2018

Hello,

I am still suffering this issue with while trying to prepare package for my application and the workaround still works for me.

Could you please reopen this?

@grulja
Copy link
Contributor

grulja commented Jul 26, 2018

Can you share your application? Which desktop do you use?

@matwey
Copy link

matwey commented Jul 26, 2018

I am running org.kde.Platform//5.9
The same happens for 5.11.

Package is here https://transfer.sh/NjxWC/space.fips.Fips.flatpak
Normally, the application raises open dialog at start.

@grulja
Copy link
Contributor

grulja commented Jul 26, 2018

It works for me. When I start it, it immediately opens a dialog.

@matwey
Copy link

matwey commented Jul 26, 2018

What flatpak version do you use? In my distro there is Flatpak 0.10.4

@grulja
Copy link
Contributor

grulja commented Jul 26, 2018

I use flatpak-0.99.3 at this moment, which will be future 1.0 release. Previously we had flatpak-0.11.x in Fedora and I'm pretty sure it worked with this version as well.

@grulja
Copy link
Contributor

grulja commented Jul 26, 2018

Actually, this is more related to xdg-desktop-portal and backend implementation of portals. What versions of xdg-desktop-portal and backend (xdg-desktop-portals-kde or xdg-desktop-portal-gtk) do you have?

@matwey
Copy link

matwey commented Jul 26, 2018

xdg-desktop-portal 0.10
xdg-desktop-portal-kde 5.12.5

@grulja
Copy link
Contributor

grulja commented Jul 27, 2018

Would be interesting to see DBus communication. Can you run "dbus-monitor --session" in a terminal and open your app? Then attach output from dbus-monitor here.

@matwey
Copy link

matwey commented Jul 27, 2018 via email

@grulja
Copy link
Contributor

grulja commented Jul 27, 2018

It looks like xdg-desktop-portal is not running, can you verify that? It should be started automatically, but you might have it installed in a wrong location and given that, it fails to autostart.

@matwey
Copy link

matwey commented Jul 27, 2018 via email

@matwey
Copy link

matwey commented Jul 28, 2018

Hi,

I've restarted my user systemd session, and now the dialog is opened. I cannot reproduce the issue anymore. Sorry for disturbing.

@eszlari eszlari closed this as completed Jul 28, 2018
@matthiasclasen
Copy link
Collaborator

Maybe org.fedoraproject.MediaWriter needs to be rebuild against the updated runtime, I don't know. But since the trick to $ rm /run/user/1000/flatpak-info still works, I think its not the app's fault.

Its not a 'trick', its just breaking the sandbox plumbing. But the fact that it is possible is a bug.
That file should be immutable inside the sandbox.

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

6 participants