Youtube blocks SSDP multicast for other apps

I've found pretty interesting bug in YouTube app - it blocks SSDP multicast for other apps on tvOS.

Problem: If you run YouTube and then any other app that listens for SSDP packets if will fail with "Address already in use" error. Looks like Google devs forgot to add SO_REUSEPORT / SO_REUSEADDR to multicast listener.

Question: Can Apple force Google to fix tvOS YouTube app as it affects other apps?

Note: I already submitted bug report to Google, but I can't track it and probably I won't get any response.


Here is the code how I check it:

guard let multicastGroup = try? NWMulticastGroup(for: [ .hostPort(host: "239.255.255.250", port: 1900) ]) else {
    print("Failed to create multicast group")
    return
}

let connectionGroup = NWConnectionGroup(with: multicastGroup, using: .udp)
connectionGroup.setReceiveHandler() { [weak self] message, content, isComplete in
    print("Received message from \(String(describing: message.remoteEndpoint))")
    if let content = content, let message = String(data: content, encoding: .utf8) {
        print("Message: \(message)")
    }
}

connectionGroup.stateUpdateHandler = { newState in
    print("Group entered state \(String(describing: newState))")
}

connectionGroup.start(queue: .main)

Result:

Group entered state failed(POSIXErrorCode: Address already in use)

Can Apple force Google to fix tvOS YouTube app as it affects other apps?

Don’t interpret this to mean that I’m making any promises here, but please file a bug about this and then post your bug number here, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Don’t interpret this to mean that I’m making any promises here, but please file a bug about this and then post your bug number here, just for the record.

Thank you. The number is 9891973

Youtube blocks SSDP multicast for other apps
 
 
Q