I have recently upgraded my flutter version in my app. But when I want to debug the application, it shows me the following error.
Error connecting to the service prot
No solution unless the Flutter guys fix it.
I'm having it on one machine (Mac OS Mojave) even when connecting physical iOS devices. Of course it happens too with emulated Android devices (no matter which one).
I've also having this problem in a different computer (MacOS Mojave too) with a physical Android device (with a very old Android version: 5.1).
flutter clean
does not fix it at all in my case(s).
First turning off your WiFi/Bluetooth.
And run below command:
flutter clean
And then quitting or restarting your emulator.
If you faced this issue on IOS build, follow th below steps
Goto Runner -> editSchema -> Run -> change build configurations to Debug.
if you are in Release mode you will face this issue, while running on android studio.
I've faced the same problem. Actually the problem was in the native code.
You can track the problem for android if you open an your_app/android project
from Android Studio and run it, the same for iOS -> open ios
project in XCode
So after I've fixed it the app run as intended
I hope this'd help
Like Vitaly says ..
I am also struggling to force this error at all when building through Xcode for iOS and I imagine the same goes for Android with Android studio..
For iOS do flutter build ios --release
and then open/run the project in Xcode
For Android do flutter build apk --release
and then open/run the project in Android Studio
It seems to be an issue when debugging through flutter ... I will update this answer if I find otherwise but it seems stable with this method