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?
The flood of reports of this issue usually coincides with the iOS updates. Long app launch times is a commonly reported problem when there's a pending iOS update on your test device, or when your test device is running a newer OS than the one shipped with Xcode.
How to Fix App Not Opening on iPhone 1. Turn Off iPhone and Back On:. The very basic thing you can do is trying shut down your iPhone and booting it, I had... 2. Check App Updates:. Sometimes there might be issue with the current version of app and most of times developers fix... 3. Force Quit App:. ...
The issue isn't a crash, it's an observatory timeout while debugging. There is no code to reproduce an observatory timeout. You are using a different OS, mobile device and probably not my same computer specs. The flood of reports of this issue usually coincides with the iOS updates.
Deleting and re-installing the app can fix app crash on iPhone most of the time, you can simply do that by: Go to your "Home Screen". Find the app you want to delete, press and hold it for some seconds. App icon will start to wobble, press the "X" mark on top of the icon and delete the app. Now you can head to "'App Store".
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.
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
For coders who are as lazy as me, you could take these steps:
Open xcode for the project:
Run the project from xcode:
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:
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With