Flatpak error: The name org.freedesktop.Accounts was not provided by any .service file

Hi there, just started to get this error when I try to run flatpaks, after a recent upgrade:

$ flatpak run com.discordapp.Discord
error: The name org.freedesktop.Accounts was not provided by any .service files

Similar error when I try to install one:

$ flatpak install org.signal.Signal
[... snip]
Error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files
error: Failed to install org.signal.Signal: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Accounts was not provided by any .service files

My configuration is here:

Though confirmed this also reproduces on my other devices with latest switch --upgrade (portable.nix, etc).

I do have:

  services.flatpak.enable = true;
  services.accounts-daemon.enable = true;
  xdg.portal.enable = true;
  xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
  hardware.opengl.driSupport32Bit = true;
  hardware.pulseaudio.support32Bit = true;

One tricky bit about my setup is I’m not using a desktop manager, just have a bespoke startx setup: nixfiles/x11.nix at a2d8610f489b319c0e0dd5be0f4647879ef7d614 · shazow/nixfiles · GitHub – could be some permutation of dbus environment is not setup properly, but everything else seems to work like before.

I haven’t seen this error mentioned anywhere yet, so mostly wanted to share it in case anyone else has run into it already. Will keep investigating.

I was able to trace it to the breaking generation on my desktop and diff it, in case it’s helpful: NixOS flatpak breaking generation diff · GitHub

looks like the diff isn’t super helpful, largely just shows it adds and removes the same version

I suspect it’s related to this recent PR that did some major related version bumps: flatpak: 1.4.2 → 1.6.1 by jtojnar · Pull Request #79416 · NixOS/nixpkgs · GitHub

I am unable to reproduce it.

Flatpak just uses AccountsService via D-Bus which should be enabled by services.accounts-daemon.enable = true;.

Thanks for the hint, I did add services.accounts-daemon.enable = true; but it didn’t do the trick alas: https://github.com/shazow/nixfiles/blob/d53793b6c88ef5cd929128f16949bd313241a4c1/common/desktop.nix#L81

Hmm. @jtojnar What desktop manager configuration are you using? (Is the config you attempted to reproduce with up on Github?)

I talked to two users on IRC who could reproduce the issue:

But at a glance, does it make sense this prevents things from running?
Like, from reading the code you’ve linked it doesn’t need AccountsService exclusively

How funny that the same question happens again #nixos on 2020-02-25 — irc logs.

1 Like

I suspect in my case it could be related to the way I launch the dbus session with the X11 process, will play around with it more this weekend.

There’s some issues with flatpak and the p11-kit on unstable/20.03 (apps are unable to connect to the internet etc), though your issue sounds a bit different. A p11-kit update is on its way to master: https://github.com/NixOS/nixpkgs/pull/80698.k

I did run into the connectivity issue as well, in a separate generation which didn’t include flatpak 1.6.x, but I rolled that back too for now. :slight_smile:

There was this also https://github.com/NixOS/nixpkgs/pull/80453, but I’ve backported that.
https://github.com/NixOS/nixpkgs/pull/80698 looks like a bugfix, I will purpose a backport.

Is there a github issue for this? I also have this problem.

I’ve opened one on github Flatpaks can't be run/installed without org.freedesktop.Accounts interface · Issue #81284 · NixOS/nixpkgs · GitHub

1 Like

Thanks for opening the issue, @worldofpeace!

@piotr-szegda Can you confirm whether services.accounts-daemon.enable = true; works for you?

@shazow: Yes and I don’t see any side effect.

services.accounts-daemon.enable = true; fixed the original org.freedesktop.Accounts error for me, but I now get an error from the Spotify Flatpak that mentions session, so I think it’s related to dbus. I tried flipping that permission, but it didn’t fix the error. I was also getting connection errors with Discord, which led me to the Manjaro forum, which led me to this issue with p11-kit. Maybe the Spotify issue is the same; it just might report it differently.

Until p11-kit is upgraded to 0.23.20 in nixpkgs, Discord and presumably other Flatpaks will not work, just to put it on the radar. Hope that gets fixed. Thanks!

The issue states we already have p11-kit update on it’s way to 20.03. It’s just in a staging branch.

1 Like

Oof, my bad. I started composing the message before actually finding the p11-kit issue, and then I guess I just finished it without ever reading the thread. Thanks!

Quick update: Looks like it’s all good now as long as services.accounts-daemon is enabled. Except for the recent Flatpak SSL cert issues.