You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
flutter attach fails to attach to macos app #183248
Create an app that runs on all platforms: flutter create some_app
Run flutter attach from the some_app/ directory
In another terminal, run flutter run -d macos from the some_app/ directory
Observe, the flutter attach command times out waiting for the VM service connection
If you happen to have a simulator open, and then repeat steps 2 & 3, flutter attach assumes it is waiting for a connection on the iOS simulator even though the app I'm trying to connect to was ran on the macos target.
If you happen to have a simulator open, and then repeat steps 2 & 3, flutter attach assumes it is waiting for a connection on the iOS simulator even though the app I'm trying to connect to was ran on the macos target.
That's likely because the Flutter tool will automatically select an open simulator instead of macos, if the device is not specified in the command. And flutter attach doesn't have a way of knowing if that's the correct device so it'll attempt to connect and fail/wait forever: #130623
Activity
vashworth commentedon Mar 4, 2026
That's likely because the Flutter tool will automatically select an open simulator instead of
macos, if the device is not specified in the command. Andflutter attachdoesn't have a way of knowing if that's the correct device so it'll attempt to connect and fail/wait forever: #130623jmagman commentedon Mar 4, 2026
Does
flutter attach -d macoswork?kenzieschmoll commentedon Mar 5, 2026
No it does not:
saurabh-mirajkar commentedon Mar 9, 2026
@vashworth thanks for the report. Labelling this for further investigation.
loic-sharma commentedon Mar 11, 2026
cc @knopp to see if you can reproduce.