Skip to content

[Mac-15] mDNS fails due to missing permission #166843

@vashworth

Description

@vashworth

Type of Request

bug

Infrastructure Environment

Recipes, devicelab

What is happening?

macOS 15 introduced Local Network Privacy support in macOS 15. This will prompt the user when you request access to devices on the local network (such as through mDNS).

However, there is no user in CI to give permission so it will hang and then on the next run it will fail

[2025-04-08 15:25:56.004714] [STDOUT] stderr: [   +9 ms] Flutter could not connect to the Dart VM service.
 [2025-04-08 15:25:56.004727] [STDOUT] stderr: 
 [2025-04-08 15:25:56.004730] [STDOUT] stderr:            Please ensure your IDE or terminal app has permission to access devices on the local network. This allows Flutter to connect to the Dart VM.
 [2025-04-08 15:25:56.004733] [STDOUT] stderr: 
 [2025-04-08 15:25:56.004734] [STDOUT] stderr:            You can grant this permission in System Settings > Privacy & Security > Local Network.
 [2025-04-08 15:25:56.004736] [STDOUT] stderr: 
 [2025-04-08 15:25:56.004737] [STDOUT] stderr:            SocketException: Send failed (OS Error: No route to host, errno = 65), address = 0.0.0.0, port = 5353

Flutter usually gets the Dart VM url from the device logs, which we get from either ios-deploy or idevicesyslog, depending on the iOS version. However, both of those tools are flakey so we use mDNS as a fallback for discovering the Dart VM url. We also have been considering using mDNS as the primary discovery method so we can reduce usage of iproxy by targeting the device IP (found via mDNS) directly.

Since there is no user in CI, we need to figure out how to give this permission.

https://developer.apple.com/videos/play/wwdc2024/10123/?time=1094

Steps to reproduce

Run any iOS test on macOS 15

Example:
#166781 (comment)

Expected results

I expect tests to pass

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listinfra: device labInfrastructure device lab problemsteam-infraOwned by Infrastructure teamtriaged-infraTriaged by Infrastructure team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions