cfangmeier / tuijam

A fancy TUI client for Google Play Music
MIT License
129 stars 9 forks source link

Mac Catalina 10.15.1 installation extra steps and machine-id missing? #53

Closed von closed 4 years ago

von commented 4 years ago

Installing on MacOS Catalina (10.15.1) had some extra steps:

% brew install gobject-introspection % brew install libffi % brew install mpv % PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig pip3 install tuijam

Then I'm running into the following failure after doing OAuth:

starting up. logging in. enabling external control. Traceback (most recent call last): File "/Users/von/.virtualenvs/tuijam/bin/tuijam", line 8, in sys.exit(main()) File "/Users/von/.virtualenvs/tuijam/lib/python3.7/site-packages/tuijam/app.py", line 605, in main app.mpris = setup_mpris(app) File "/Users/von/.virtualenvs/tuijam/lib/python3.7/site-packages/tuijam/mpris.py", line 230, in setup_mpris bus = SessionBus() File "/Users/von/.virtualenvs/tuijam/lib/python3.7/site-packages/pydbus/bus.py", line 60, in SessionBus return bus_get(Bus.Type.SESSION) File "/Users/von/.virtualenvs/tuijam/lib/python3.7/site-packages/pydbus/bus.py", line 19, in bus_get return Gio.bus_get_sync(type, None).pydbus gi.repository.GLib.Error: g-file-error-quark: Cannot spawn a message bus without a machine-id: Unable to load /usr/local/var/lib/dbus/machine-id or /etc/machine-id: Failed to open file “/usr/local/var/lib/dbus/machine-id”: No such file or directory (4)

cfangmeier commented 4 years ago

Hi @von, Thanks for reporting this. TUIJam uses dbus to implement some of the MPRIS spec for external control via command-line clients or UI integration. This apparently requires a machine-id file to be present at either /etc/machine-id or /usr/local/var/lib/dbus/machine-id. According to here, systemd is responsible for creating this file either during installation or boot. However, OSX doesn't use systemd so the file doesn't get created.

You could try creating it manually (you can see the spec for it at the previous link), but I think a better solution is to just not rely on dbus on OSX. Instead, we should either have no external control or use whatever system OSX typically uses.

For now, I'll just edit the exception handling so that this failure doesn't crash the app.

Also: If this fixes the problem and you get TUIJam working on OSX, can you provide a short installation guide that I can include in the README (similar to what you've written already, but with the app verified working)?

cfangmeier commented 4 years ago

Ok, try installing 0.6.3 and see if you still encounter the issue.

cfangmeier commented 4 years ago

@von, did the update fix your issue? Unless I hear otherwise I'll assume it did and close the issue. If it didn't, feel free to re-open and I can look more closely.

von commented 4 years ago

@cfangmeier Yes, it works now. Sorry for the slow response.