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

NixOS: blueman does not work: Unable to load plugin module NMDUNSupport, Unit blueman-mechanism.service not found #69555

Closed
tex opened this issue Sep 26, 2019 · 8 comments · Fixed by #70149

Comments

@tex
Copy link
Contributor

tex commented Sep 26, 2019

I did update to today's master and blueman stopped working. Any idea what to do?
I have hardware.bluetooth.enable = true in my configuration.nix.

milan@nixos> blueman-manager                                                                                                          ~
blueman-manager version 2.1.1 starting
Blueman applet needs to be running
milan@nixos> blueman-tray                                                                                                             ~
blueman-tray version 2.1.1 starting
There is an instance already running
milan@nixos> blueman-applet                                                                                                           ~
blueman-applet version 2.1.1 starting
blueman-applet 18.50.34 ERROR    PluginManager:90 load_plugin: Unable to load plugin module NMDUNSupport
Traceback (most recent call last):
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/main/NetworkManager.py", line 6, in <module>
    gi.require_version('NM', '1.0')
  File "/nix/store/3qhlqj9c98hv30qwcdv67355gqvl7s8s-python3.7-pygobject-3.32.1/lib/python3.7/site-packages/gi/__init__.py", line 129, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace NM not available

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/main/PluginManager.py", line 88, in load_plugin
    importlib.import_module(self.module_path.__name__ + ".%s" % plugin)
  File "/nix/store/k0igqpz995nmxwf6piyd5jjpcc7gcnyc-python3-3.7.4/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/plugins/applet/NMDUNSupport.py", line 3, in <module>
    from blueman.main.NetworkManager import NMDUNConnection
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/main/NetworkManager.py", line 8, in <module>
    raise ImportError('NM python bindings not found.')
ImportError: NM python bindings not found.
blueman-applet 18.50.34 ERROR    PluginManager:90 load_plugin: Unable to load plugin module NMPANSupport
Traceback (most recent call last):
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/main/NetworkManager.py", line 6, in <module>
    gi.require_version('NM', '1.0')
  File "/nix/store/3qhlqj9c98hv30qwcdv67355gqvl7s8s-python3.7-pygobject-3.32.1/lib/python3.7/site-packages/gi/__init__.py", line 129, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace NM not available

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/main/PluginManager.py", line 88, in load_plugin
    importlib.import_module(self.module_path.__name__ + ".%s" % plugin)
  File "/nix/store/k0igqpz995nmxwf6piyd5jjpcc7gcnyc-python3-3.7.4/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/plugins/applet/NMPANSupport.py", line 3, in <module>
    from blueman.main.NetworkManager import NMPANConnection
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/main/NetworkManager.py", line 8, in <module>
    raise ImportError('NM python bindings not found.')
ImportError: NM python bindings not found.
Terminating blueman-tray
blueman-applet 18.50.34 ERROR    BasePlugin:76 _load     : Error calling StartServiceByName for org.blueman.Mechanism: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit blueman-mechanism.service not found.
Traceback (most recent call last):
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/main/DBusProxies.py", line 36, in __init__
    self.init()
gi.repository.GLib.GError: g-io-error-quark: Error calling StartServiceByName for org.blueman.Mechanism: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit blueman-mechanism.service not found. (36)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/plugins/BasePlugin.py", line 70, in _load
    self.on_load()
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/plugins/applet/Networking.py", line 24, in on_load
    self.load_nap_settings()
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/plugins/applet/Networking.py", line 45, in load_nap_settings
    m = Mechanism()
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/main/DBusProxies.py", line 15, in __call__
    cls._instance = super().__call__(*args, **kwargs)
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/main/DBusProxies.py", line 44, in __init__
    object_path="/org/blueman/mechanism", systembus=True, *args, **kwargs)
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/main/DBusProxies.py", line 38, in __init__
    raise DBusProxyFailed(e.message)
blueman.main.DBusProxies.DBusProxyFailed: Error calling StartServiceByName for org.blueman.Mechanism: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit blueman-mechanism.service not found.
blueman-applet 18.50.34 ERROR    PluginManager:161 __load_plugin: Failed to load Networking
Traceback (most recent call last):
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/main/DBusProxies.py", line 36, in __init__
    self.init()
gi.repository.GLib.GError: g-io-error-quark: Error calling StartServiceByName for org.blueman.Mechanism: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit blueman-mechanism.service not found. (36)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/main/PluginManager.py", line 159, in __load_plugin
    inst._load()
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/plugins/AppletPlugin.py", line 57, in _load
    super()._load()
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/plugins/BasePlugin.py", line 70, in _load
    self.on_load()
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/plugins/applet/Networking.py", line 24, in on_load
    self.load_nap_settings()
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/plugins/applet/Networking.py", line 45, in load_nap_settings
    m = Mechanism()
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/main/DBusProxies.py", line 15, in __call__
    cls._instance = super().__call__(*args, **kwargs)
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/main/DBusProxies.py", line 44, in __init__
    object_path="/org/blueman/mechanism", systembus=True, *args, **kwargs)
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/main/DBusProxies.py", line 38, in __init__
    raise DBusProxyFailed(e.message)
blueman.main.DBusProxies.DBusProxyFailed: Error calling StartServiceByName for org.blueman.Mechanism: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit blueman-mechanism.service not found.
Traceback (most recent call last):
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/main/DBusProxies.py", line 36, in __init__
    self.init()
gi.repository.GLib.Error: g-io-error-quark: Error calling StartServiceByName for org.blueman.Mechanism: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit blueman-mechanism.service not found. (36)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/bin/..blueman-applet-wrapped-wrapped", line 43, in <module>
    BluemanApplet()
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/main/Applet.py", line 34, in __init__
    self.Plugins.load_plugin()
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/main/PluginManager.py", line 121, in load_plugin
    self.__load_plugin(cls)
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/main/PluginManager.py", line 159, in __load_plugin
    inst._load()
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/plugins/AppletPlugin.py", line 57, in _load
    super()._load()
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/plugins/BasePlugin.py", line 70, in _load
    self.on_load()
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/plugins/applet/Networking.py", line 24, in on_load
    self.load_nap_settings()
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/plugins/applet/Networking.py", line 45, in load_nap_settings
    m = Mechanism()
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/main/DBusProxies.py", line 15, in __call__
    cls._instance = super().__call__(*args, **kwargs)
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/main/DBusProxies.py", line 44, in __init__
    object_path="/org/blueman/mechanism", systembus=True, *args, **kwargs)
  File "/nix/store/x8l9w07cc6v7kk5nqjdmagfvvl94s31k-blueman-2.1.1/lib/python3.7/site-packages/blueman/main/DBusProxies.py", line 38, in __init__
    raise DBusProxyFailed(e.message)
blueman.main.DBusProxies.DBusProxyFailed: Error calling StartServiceByName for org.blueman.Mechanism: GDBus.Error:org.freedesktop.systemd1.NoSuchUnit: Unit blueman-mechanism.service not found.
[1] milan@nixos> blueman-tray version 2.1.1 starting                                                                                  ~
Stale PID, overwriting
blueman-tray version 2.1.1 starting
There is an instance already running
[1] milan@nixos>                                                                                                                      ~
[1] milan@nixos> blueman-manager                                                                                                      ~
blueman-manager version 2.1.1 starting
Blueman applet needs to be running
milan@nixos> 
@tex tex changed the title NixOS: blueman does not work: Unit blueman-mechanism.service not found NixOS: blueman does not work: Unable to load plugin module NMDUNSupport, Unit blueman-mechanism.service not found Sep 26, 2019
@tex
Copy link
Contributor Author

tex commented Sep 30, 2019

#69434 Does NOT fixes this problem.

@worldofpeace
Copy link
Contributor

@tex I think I'll have a PR to fix this incoming soon.

worldofpeace added a commit to worldofpeace/nixpkgs that referenced this issue Oct 1, 2019
worldofpeace added a commit that referenced this issue Oct 1, 2019
blueman declares NetworkManager gi bindings
as a required runtime dependency [0]

Fixes #69555

[0]: https://github.com/blueman-project/blueman/blob/531da47b06de3617492cc5ae5530ca8b3f2e12a4/Dependencies.md

(cherry picked from commit fcb84c5)
@ck3d
Copy link
Contributor

ck3d commented Oct 3, 2019

I run 19.09.git.810a568 (which includes #69434 and #70149) on my machine and I still have the same issue, blueman-mechanism.service is not found.
I added package blueman also into services.dbus.packages.

@tex
Copy link
Contributor Author

tex commented Oct 3, 2019

Confirm, I have the same problem.

@ck3d
Copy link
Contributor

ck3d commented Oct 3, 2019

blueman 2.1 has introduced the unit blueman-mechanism.service and is stored in ${pkgs.blueman}/lib/systemd/system . dbus is not searching in that folder.

@worldofpeace
Copy link
Contributor

Are any of you using the nixos service?

@ck3d
Copy link
Contributor

ck3d commented Oct 3, 2019

No, but thanks for your hint. Activating the service solved the issue!

@tex
Copy link
Contributor Author

tex commented Oct 3, 2019

Confirm, it works when the service is enabled!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants