How to fix HttpException: Connection closed before full header was received

后端 未结 11 2641
不知归路
不知归路 2020-12-03 02:22

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

相关标签:
11条回答
  • 2020-12-03 03:05

    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).

    0 讨论(0)
  • 2020-12-03 03:08

    First turning off your WiFi/Bluetooth.

    And run below command:

    flutter clean
    

    And then quitting or restarting your emulator.

    0 讨论(0)
  • 2020-12-03 03:08

    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.

    0 讨论(0)
  • 2020-12-03 03:09

    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

    0 讨论(0)
  • 2020-12-03 03:12

    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

    0 讨论(0)
提交回复
热议问题