-
Notifications
You must be signed in to change notification settings - Fork 237
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
AirPlay receiver (macOS) not working with password based pairing #1385
Comments
Apple has many authentication schemes when it comes to Airplay, and from the log it isn't clear to me which one OwnTone is expected to use here. It looks like OwnTone is trying ATV device verification for Airplay 1, but that isn't working. My suggestion would be to force OwnTone to use Airplay 2 towards your mac. Then OwnTone will use a different pairing scheme that might work better. You force Airplay 2 by using the "raop_disable" setting in the config file. It is done per device, so you will be doing it just for your mac. Any other devices will be unaffected. If the setting is working you should see in the log that the messages related to session setup are marked with "airplay:" and not "raop:". Let me know how that works out. |
Thanks for your quick answer. Just tried what you said, doesn't seem to work, here are the according logs trying to toggle the mac from web:
Maybe this Airplay Receiver feature on macOS is using another authentification scheme? What are your thoughts ? |
Ok, here you had "Require password" checked, right? What happens if you uncheck it, but still use Airplay 2? Do you then get the annoying popup? |
Yes, I had the require password checked. Testing now while unchecking it and still using Airplay 2. Here are the according logs:
Looks like the mac forces a new pairing after a moment. |
I shortened the log a bit, removed the irrelevant stuff. I'm confused why it says When you have unchecked the password requirement, and you connect from an iOS device, are you then also getting the prompt on the mac each time? (trying to establish if password auth is necessary to avoid the prompt). |
Thanks for your reply. So I did let it "rest" until today to retry. I tried to test it and check the logs in two steps (so that maybe it is more relevant). (My config is still raop_disable, and on the mac "anyone on the same network" without password) First test
Here are the logs (stripped to airplay: parts) of the steps above:
Second test For the second test I stopped the casting from the iOS, waited a few minutes and tried again.
Here are the according logs:
It looks like the mac keeps on denying "SETUP", could it be a new protocol? |
No, it's because the encryption key has become invalid. This could be because the mac doesn't support persistent pairing with PIN, as the status flags indicate (notice it says PIN 0 and one-time-pairing 1). So I have to look into why OwnTone is going the PIN-route. |
Had a closer look at it, and now I understand why OwnTone is doing as it is. Your mac is announcing "one time pairing" required, which should mean that OwnTone should negotiate a key and then re-use it next time. That is also what OwnTone does, and the key works fine for immediate use, but for reasons I don't understand it doesn't work for subsequent use. It would be interesting to see what an iOS device does in this case, but it is complicated to test. I would need to test it myself, but I don't have a mac to test with. So bottom line is that right now I don't have a solution for you. :-( |
I understand. Nonetheless, thank you for your time! |
This old issue may have been fixed with commit e437e41, at least for when a password is set and Airplay 2 is used. If you are still around let me know if that is the case, otherwise I will close the issue later. |
I’ve been giving this a try, and am encountering the same issue. Here are some logs showing a switch from an Apple TV called "Living Room" to my Mac Mini, which is set to allow Airplay from anyone on the network, and has a password set.
When I switch devices, the Mac asks me if I want to allow the device to Airplay to it, even though I’ve already approved in the past. The config for the device is
|
Is the problem solved? |
Hello, first of all, thanks a lot for this software that is a real grail for anyone looking to have a working multi-room audio without having to buy expensive devices to do so. In my case I am setting up Owntone to cast to my Apple TV 4th gen and my iMac.
Casting to the Apple TV works flawlessly.
There are 3 options when it comes to cast to macOS: allowing only devices with the same Apple Id, allowing devices in the same network or everyone. There is also the possibility to set a password.
Since I believe Owntone do not manage passing some sort of Apple Id credentials to macOS, I am using "Anyone on the same network". Please correct me if Owntone actually manages this.
Without setting a password, pairing and casting from Owntone to macOS works great. The problem is that everytime I log off the mac, or restart it or leave it for a while without casting: there is an annyoing popup everytime Owntone tries to pair to the mac, that I need to click on.
I can't save my choice or "always allow" (searched on the internet about it). This is a problem in the sense that if I want to cast music, I absolutely need to be close to the Mac in order to allow Owntone to pair. If I deny or wait to long, the entity in the web interface "Remote & Outputs" unticks (and therefore unpairs?).
I then tried to setup a password from the mac. This way, Owntone doesn't allow me to pair with it, it doens't ask me for a password. And when toggling from the web interface I get this message:
Request failed (status: 500 Internal Server Error, url: http://myserver:3689/api/outputs/115444276454047/toggle)
Logs at the boot of Owntone:
I don't know if I interpret this correctly, but does this mean that Owntone does not detect the need for a password?
Logs when trying to toggle:
I also tried to add the password in the config file but I get the same logs, so it doesn't seem like it's trying to use it.
Is there any way I could try to force sending the password?
Any help is greatly appreciated.
Thanks.
Owntone version: 28.2
macOS version: 12.0.1 (Monterey)
The text was updated successfully, but these errors were encountered: