Skip to content
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

DioError : HttpException: Connection closed before full header was received #8

Closed
trumanleung opened this issue Jun 6, 2020 · 15 comments
Assignees
Labels
status: done This issue is considered resolved. type: bug This issue reports a bug.

Comments

@trumanleung
Copy link

Running in an emulator, my Flutter app occasionally there will be an exception thrown:

Exception has occurred.
DioError (DioError [DioErrorType.DEFAULT]: HttpException: Connection closed before full header was received, uri = https://ps.pndsn.com/v2/subscribe/sub-c-81c1977e-15ff-11e5-b66b-02ee2ddab7fe/familyUser-22/0?tt=15914051777763439&tr=2&pnsdk=PubNub-Dart%2F1.1.3)

I understand that Dio is a dependency of this package. Do you have a working Flutter app example with code on Github that I can take a look at to see how to get past this DioError?

Flutter Doctor:

[✓] Flutter (Channel stable, v1.17.1, on Mac OS X 10.14.6 18G3020, locale en-US)
    • Flutter version 1.17.1 at /Users/trumanleung/flutter
    • Framework revision f7a6a7906b (3 weeks ago), 2020-05-12 18:39:00 -0700
    • Engine revision 6bc433c6b6
    • Dart version 2.8.2

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/trumanleung/Library/Android/sdk
    • Platform android-29, build-tools 29.0.2
    • ANDROID_HOME = /Users/trumanleung/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 11.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.3.1, Build version 11C504
    ! CocoaPods 1.7.5 out of date (1.8.0 is recommended).
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the
        Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To upgrade:
        sudo gem install cocoapods

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 42.0.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.45.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.10.2

[✓] Connected device (1 available)
    • iPhone 7 Plus • DE6389DF-156A-4D40-AD6C-02ED0BA182BD • ios • com.apple.CoreSimulator.SimRuntime.iOS-11-4 (simulator)
@are are added status: in triage This issue is being triaged. type: bug This issue reports a bug. labels Jun 9, 2020
@are are self-assigned this Jun 9, 2020
@are
Copy link
Contributor

are commented Jun 9, 2020

Hi there! Thanks for reporting the issue. Can you please provide what version of PubNub are you using? Also, if its possible, it would be great if you could include a snippet of code that contains pubnub.subscribe call.

@are are added the status: waiting This issue waits for feedback from author. label Jun 9, 2020
@trumanleung
Copy link
Author

trumanleung commented Jun 9, 2020

Thanks, Are. I'm experiencing this exception when running PubNub Dart SDK versions 1.1.0 or 1.1.3.

My code is something like this inside of an async function:

    String pubnubChannel = 'familyUser-' + session.familyUserId;
    pubnub = pn.PubNub(defaultKeyset: pn.Keyset(
      subscribeKey: pubNubSubscribeKey
    ));
    pubNubCallback = (Map messageData) {
      _handlePubNubEvent(messageData);
    };
    var sub = await pubnub.subscribe(channels: { pubnubChannel });
    sub.messages.listen((envelope) {
      print('${envelope.uuid} sent a message: ${envelope.payload}');
      pubNubCallback(envelope);
    });

When attempting to send pubnub notifications to that channel, I'm not seeing any print messages in the debug console.

The DioError HttpException occurs at line 963 of dio.dart.
throw assureDioError(e, options);

@are are added status: in progress This issue is being worked on. and removed status: waiting This issue waits for feedback from author. status: in triage This issue is being triaged. labels Jun 9, 2020
@trumanleung
Copy link
Author

Hello, Are. Any status on this problem?

@are
Copy link
Contributor

are commented Jun 22, 2020

So I am trying to replicate this but had no luck - is it possible that you are trying to resubscribe multiple times very quickly? It seems like it tries to subscribe again before the previous request has been sent and Dio throws an uncatchable error. Can you create a minimum replicable example?

@trumanleung
Copy link
Author

Based on your message, I checked my code and found that it was calling the subscription code two or three times before the first one completed. I tested for this and now it only does subscription once. However, the Dio exception still happens at odd times.

I don't have time to make a minimum replicable example because I'm trying to rollout a new version of our app.

@are
Copy link
Contributor

are commented Jun 30, 2020

So upon further investigation this is an issue with the Dio library - it cannot handle cancelling the request if the previous one hasn't been sent fully. This is hard to replicate, but I will be working on a fix (and possibly removing the Dio dependency altogether). Sorry for such a long wait!

@trumanleung
Copy link
Author

Thank you. Please update here again if and when you can replace Dio with something else. Much appreciated.

@devopsokdone
Copy link

devopsokdone commented Aug 16, 2020

We are facing the same problem, upon login, it throws exactly the same exception.

Closure: (dynamic, [RequestOptions]) => DioError from Function 'assureDioError':.

message=Connection closed before full header was received
url=https://ps.pndns.com/v2/subscribe/sub-c-hiddenValue/,/0?tt=15974730237958717&tr=7&channel-group=chatsAndMe%2CchatsAndMe-pnpres&uuid=hiddenValue&pnsdk=PubNub-Dart%2F1.4.2

Let us know if additional details from us can help, we are ok to show the entire code flow via an interactive session if it helps.

Here is some reading we had done on this error:
https://stackoverflow.com/questions/55879550/how-to-fix-httpexception-connection-closed-before-full-header-was-received

Also, we are facing one more issue which we think may be causing the connection to close while the app is running, while debugging we got this exception but as of now, we don't have a full trace of from where it is coming.
SocketException: OS Error: Connection timed out, errno = 110, address = ps.pndsn.com, port = 43840

Do we need to something like this ourselves OR this is done in PubNub SDK already?
https://stackoverflow.com/questions/59769939/how-to-handle-timeout-error-with-dio-in-flutter

@are
Copy link
Contributor

are commented Aug 19, 2020

There is an issue with Dio that we cannot be easily resolved. I am working on removing the Dio dependency altogether, but for that I need dart-lang/sdk#41904 to land first. It should happen until the end of the month.

Also, to prevent this issue, make sure to not call subscribe unguarded in a widget and try to avoid making fast resubscribes (like having multiple updates that trigger resubscription).

If this problem will be blocking you from further development, please contact our support team to setup an interactive session or a call and I will be happy to join in!

@are
Copy link
Contributor

are commented Sep 24, 2020

Good news! dart-lang/sdk#41904 has already landed, but its in the beta channel. I have begun the development of a networking module without Dio already, but it will have to wait for release until this feature lands in stable. Sit tight!

@flutterq
Copy link

flutterq commented Feb 2, 2021

Already Solved With All Possible Solution added [Solved] How to fix HttpException: Connection closed before full header was received

@are are added status: done This issue is considered resolved. and removed status: blocked status: in progress This issue is being worked on. labels Feb 16, 2021
@are
Copy link
Contributor

are commented Feb 16, 2021

We have removed dio as the dependency, so this issue may be resolved. If you still have this issue, please try solution posted above or create a new issue!

@are are closed this as completed Feb 16, 2021
@pubnub pubnub deleted a comment from flutterq Feb 17, 2021
@Adidi Adidi mentioned this issue Mar 3, 2021
@milanpurbia26
Copy link

i m facing same issue but unable to resolve it
here my flutter run -verbose
PS F:\flutter\newapp> flutter run --verbose
[ +99 ms] executing: [C:\Users\milan\Documents\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[+1017 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +2 ms] f4abaa0735eba4dfd8f33f73363911d63931fe03
[ +1 ms] executing: [C:\Users\milan\Documents\flutter/] git tag --points-at
f4abaa0735eba4dfd8f33f73363911d63931fe03
[ +70 ms] Exit code 0 from: git tag --points-at f4abaa0735eba4dfd8f33f73363911d63931fe03
[ ] 2.2.3
[ +9 ms] executing: [C:\Users\milan\Documents\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[ +55 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] origin/stable
[ ] executing: [C:\Users\milan\Documents\flutter/] git ls-remote --get-url origin
[ +51 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] https://github.com/flutter/flutter.git
[ +285 ms] executing: [C:\Users\milan\Documents\flutter/] git rev-parse --abbrev-ref HEAD
[ +44 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] stable
[ +118 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ +4 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +106 ms] executing: C:\Users\milan\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
[ +68 ms] List of devices attached
42001e37fc5a9209 device product:o5ltedd model:SM_G550FY device:o5lte transport_id:3
[ +11 ms] C:\Users\milan\AppData\Local\Android\sdk\platform-tools\adb.exe -s 42001e37fc5a9209 shell getprop
[ +136 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ +1 ms] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ +4 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +129 ms] Skipping pub get: version match.
[ +149 ms] Generating F:\flutter\newapp\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[ +76 ms] ro.hardware = universal3475
[ +1 ms] ro.build.characteristics = phone
[ +74 ms] Initializing file store
[ +13 ms] Skipping target: gen_localizations
[ +13 ms] complete
[ +8 ms] Launching lib\main.dart on SM G550FY in debug mode...
[ +9 ms] C:\Users\milan\Documents\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev
C:\Users\milan\Documents\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root
C:\Users\milan\Documents\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --incremental
--target=flutter --debugger-module-names --experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true
--output-dill C:\Users\milan\AppData\Local\Temp\flutter_tools.cf5d86c\flutter_tool.2c54e81c\app.dill --packages
F:\flutter\newapp.dart_tool\package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts
--track-widget-creation --filesystem-scheme org-dartlang-root --initialize-from-dill
build\3c113a45063dc6628e68a4111abcacad.cache.dill.track.dill --enable-experiment=alternative-invalidation-strategy
[ +18 ms] executing: C:\Users\milan\AppData\Local\Android\sdk\build-tools\30.0.3\aapt dump xmltree
F:\flutter\newapp\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
[ +92 ms] Exit code 0 from: C:\Users\milan\AppData\Local\Android\sdk\build-tools\30.0.3\aapt dump xmltree
F:\flutter\newapp\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
[ +1 ms] N: android=http://schemas.android.com/apk/res/android
E: manifest (line=2)
A: android:versionCode(0x0101021b)=(type 0x10)0x1
A: android:versionName(0x0101021c)="1.0.0" (Raw: "1.0.0")
A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1e
A: android:compileSdkVersionCodename(0x01010573)="11" (Raw: "11")
A: package="com.example.newapp" (Raw: "com.example.newapp")
A: platformBuildVersionCode=(type 0x10)0x1e
A: platformBuildVersionName=(type 0x10)0xb
E: uses-sdk (line=7)
A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10
A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1e
E: uses-permission (line=14)
A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
E: application (line=16)
A: android:label(0x01010001)="newapp" (Raw: "newapp")
A: android:icon(0x01010002)=@0x7f080000
A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw:
"androidx.core.app.CoreComponentFactory")
E: activity (line=21)
A: android:theme(0x01010000)=@0x7f0a0000
A: android:name(0x01010003)="com.example.newapp.MainActivity" (Raw:
"com.example.newapp.MainActivity")
A: android:launchMode(0x0101001d)=(type 0x10)0x1
A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4
A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
E: meta-data (line=35)
A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw:
"io.flutter.embedding.android.NormalTheme")
A: android:resource(0x01010025)=@0x7f0a0001
E: meta-data (line=45)
A: android:name(0x01010003)="io.flutter.embedding.android.SplashScreenDrawable" (Raw:
"io.flutter.embedding.android.SplashScreenDrawable")
A: android:resource(0x01010025)=@0x7f040000
E: intent-filter (line=49)
E: action (line=50)
A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
E: category (line=52)
A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw:
"android.intent.category.LAUNCHER")
E: meta-data (line=59)
A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
A: android:value(0x01010024)=(type 0x10)0x2
[ +21 ms] executing: C:\Users\milan\AppData\Local\Android\sdk\platform-tools\adb.exe -s 42001e37fc5a9209 shell -x
logcat -v time -t 1
[ +21 ms] <- compile package:newapp/main.dart
[ +313 ms] --------- beginning of main
07-30 12:28:36.773 D/ScanRecord( 6084): first manudata for manu ID
[ +14 ms] executing: C:\Users\milan\AppData\Local\Android\sdk\platform-tools\adb.exe version
[ +52 ms] Android Debug Bridge version 1.0.41
Version 31.0.2-7242960
Installed as C:\Users\milan\AppData\Local\Android\sdk\platform-tools\adb.exe
[ +12 ms] executing: C:\Users\milan\AppData\Local\Android\sdk\platform-tools\adb.exe start-server
[ +59 ms] Building APK
[ +41 ms] Running Gradle task 'assembleDebug'...
[ +11 ms] Using gradle from F:\flutter\newapp\android\gradlew.bat.
[ +25 ms] executing: C:\Program Files\Android\Android Studio\jre\bin\java -version
[ +327 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jre\bin\java -version
[ ] openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
OpenJDK 64-Bit Server VM (build 11.0.8+10-b944.6842174, mixed mode)
[ +4 ms] executing: [F:\flutter\newapp\android/] F:\flutter\newapp\android\gradlew.bat -Pverbose=true
-Ptarget-platform=android-arm -Ptarget=F:\flutter\newapp\lib\main.dart
-Pdart-defines=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ== -Pdart-obfuscation=false -Ptrack-widget-creation=true
-Ptree-shake-icons=false -Pfilesystem-scheme=org-dartlang-root assembleDebug
[+3599 ms] > Task :app:compileFlutterBuildDebug UP-TO-DATE
[ +2 ms] > Task :app:packLibsflutterBuildDebug UP-TO-DATE
[ +10 ms] > Task :app:preBuild UP-TO-DATE
[ +1 ms] > Task :app:preDebugBuild UP-TO-DATE
[ +1 ms] > Task :app:compileDebugAidl NO-SOURCE
[ +1 ms] > Task :app:compileDebugRenderscript NO-SOURCE
[ +1 ms] > Task :app:generateDebugBuildConfig UP-TO-DATE
[ +1 ms] > Task :app:checkDebugAarMetadata UP-TO-DATE
[ +11 ms] > Task :app:cleanMergeDebugAssets
[ +12 ms] > Task :app:mergeDebugShaders UP-TO-DATE
[ +13 ms] > Task :app:compileDebugShaders NO-SOURCE
[ +1 ms] > Task :app:generateDebugAssets UP-TO-DATE
[ +24 ms] > Task :app:mergeDebugAssets
[ +565 ms] > Task :app:copyFlutterAssetsDebug
[ +8 ms] > Task :app:generateDebugResValues UP-TO-DATE
[ +4 ms] > Task :app:generateDebugResources UP-TO-DATE
[ +1 ms] > Task :app:mergeDebugResources UP-TO-DATE
[ +1 ms] > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
[ +1 ms] > Task :app:extractDeepLinksDebug UP-TO-DATE
[ +3 ms] > Task :app:processDebugMainManifest UP-TO-DATE
[ +4 ms] > Task :app:processDebugManifest UP-TO-DATE
[ +12 ms] > Task :app:processDebugManifestForPackage UP-TO-DATE
[ +71 ms] > Task :app:processDebugResources UP-TO-DATE
[ +3 ms] > Task :app:compileDebugKotlin UP-TO-DATE
[ +1 ms] > Task :app:javaPreCompileDebug UP-TO-DATE
[ +10 ms] > Task :app:compileDebugJavaWithJavac UP-TO-DATE
[ +20 ms] > Task :app:compileDebugSources UP-TO-DATE
[ +150 ms] > Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
[ +54 ms] > Task :app:compressDebugAssets UP-TO-DATE
[ +2 ms] > Task :app:processDebugJavaRes NO-SOURCE
[ +16 ms] > Task :app:mergeDebugJavaResource UP-TO-DATE
[ +80 ms] > Task :app:checkDebugDuplicateClasses UP-TO-DATE
[ +244 ms] > Task :app:dexBuilderDebug UP-TO-DATE
[ +155 ms] > Task :app:desugarDebugFileDependencies UP-TO-DATE
[ +2 ms] > Task :app:mergeExtDexDebug UP-TO-DATE
[ +1 ms] > Task :app:mergeDexDebug UP-TO-DATE
[ +1 ms] > Task :app:mergeDebugJniLibFolders UP-TO-DATE
[ +4 ms] > Task :app:mergeDebugNativeLibs UP-TO-DATE
[ +1 ms] > Task :app:stripDebugDebugSymbols UP-TO-DATE
[ +1 ms] > Task :app:validateSigningDebug UP-TO-DATE
[ +1 ms] > Task :app:packageDebug UP-TO-DATE
[ +1 ms] > Task :app:assembleDebug
[ +1 ms] Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
[ +1 ms] Use '--warning-mode all' to show the individual deprecation warnings.
[ +1 ms] See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings
[ +1 ms] BUILD SUCCESSFUL in 4s
[ +1 ms] 32 actionable tasks: 4 executed, 28 up-to-date
[ +619 ms] Running Gradle task 'assembleDebug'... (completed in 6.1s)
[ +68 ms] calculateSha: LocalDirectory: 'F:\flutter\newapp\build\app\outputs\flutter-apk'/app.apk
[+1344 ms] √ Built build\app\outputs\flutter-apk\app-debug.apk.
[ +241 ms] executing: C:\Users\milan\AppData\Local\Android\sdk\build-tools\30.0.3\aapt dump xmltree
F:\flutter\newapp\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
[+1086 ms] Exit code 0 from: C:\Users\milan\AppData\Local\Android\sdk\build-tools\30.0.3\aapt dump xmltree
F:\flutter\newapp\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
[ +1 ms] N: android=http://schemas.android.com/apk/res/android
E: manifest (line=2)
A: android:versionCode(0x0101021b)=(type 0x10)0x1
A: android:versionName(0x0101021c)="1.0.0" (Raw: "1.0.0")
A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1e
A: android:compileSdkVersionCodename(0x01010573)="11" (Raw: "11")
A: package="com.example.newapp" (Raw: "com.example.newapp")
A: platformBuildVersionCode=(type 0x10)0x1e
A: platformBuildVersionName=(type 0x10)0xb
E: uses-sdk (line=7)
A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10
A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1e
E: uses-permission (line=14)
A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
E: application (line=16)
A: android:label(0x01010001)="newapp" (Raw: "newapp")
A: android:icon(0x01010002)=@0x7f080000
A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw:
"androidx.core.app.CoreComponentFactory")
E: activity (line=21)
A: android:theme(0x01010000)=@0x7f0a0000
A: android:name(0x01010003)="com.example.newapp.MainActivity" (Raw:
"com.example.newapp.MainActivity")
A: android:launchMode(0x0101001d)=(type 0x10)0x1
A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4
A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
E: meta-data (line=35)
A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw:
"io.flutter.embedding.android.NormalTheme")
A: android:resource(0x01010025)=@0x7f0a0001
E: meta-data (line=45)
A: android:name(0x01010003)="io.flutter.embedding.android.SplashScreenDrawable" (Raw:
"io.flutter.embedding.android.SplashScreenDrawable")
A: android:resource(0x01010025)=@0x7f040000
E: intent-filter (line=49)
E: action (line=50)
A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
E: category (line=52)
A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw:
"android.intent.category.LAUNCHER")
E: meta-data (line=59)
A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
A: android:value(0x01010024)=(type 0x10)0x2
[ +10 ms] Stopping app 'app.apk' on SM G550FY.
[ +1 ms] executing: C:\Users\milan\AppData\Local\Android\sdk\platform-tools\adb.exe -s 42001e37fc5a9209 shell am
force-stop com.example.newapp
[+1918 ms] executing: C:\Users\milan\AppData\Local\Android\sdk\platform-tools\adb.exe -s 42001e37fc5a9209 shell pm
list packages com.example.newapp
[+1779 ms] package:com.example.newapp
[ +2 ms] executing: C:\Users\milan\AppData\Local\Android\sdk\platform-tools\adb.exe -s 42001e37fc5a9209 shell cat
/data/local/tmp/sky.com.example.newapp.sha1
[ +66 ms] 12aaf172e0b7755be328c3ac81fed5f1f9718465
[ +1 ms] Latest build already installed.
[ ] executing: C:\Users\milan\AppData\Local\Android\sdk\platform-tools\adb.exe -s 42001e37fc5a9209 shell -x
logcat -v time -t 1
[ +289 ms] --------- beginning of main
07-30 12:28:50.043 I/PersonaManager( 2775): mKnoxInfo is empty
[ +8 ms] executing: C:\Users\milan\AppData\Local\Android\sdk\platform-tools\adb.exe -s 42001e37fc5a9209 shell am
start -a android.intent.action.RUN -f 0x20000000 --ez enable-background-compilation true --ez enable-dart-profiling
true --ez enable-checked-mode true --ez verify-entry-points true com.example.newapp/com.example.newapp.MainActivity
[+2839 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=com.example.newapp/.MainActivity (has
extras) }
[ +2 ms] Waiting for observatory port to be available...
[+1212 ms] Observatory URL on device: http://127.0.0.1:56401/3EP0dr9YmCM=/
[ +1 ms] executing: C:\Users\milan\AppData\Local\Android\sdk\platform-tools\adb.exe -s 42001e37fc5a9209 forward
tcp:0 tcp:56401
[ +33 ms] 65122
[ +1 ms] Forwarded host port 65122 to device port 56401 for Observatory
[ +11 ms] Caching compiled dill
[ +234 ms] Connecting to service protocol: http://127.0.0.1:65122/3EP0dr9YmCM=/
[ +43 ms] Fail to connect to service protocol: http://127.0.0.1:65122/3EP0dr9YmCM=/: HttpException: Connection
closed before full header was received, uri = http://127.0.0.1:65122/3EP0dr9YmCM=/ws
[ +6 ms] Error connecting to the service protocol: failed to connect to http://127.0.0.1:65122/3EP0dr9YmCM=/
[ +8 ms] "flutter run" took 18,854ms.
[ +11 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:663:9)

#2 FlutterCommand.run.
(package:flutter_tools/src/runner/flutter_command.dart:1043:27)

#3 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#4 CommandRunner.runCommand (package:args/command_runner.dart:196:13)

#5 FlutterCommandRunner.runCommand.
(package:flutter_tools/src/runner/flutter_command_runner.dart:284:9)

#6 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#7 FlutterCommandRunner.runCommand
(package:flutter_tools/src/runner/flutter_command_runner.dart:232:5)

#8 run.. (package:flutter_tools/runner.dart:62:9)

#9 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19)

#10 main (package:flutter_tools/executable.dart:91:3)

[ +263 ms] ensureAnalyticsSent: 255ms
[ +2 ms] Running shutdown hooks
[ +1 ms] Shutdown hooks complete
[ +1 ms] exiting with code 2

@milanpurbia26
Copy link

plz help me out

@Ssiswent
Copy link

Already Solved With All Possible Solution added [Solved] How to fix HttpException: Connection closed before full header was received

Sry, this link can not be opened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: done This issue is considered resolved. type: bug This issue reports a bug.
Projects
None yet
Development

No branches or pull requests

6 participants