Repository: flutter
Issue: [Flutter doctor] crash on connected devices when web support is enabled running on WSL, FormatException: Missing extension byte
Labels: tool,P2,c: fatal crash,team-tool,triaged-tool

Hi, I need to work on a web app, howerver flutter crashes during flutter doctor at the connected device steps.

I work on Wsl - Debian.
Chrome installed on Windows 10

## Steps to Reproduce

1. install flutter following every step for linux starting from: git clone https://github.com/flutter/flutter.git
2. export PATH="$PATH:`pwd`/flutter/bin" in .zshrc
3. flutter precache
4. flutter doctor

5. follow the web tutorial: https://flutter.dev/docs/get-started/web
6. flutter channel beta
7. flutter upgrade
8. flutter config --enable-web
9. flutter doctor

## Logs

$> flutter doctor -v ( before $> flutter config --enable-web )
```
[✓] Flutter (Channel master, 1.22.0-10.0.pre.200, on Linux, locale en_US.UTF-8)
    • Flutter version 1.22.0-10.0.pre.200 at /home/fchavagnieux/Teknos/flutter
    • Framework revision 25b8c095cd (5 hours ago), 2020-09-16 01:27:03 -0400
    • Engine revision 1ef10b240e
    • Dart version 2.10.0 (build 2.10.0-124.0.dev)

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /mnt/c/Users/flori/AppData/Local/Android/Sdk
    • Platform android-29, build-tools 29.0.3
    • ANDROID_SDK_ROOT = /mnt/c/Users/flori/AppData/Local/Android/Sdk/
    ✗ Android SDK file not found: adb.
    • Try re-installing or updating your Android SDK,
      visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions.

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).

[!] Connected device
    ! No devices available

! Doctor found issues in 3 categories.
```

$> flutter doctor -v ( after $> flutter config --enable-web )
```
[✓] Flutter (Channel master, 1.22.0-10.0.pre.200, on Linux, locale en_US.UTF-8)
    • Flutter version 1.22.0-10.0.pre.200 at /home/fchavagnieux/Teknos/flutter
    • Framework revision 25b8c095cd (5 hours ago), 2020-09-16 01:27:03 -0400
    • Engine revision 1ef10b240e
    • Dart version 2.10.0 (build 2.10.0-124.0.dev)

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /mnt/c/Users/flori/AppData/Local/Android/Sdk
    • Platform android-29, build-tools 29.0.3
    • ANDROID_SDK_ROOT = /mnt/c/Users/flori/AppData/Local/Android/Sdk/
    ✗ Android SDK file not found: adb.
    • Try re-installing or updating your Android SDK,
      visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions.

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).

[☠] Connected device (the doctor check crashed)
    ✗ Due to an error, the doctor check did not complete. If the error message below is not helpful, please let us know
      about this issue at https://github.com/flutter/flutter/issues.
    ✗ FormatException: Missing extension byte (at offset 87)
    • #0      _Utf8Decoder.convertChunked (dart:convert-patch/convert_patch.dart:1887:7)
      #1      _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:314:28)
      #2      _Utf8ConversionSink.add (dart:convert/string_conversion.dart:310:5)
      #3      _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:72:18)
      #4      _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:121:24)
      #5      _rootRunUnary (dart:async/zone.dart:1198:47)
      #6      _CustomZone.runUnary (dart:async/zone.dart:1100:19)
      #7      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
      #8      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:357:11)
      #9      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:285:7)
      #10     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:808:19)
      #11     _StreamController._add (dart:async/stream_controller.dart:682:7)
      #12     _StreamController.add (dart:async/stream_controller.dart:624:5)
      #13     _Socket._onData (dart:io-patch/socket_patch.dart:2150:41)
      #14     _rootRunUnary (dart:async/zone.dart:1206:13)
      #15     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
      #16     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
      #17     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:357:11)
      #18     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:285:7)
      #19     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:808:19)
      #20     _StreamController._add (dart:async/stream_controller.dart:682:7)
      #21     _StreamController.add (dart:async/stream_controller.dart:624:5)
      #22     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1686:33)
      #23     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1182:14)
      #24     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
      #25     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
      #26     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
      #27     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)


! Doctor found issues in 3 categories.
```

I have no issues running mobile apps when web service is not enabled.