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

Spotify-qt cannot start/detect librespot and spotifyd #263

Open
Skorrr opened this issue Oct 12, 2024 · 4 comments
Open

Spotify-qt cannot start/detect librespot and spotifyd #263

Skorrr opened this issue Oct 12, 2024 · 4 comments

Comments

@Skorrr
Copy link

Skorrr commented Oct 12, 2024

When attempting to start librespot I get:
"QCoreApplication::postEvent: Unexpected null receiver"

Otherwise when starting the app I'm authenticated but I have the following errors:

Qt: Session management error: None of the authentication protocols specified are supported
propsReply "An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.193\" (uid=1000 pid=60452 comm=\"spotify-qt\" label=\"snap.spotify-qt.spotify-qt (enforce)\") interface=\"org.freedesktop.DBus.Properties\" member=\"GetAll\" error name=\"(unset)\" requested_reply=\"0\" destination=\"org.freedesktop.NetworkManager\" (uid=0 pid=2497 comm=\"/usr/sbin/NetworkManager --no-daemon\" label=\"unconfined\")"
nmReply "An AppArmor policy prevents this sender from sending this message to this recipient; type=\"method_call\", sender=\":1.193\" (uid=1000 pid=60452 comm=\"spotify-qt\" label=\"snap.spotify-qt.spotify-qt (enforce)\") interface=\"org.freedesktop.NetworkManager\" member=\"GetDevices\" error name=\"(unset)\" requested_reply=\"0\" destination=\"org.freedesktop.NetworkManager\" (uid=0 pid=2497 comm=\"/usr/sbin/NetworkManager --no-daemon\" label=\"unconfined\")"
"Object path cannot be empty"

Maybe related to the apparmor configuration of the snap package?

I tried with compiling the package from stable branch, in this case the "start client" button seems to work (only if I provide a username) and indicates the client is running, but I still get "Unexpected null receiver", devices list is empty, and the jack client that should have spawned isn't there.
Starting librespot manually does start it, I get the jack client, but the device is not detected.

@Skorrr Skorrr changed the title Spotify-qt not detecting librespot or spotifyd Spotify-qt cannot start librespot nor spotifyd Oct 26, 2024
@Skorrr Skorrr changed the title Spotify-qt cannot start librespot nor spotifyd Spotify-qt cannot start/detect librespot and spotifyd Oct 26, 2024
@ShmoobiJones
Copy link

ShmoobiJones commented Nov 1, 2024

Hey not sure if you're still struggling to get this working, but I had a similar problem.

I ended up entirely removing librespot, and setting up just spotifyd before messing with spotify-qt at all. If you haven't, give special attention to this part of the spotifyd docs. My config only consists of Username, Password, device_type, and device_name, although you can add some of the other config options as you wish. Once that is all set up and in its proper config location(/etc/xdg/spotifyd on my system, though doc says you can use your users .config directory), you should be able to run spotifyd and be logged in. From there, to check if it's working properly, I open spotify on my phone, play a song and connect it to the spotifyd speaker(mine is called 'shmoobi@spotifyd'). From there, you should just be able to open spotify-qt and it automatically detects you're running spotifyd, and you will be able to control spotify through spotifyqt.

In my case, the only way i get spotify-qt to detect spotifyd is if i connect to the spotifyd speaker through the spotify app on my phone, and I have to do this everytime I want to use spotify-qt/spotifyd. I'm not sure if there's a workaround, or if that's the intended way for it all to work, but it's how I do it and it seems to work everytime. When it's set up this way, you can ignore the spotify section in the spotify-qt settings, as spotify-qt will by default link itself to a running and configured spotifyd. No need to press start client, and in my case 'start with app' and 'always start' don't do anything, so you will need to start and connect to spotifyd through your phone or another true Spotify client each time, or set it up as a user systemd service. It sounds annoying but in reality it only takes about about a minute to get it all on and connected. I understand that the creator generally suggests using librespot, however I had some issues with login authentication. Librespot has recently had an update so perhaps it's better now, but spotifyd just works for me. Hopefully this help!

@Skorrr
Copy link
Author

Skorrr commented Nov 5, 2024

Hey @ShmoobiJones thanks for the feedback, I tried with Spotifyd but unfortunately it didn't work either.

Similar to you I can get Spotify-qt to detect the device by first launching the native spotify app which detects librespot/spotifyd, and only after connecting to it it gets in the list of available devices in Spotify-qt.
While this functions as a workaround, it really defeats the purpose of using Spotify-qt as a foss alternative frontend to official Spotify, plus it's a bit of a faff to have to do this everytime.

@kraxarn
Copy link
Owner

kraxarn commented Nov 30, 2024

If you're still having issues, could you try the app image build instead and see if that has the same issue?

@Skorrr
Copy link
Author

Skorrr commented Dec 17, 2024

Thanks @kraxarn for the response, in the end I don't really know what made me have to use the official app everytime in the beginning to have librespot show up. Now it shows up everytime on the manual build.

On a side note I realized several of the appearance styles that I have on the manual build are not available in the snap build you provide, don't know if it's intentionnal or not, just thought I'd mention it in case you didn't know. Anyway thanks for this great software, would be top notch if it could have discover weekly playlists accessible, but I guess it's because of API limiations. Nice as is though, runs even smoother since last patch!

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

3 participants