Open FMorschel opened 3 months ago
Hi @FMorschel, curious, what device are you using? And is that the only device you're seeing this on? I have been trying to get my pixel 7 to read as offline, but after the phone locks for several times, it is still able to connect
I've used a Samsung Galaxy S23U and had this experience but currently downgraded to see the behaviour on older devices and am using a Samsung Galaxy S20 FE. Not sure if this is only a Samsung thing. As I said on the issue for Dart-Code, it seems weird that the phone receives the app and installs it just fine bit is not able to connect to the service protocol.
As I said, it is pretty inconsistent as well. I'm not really sure how to make this happen. The one thing I noticed is that I connect it through wifi debugging and leave the phone locked for some time while doing other things (not deving or deving without debugging) and whenever I come back, I always need to manually unlock my phone to make debugging work.
I'm guessing this might be because adb might be dying on us. Possibly related https://github.com/flutter/flutter/issues/9707
Labeling this as a proposal for an improved message.
Steps to reproduce
flutter doctor -v
that it is offline (maybe only happens on wifi debugging?)flutter run -v
About point two here, not sure this is exactly when you can see this output. Look https://github.com/Dart-Code/Dart-Code/issues/5245 for more info. It happens to me whenever I have left my phone lock the screen by itself and have not used it for some time. If I lock it manually or recently this does not happen.
Expected results
Device is offline
message. Or some better message handling when not in verbose mode.Actual results
Connection closed before full header was received
message only in verbose mode.Code sample
Not important.
Screenshots or Video
Not important.
Logs
Logs
```console [ +1 ms] Latest build already installed. [ ] executing: C:\Users\felip_0vh5fa6\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.200.50:42307 shell -x logcat -v time -t 1 [ +355 ms] --------- beginning of system 09-02 17:13:23.818 I/wpa_supplicant( 1637): Heartbeat 62 [ +13 ms] executing: C:\Users\felip_0vh5fa6\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.200.50:42307 shell am start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x20000000 --ez enable-dart-profiling true --ez enable-checked-mode true --ez verify-entry-points true br.inf.sunsoft.produtores/br.inf.sunsoft.produtores.MainActivity [ +157 ms] Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x20000000 cmp=br.inf.sunsoft.produtores/.MainActivity (has extras) } [ ] Waiting for VM Service port to be available... [+1327 ms] VM Service URL on device: http://127.0.0.1:45599/PSAwNkkAsUk=/ [ +1 ms] executing: C:\Users\felip_0vh5fa6\AppData\Local\Android\sdk\platform-tools\adb.exe -s 192.168.200.50:42307 forward tcp:0 tcp:45599 [ +61 ms] 50529 [ +1 ms] Forwarded host port 50529 to device port 45599 for VM Service [ +3 ms] Caching compiled dill [ +78 ms] Connecting to service protocol: http://127.0.0.1:50529/PSAwNkkAsUk=/ [+31591 ms] Fail to connect to service protocol: http://127.0.0.1:50529/PSAwNkkAsUk=/: HttpException: Connection closed before full header was received, uri = http://127.0.0.1:50529/PSAwNkkAsUk=/ws [ +2 ms] Error connecting to the service protocol: failed to connect to http://127.0.0.1:50529/PSAwNkkAsUk=/ [ +21 ms] "flutter run" took 66.603ms. [ +176 ms] #0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3) #1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:874:9)Flutter Doctor output
Doctor output
```console [√] Flutter (Channel stable, 3.24.1, on Microsoft Windows [Version 10.0.22631.4037], locale pt-BR) • Flutter version 3.24.1 on channel stable at C:\Users\felip_0vh5fa6\.puro\envs\stable\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 5874a72aa4 (2 weeks ago), 2024-08-20 16:46:00 -0500 • Engine revision c9b9d5780d • Dart version 3.5.1 • DevTools version 2.37.2 [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at C:\Users\felip_0vh5fa6\AppData\Local\Android\sdk • Platform android-34, build-tools 34.0.0 • Java binary at: C:\Users\felip_0vh5fa6\AppData\Local\Programs\Android Studio\jbr\bin\java • Java version OpenJDK Runtime Environment (build 17.0.11+0--11852314) • All Android licenses accepted. [√] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe [√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.10.6) • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community • Visual Studio Community 2022 version 17.10.35201.131 • Windows 10 SDK version 10.0.22621.0 [√] Android Studio (version 2024.1) • Android Studio at C:\Users\felip_0vh5fa6\AppData\Local\Programs\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.11+0--11852314) [√] VS Code (version 1.92.2) • VS Code at C:\Users\felip_0vh5fa6\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.92.0 [√] VS Code (version 1.88.0-insider) • VS Code at C:\Users\felip_0vh5fa6\AppData\Local\Programs\Microsoft VS Code Insiders • Flutter extension version 3.64.0 [√] Connected device (4 available) • SM G780F (mobile) • 192.168.200.50:41835 • android-arm64 • Android 13 (API 33) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22631.4037] • Chrome (web) • chrome • web-javascript • Google Chrome 128.0.6613.114 • Edge (web) • edge • web-javascript • Microsoft Edge 128.0.2739.42 ! Device 192.168.200.50:39975 is offline. [√] Network resources • All expected network resources are available. • No issues found! ```