Repository: flutter
Issue: [web:tool] support `-d web-server` or equivalent way to serve a web app in a simple browser-agnostic way
Labels: tool,platform-web,has reproducible steps,browser: firefox,P2,blocked,found in release: 3.7,found in release: 3.8,team-web,triaged-web

Hi,

I'm developing a web application  for a professional project. So far so good, but while implementing Datadog, I saw an error that was often seen on Firefox browser. I was interested in this one and I discovered a WebGL error.

## Steps to Reproduce

<!-- Please include full steps to reproduce so that we can reproduce the problem. -->

1. Create a Flutter web project and run on Firefox last version.

-  Warning message

```
WEBGL_debug_renderer_info is deprecated in Firefox and will be removed. Please use RENDERER. [canvaskit.js:16:383](https://unpkg.com/canvaskit-wasm@0.37.1/bin/canvaskit.js)
```

-  Error message
```
Error from backend:

Error: Bad state: Not connected to an application.
```

  </details><details>
  <summary>Logs</summary>

```
Error from backend:

Error: Bad state: Not connected to an application.

Stack Trace:
#0      DevHandler._handleConnection.<anonymous closure> (package:dwds/src/handlers/dev_handler.dart:272:13)
#1      _rootRunUnary (dart:async/zone.dart:1406:47)
#2      _CustomZone.runUnary (dart:async/zone.dart:1307:19)
#3      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1216:7)
#4      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#5      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#6      _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:123:11)
#7      _MapStream._handleData (dart:async/stream_pipe.dart:218:10)
#8      _rootRunUnary (dart:async/zone.dart:1414:13)
#9      _CustomZone.runUnary (dart:async/zone.dart:1307:19)
#10     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1216:7)
#11     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#12     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#13     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)
#14     _StreamController._add (dart:async/stream_controller.dart:648:7)
#15     _StreamController.add (dart:async/stream_controller.dart:596:5)
#16     new WebSocketImpl.fromSocket.<anonymous closure> (package:web_socket_channel/src/copy/web_socket_impl.dart:730:21)
#17     _rootRunUnary (dart:async/zone.dart:1406:47)
#18     _CustomZone.runUnary (dart:async/zone.dart:1307:19)
#19     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1216:7)
#20     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#21     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#22     _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:63:11)
#23     _EventSinkWrapper.add (dart:async/stream_transformers.dart:13:11)
#24     _WebSocketProtocolTransformer._messageFrameEnd (package:web_socket_channel/src/copy/web_socket_impl.dart:319:23)
#25     _WebSocketProtocolTransformer.add (package:web_socket_channel/src/copy/web_socket_impl.dart:218:46)
#26     _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:111:24)
#27     _rootRunUnary (dart:async/zone.dart:1406:47)
#28     _CustomZone.runUnary (dart:async/zone.dart:1307:19)
#29     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1216:7)
#30     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#31     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#32     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)
#33     _StreamController._add (dart:async/stream_controller.dart:648:7)
#34     _StreamController.add (dart:async/stream_controller.dart:596:5)
#35     _Socket._onData (dart:io-patch/socket_patch.dart:2355:41)
#36     _rootRunUnary (dart:async/zone.dart:1414:13)
#37     _CustomZone.runUnary (dart:async/zone.dart:1307:19)
#38     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1216:7)
#39     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#40     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#41     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)
#42     _StreamController._add (dart:async/stream_controller.dart:648:7)
#43     _StreamController.add (dart:async/stream_controller.dart:596:5)
#44     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1877:33)
#45     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1334:14)
#46     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#47     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
#48     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:123:13)
#49     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:193:5)
```

  </details><details>
  <summary>Flutter doctor -v</summary>
<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
[√] Flutter (Channel stable, 3.7.3, on Microsoft Windows [version 10.0.19045.2546], locale fr-FR)
    • Flutter version 3.7.3 on channel stable at ....
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 9944297138 (6 days ago), 2023-02-08 15:46:04 -0800
    • Engine revision 248290d6d5
    • Dart version 2.19.2
    • DevTools version 2.20.1

[X] Windows Version (Unable to confirm if installed Windows version is 10 or greater)

[X] Android toolchain - develop for Android devices
    X Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components

[!] 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/windows#android-setup for detailed instructions).

[√] IntelliJ IDEA Ultimate Edition (version 2022.3)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2022.3.2
    • Flutter plugin version 72.0.4
    • Dart plugin version 223.8617.8

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [version 10.0.19045.2546]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 109.0.5414.122
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 110.0.1587.41

[√] HTTP Host Availability
    • All required HTTP hosts are available

```
</details>


Thanks