mirror of
https://github.com/nickustinov/itsytv-macos.git
synced 2026-04-26 12:35:56 +03:00
[GH-ISSUE #12] Different homes, same Apple TV name, wrong credentials --> Server Identity Mismatch. #10
Labels
No labels
bug
enhancement
pending appstore release
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/itsytv-macos#10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @awjoyce on GitHub (Feb 7, 2026).
Original GitHub issue: https://github.com/nickustinov/itsytv-macos/issues/12
Originally assigned to: @nickustinov on GitHub.
Observed that when I pair a TV in one home, the system seems to think it is paired with the TV that has the same name in another home.
Analysis from Claude on what might be happening when switching between homes with TVs named the same.
Here's the diagnosis. Yes, this is a confirmed bug. The root cause is that device identity is keyed by the Bonjour
service name, which is the user-visible name (e.g., "Living Room"), not a unique hardware identifier.
The data flow
name is both the id and the name:
let device = AppleTVDevice(
id: service.name,
name: service.name,
...
)
(which equals device.name = service.name):
try KeychainStorage.save(credentials: credentials, for: deviceName)
if let credentials = KeychainStorage.load(for: device.id) {
credentials:
guard serverID == credentials.serverID else {
throw Error.identityMismatch // <-- THIS IS YOUR ERROR
}
What happens with same-named Apple TVs
When you have "Living Room" in Home A and "Living Room" in Home B:
Keychain key "Living Room"
Error.identityMismatch → "Server identity mismatch"
The fix
The Bonjour TXT record for _companion-link._tcp includes a unique device identifier (commonly the rpBA or
UniqueIdentifier field) that distinguishes hardware regardless of user-assigned name. The device ID should be derived
from one of these unique TXT record fields instead of service.name. This would make the Keychain key unique per
physical device rather than per display name.
@nickustinov commented on GitHub (Feb 9, 2026):
Fixed in 1.2.1
@Tledford-lab commented on GitHub (Feb 9, 2026):
Confirmed this has resolved my issue.