-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Running iOS app gets stuck on "Waiting for VM Service port to be available..." when EXECUTABLE_NAME and PRODUCT_NAME don't match #129246
Comments
Hi @GrzesiekZbozien. Thanks for filing this issue. I can confirm this issue is only reproducible on vscode and not on Android Studio or XCode. flutter doctor -v
|
@vashworth this is interesting... |
I'm able to reproduce this locally. I'll see if I can pinpoint the issue. |
I haven't tried Android Studio or Xcode, but FWIW in the original report it seemed like it was only from VS Code and worked from the terminal - but that's because "worked" meant "the app became visible" (whereas in VS Code it was just a white screen). This was just a symptom of VS Code starting the app paused (so failing to get a VM Service meant the app was never unpaused). The issue does actually occur from the terminal but because the app isn't started paused (unless you pass I don't know if that's what happened with AS/Xcode above, but thought it worth noting (my notes on looking at this are at Dart-Code/Dart-Code#4593 (comment)). |
Thanks for clarifying |
Okay so I've identified the issue. So this issue is occurring because the demo code has a custom EXECUTABLE_NAME. Flutter does not handle the custom name and therefore this issue occurs. Workaround: Make sure the EXECUTABLE_NAME and PRODUCT_NAME match. Long term solution: Flutter should handle the custom executable name by getting it from the build settings and adding it here:
So something like if (appName != null) '(processImagePath ENDSWITH "$appName" OR processImagePath ENDSWITH "$executableName")', |
@vashworth thanks. Workaround did a trick.
Thanks all involved for helping :) |
I have this exact error and am not sure how to fix it. Where do we set EXECUTABLE_NAME? It is not in my project at all except for macos which I am not even supporting. |
@BenjiFarquhar are you using xcodegen? |
Is there an existing issue for this?
Steps to reproduce
flutter run -v -d iphone --target lib/main_test1.dart --flavor test1
Initially issue reported here: Dart-Code/Dart-Code#4593 but seems like flutter issue nor dart-code
Expected results
iOS app starts.
Actual results
App gets stuck at:
Waiting for VM Service port to be available...
Running app form Xcode works just fine.
Code sample
Code sample
Created project here:
https://github.com/GrzesiekZbozien/tst-flutter
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: