Reputation: 615
I'm unable to debug a freshly created app on physical iOS devices when pubspec dependencies reach a certain size, because it causes the "waiting for observatory port" step to timeout after 30 seconds.
Devices tested: iPhone 12, iPhone 12 Pro
iOS versions tested: 14.7.1, 14.5
The app runs properly on emulator but not on ios real device. How do I fix this issue?
Upvotes: 44
Views: 37004
Reputation: 419
I have encountered the same issue and following this process has fixed the problem for me on 14.7.1 and 14.8:
Uninstall the app
Restart the phone
Open the app using Xcode
Run 'flutter clean' for the project
Now it should work if you run it again.
If it still doesn't work you could try increasing the observatory timeout (the default appears to be 30 seconds):
localUri = await observatoryDiscovery.uri.timeout(const Duration(seconds: 30));
I'm not 100% sure why this problem appears inconsistently, but there is a lot of related discussion at the following link: https://github.com/flutter/flutter/issues/72161
Upvotes: 13
Reputation: 1961
in case you are running your flutter app on iOS by Wireless debug, you may have to wait 10 minutes until it's ready.
Upvotes: 0
Reputation: 2317
In My iPad case, It showed a white screen after compiling in the installing step for 5-10 minutes & it worked at the end without doing anything
Upvotes: 0
Reputation: 13853
run your project through Xcode, not from Xcode or Android Studio. it will show different error message.
when I run the Flutter project using Xcode, the error message was
"The sandbox is not in sync with the Podfile.lock..."
to solve this, I run pod install
on the ios folder. run these 2 commands below on your terminal
cd ios
pod install
Upvotes: 1
Reputation: 8999
For coders who are as lazy as me, you could take these steps:
Upvotes: 10
Reputation: 624
I have tried all the solutions here and for me the simplest works: move you Android Studio in the trash, download it and reinstall. for me the problem was with Android Studio 2021.1.1 Patch but I got there with several updates. a clean install solved the problem.
Upvotes: 0
Reputation: 411
Had the same problem after updating Xcode and running for the first time. As mentioned on the this github issue (https://github.com/flutter/flutter/issues/72161#issuecomment-994653225) I simply:
Upvotes: 37
Reputation: 4577
This Error message occur when your iPhone is busy processing something. For example as below.
If you run Flutter doctor you will see message as below.
Error: iPhone X is busy: Fetching debug symbols for iPhone X. Xcode will continue when iPhone X is finished. (code -10)
To confirm I opened xCode -> windows -> Devices and Simulator and it was showing the progress. Let the progress complete and then confirm by running Flutter doctor to make sure there is no error message.
Upvotes: 81
Reputation: 525
Try updating your Xcode and MacOS to the latest versions.
Upvotes: -4