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

Flatpak package doesn't load up #156

Closed
Mounium opened this issue Feb 2, 2018 · 9 comments
Closed

Flatpak package doesn't load up #156

Mounium opened this issue Feb 2, 2018 · 9 comments

Comments

@Mounium
Copy link

Mounium commented Feb 2, 2018

Installing it via flatpak on NixOS, I can't seem to start the app from command line with flatpak run com.github.wwmm.pulseeffects with the error below, but there doesn't seem to be a problem starting it from the Gnome Software Center.
I would not have opened this issue, but I've only now figured out that for some reason I can get it to work from within the software center, sorry for the inconvenience, although I don't quite now what command does the software center issue to start it up, it would be good to know.

Traceback (most recent call last):
  File "/app/lib/python3.5/site-packages/PulseEffects/application.py", line 83, in do_startup
    self.sie = SinkInputEffects(self.pm)
  File "/app/lib/python3.5/site-packages/PulseEffects/sink_input_effects.py", line 26, in __init__
    EffectsBase.__init__(self, self.pm.default_sink_rate, self.settings)
  File "/app/lib/python3.5/site-packages/PulseEffects/effects_base.py", line 24, in __init__
    PipelineBase.__init__(self, sampling_rate)
  File "/app/lib/python3.5/site-packages/PulseEffects/pipeline_base.py", line 64, in __init__
    self.audio_src.set_property('volume', 1.0)
AttributeError: 'NoneType' object has no attribute 'set_property'
Traceback (most recent call last):
  File "/app/lib/python3.5/site-packages/PulseEffects/application.py", line 185, in do_command_line
    self.do_activate()
  File "/app/lib/python3.5/site-packages/PulseEffects/application.py", line 169, in do_activate
    self.init_ui()
  File "/app/lib/python3.5/site-packages/PulseEffects/application.py", line 116, in init_ui
    self.sie.init_ui()
AttributeError: 'Application' object has no attribute 'sie'
@wwmm
Copy link
Owner

wwmm commented Feb 3, 2018

This error:

self.audio_src.set_property('volume', 1.0)
AttributeError: 'NoneType' object has no attribute 'set_property'

is happening because PE could not find GStreamer pulsesrc plugin that is from gst-plugins-good package. @AsavarTzeth may know what NixOS is missing

@AsavarTzeth
Copy link
Contributor

As far as I know it makes no difference how you launch a flatpak application. The only thing that comes to mind is that your shell environment might differ.

Dependencies are all included within the flatpak container, located under /app, or the org.gnome.Platform//3.26 runtime, under /usr. @Mounium could you check a few things for me?

  1. Is everything, including runtimes up-to-date, run flatpak update (without su/sudo)?
  2. What is the output of flatpak info com.github.wwmm.pulseeffects?

If you want to dig around inside the container environment you can easily do so:

flatpak run --command=sh com.github.wwmm.pulseeffects//stable

@Mounium
Copy link
Author

Mounium commented Feb 3, 2018

You are more than likely right about the different shell environments, on NixOS the gnome-software runs in a wrapper script. The issue might as well be closed as the flatpak service is currently really experimental on this distro, and I assume more problem will surface with more flatpak packages tested, although many seem to work just fine.

One more thing, after updating the flatpak packages, I tried uninstalling the pulseeffects app and reinstalling it with the --user option, in which case I couldn't even get it to start up from within gnome-software (same error as in the body of this issue). After uninstalling the local package and reinstalling the original, system one, it starts up correctly, but exits after a short while, here is the relevant journald
log https://gist.github.com/Mounium/d7148bb2f55ac5071fdaddc70d52dd9e

flatpak info:

Ref: app/com.github.wwmm.pulseeffects/x86_64/stable
ID: com.github.wwmm.pulseeffects
Arch: x86_64
Branch: stable
Origin: flathub
Date: 2018-01-25 19:17:17 +0000
Subject: Don't build lsp-plugins for i386 (x86) (04f36c04)
Commit: 5247c4989fa39081d4fd7bd85076e0bf77facfd8f560f9138b67ca47367aa93d
Parent: 2adeb0ddf2ff089e07d312638d595e11a5d9473f99140f7325ae2603662441ee
Location: /var/lib/flatpak/app/com.github.wwmm.pulseeffects/x86_64/stable/5247c4989fa39081d4fd7bd85076e0bf77facfd8f560f9138b67ca47367aa93d
Installed size: 107.8 MB
Runtime: org.gnome.Platform/x86_64/3.26

@AsavarTzeth
Copy link
Contributor

That is the latest commit at least. What version of flatpak are you using? (flatpak --version) I am guessing you are running the latest (0.10.3).

In any case, this is likely beyond what I am able to help with. Since it runs as usual on other distributions, I must assume it's a packaging or upstream flatpak issue.

You can find the upstream flatpak issue tracker here. Even if it isn't an upstream issue you can probably link it to an NixOS issue and get some collaboration going.

@Mounium Mounium mentioned this issue Feb 4, 2018
8 tasks
@jtojnar
Copy link
Contributor

jtojnar commented Feb 4, 2018

I am unable to reproduce this, either when installed globally or as a user.

@wwmm Does this require anything else than flatpak installed globally? Will the GStreamer not be a part of the platform downloaded by flatpak?

@Mounium What desktop environment do you use? On my system I had the pulseaudio plugin globally propagated to /var/run/current-system/sw/lib/gstreamer-1.0/libgstpulseaudio.so by sushi service. Though, Pulseffects seem to work even if I remove the global plugin installation.

@wwmm
Copy link
Owner

wwmm commented Feb 4, 2018

Looking at the flathub build instructions it seems that only gst-plugins-bad is being compiled https://github.com/flathub/com.github.wwmm.pulseeffects/blob/master/com.github.wwmm.pulseeffects.json. So it makes sense that the other GStreamer libraries are in a platform. @AsavarTzeth can better explain this

@Mounium
Copy link
Author

Mounium commented Feb 4, 2018

@jtojnar I'm using Gnome, and I do have gstreamer-1.0 available in the current runtime. I've tried different combinations of gstreamer plugins, but running it from a simple terminal prints the same error as in the issue.

I've just tried the same thing with xfce (with hardware.pulseaudio.enable = true) and it does work, although quickly quits with an assertion error.

@jtojnar
Copy link
Contributor

jtojnar commented Feb 4, 2018

@Mounium I just managed to run it on minimal (XTerm only) system, which confirms Flatpak is pretty stand-alone, so it probably is not a NixOS issue.

Virtual machine configuration
{ pkgs, config, ... }: {
  environment.systemPackages = with pkgs; [
    firefox
  ];

  services.xserver = {
    enable = true;
    layout = "cz";
    xkbVariant = "qwerty";

    desktopManager.xterm.enable = true;
  };

  services.flatpak.enable = true;
  hardware.pulseaudio.enable = true;

  users.extraUsers.j = {
    isNormalUser = true;
    uid = 1000;
    extraGroups = [ "wheel" "networkmanager" ];
    password = "";
    openssh.authorizedKeys.keys = ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDYbOlZydfRRCGCT08wdtPcpfSrgxMc6weDx3NcWrnMpVgxnMs3HozzkaS/hbcZUocn7XbCOyaxEd1O8Fuaw4JXpUBcMetpPXkQC+bZHQ3YsZZyzVgCXFPRF88QQj0nR7YVE1AeAifjk3TCODstTxit868V1639/TVIi5y5fC0/VbYG2Lt4AadNH67bRv8YiO3iTsHQoZPKD1nxA7yANHCuw38bGTHRhsxeVD+72ThbsYSZeA9dBrzACpEdnwyXclaoyIOnKdN224tu4+4ytgH/vH/uoUfL8SmzzIDvwZ4Ba2yHhZHs5iwsVjTvLe7jjE6I1u8qY7X8ofnanfNcsmz/ jtojnar@kaiser"];
  };

  virtualisation.memorySize = 1024;
  virtualisation.diskSize = 2048;
}

screenshot from 2018-02-04 23-50-53

@AsavarTzeth
Copy link
Contributor

AsavarTzeth commented Feb 5, 2018

So I will try to summarize and make a few things clear first:

  • Flatpak applications and runtimes are true OCI compliant containers. All files delivered are completely independent of your host system.
  • When I say "runtime" I am referring to Flatpak runtimes, in this case org.gnome.Platform 3.26.
  • GStreamer is provided by the org.gnome.Platform runtime.
  • Flatpak is, perhaps obviously, not responsible for working pulseaudio and dbus instances, which are required.

However, GStreamer in org.gnome.Platform is not built to support plugins with external dependencies (LADSPA, LV2, etc...). Because these are provided by gst-plugins-bad I need to rebuild that to support this and ship it with the application. The rest are still provided by org.gnome.Platform.

If for some reason parts of GStreamer is not found by PulseEffects I can only think of two reasons. Either org.gnome.Platform//3.26 it is not installed, or for some reason it cannot be found.

You can check what is installed with flatpak list.

@wwmm wwmm closed this as completed Mar 1, 2018
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

4 participants