Open DanTup opened 3 years ago
Fyi @grouma
Another issue I believe is caused by SSE is not being able to open > 5 DevTools tabs, see https://github.com/flutter/devtools/issues/8298. If the fix for that issue is to switch from SSE to WS, that may also resolve this.
I tried to launch DevTools in a cloud editor that doesn't support SSE (its connections will just hang indefinitely) and it failed to load (just leaving a white screen after printing the version number to the console).
The network tab looks like this:
I can't easily confirm, but I think it will be hanging on this
await
here:https://github.com/flutter/devtools/blob/43b2f5ea102fede6aa4776510858775acc31c6df/packages/devtools_app/lib/main.dart#L28
That
init()
call tries to use storage which will be aServerConnectionStorage
becauseDevToolsServerConnection.connect
does not return null here:https://github.com/flutter/devtools/blob/f38f4acde909be516b3de172405d48b6b484ea70/packages/devtools_app/lib/src/config_specific/framework_initialize/_framework_initialize_web.dart#L18-L23
It doesn't return null, because in
connect()
the call toapi/ping
works fine (it's not SSE), which then unconditionally creates anSseClient
:https://github.com/flutter/devtools/blob/86102bdec15a0a5fb3fb70ab98e8ff4e5e50141c/packages/devtools_app/lib/src/server_api_client.dart#L28
If we want to support this, I think there are two options:
null
(this would effectively disable the server though, which may affect some functionality)@devoncarew @jacob314 I don't know if this is currently worth pursuing, but thought it was worth capturing the issue somewhere perhaps to come back to.