You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--dtd-uri (and server-provided storage) doesn't work with "dt serve" when embedded when SSE connection is disabled #9023
While testing in VS Code, I ran DevTools from source using the dart.customDevTools setting. In the log I can see it spawned the server with a --dtd-uri:
[10:37:14 AM] [DevTools] [Info] Spawning D:\Dev\Google\devtools\tool\bin\dt.bat with args ["serve","--machine","--allow-embedding","--dtd-uri","ws://127.0.0.1:65196/IoZPaHuLiGI="]
[10:37:14 AM] [DevTools] [Info] .. in D:\Dev\Google\devtools
[10:37:14 AM] [DevTools] [Info] .. with {"toolEnv":{"FLUTTER_HOST":"VSCode","PUB_ENVIRONMENT":"vscode.dart-code","FLUTTER_ROOT":"D:\\Dev\\Google\\Flutter\\Flutter main"},"envOverrides":{"LOCAL_DART_SDK":"D:\\Dev\\Google\\dart-sdk\\sdk","FLUTTER_ROOT":"D:\\Dev\\Google\\devtools\\tool\\flutter-sdk"}}
[10:37:14 AM] [DevTools] [Info] PID: 13844
However, when I load something like the deeplinks page it doesn't know what my project roots are, and I see this in the console:
No DTD uri provided from the server during initialization.
It looks like in serve.dart this would be passed through to devtools_server/serve_local.dart in the DDS package in the SDK, so it's possible the actual issue is in the SDK, but here seemed like the right place to raise this.
changed the title [-]--dtd-uri doesn't seem to work with "dt serve"[/-][+]--dtd-uri doesn't seem to work with "dt serve" when embedded[/+]on Mar 12, 2025
My guess is that this is because SSE used to be used for the storage (this was changed in #8284).
So this condition probably needs updating to detect whether the standard server API is available (without requiring SSE). But that probably raises a question about what this code should do:
Does this mean "Is there an SSE server API available?" or is there a standard HTTP API server available? Perhaps it should be split into two booleans and then each place that uses it checked to see which it really cares about?
@kenzieschmoll LMK what you think (and whether I should revert my change for now until this is resolved).
changed the title [-]--dtd-uri doesn't seem to work with "dt serve" when embedded[/-][+]--dtd-uri (and server-provided storage) doesn't work with "dt serve" when embedded when SSE connection is disabled[/+]on Mar 12, 2025
Activity
[-]--dtd-uri doesn't seem to work with "dt serve"[/-][+]--dtd-uri doesn't seem to work with "dt serve" when embedded[/+]DanTup commentedon Mar 12, 2025
So this is actually a result of my change yesterday to not connect SSE when embedded.
There's code here that varies the storage based on whether there is an SSE connection:
devtools/packages/devtools_app/lib/src/shared/config_specific/framework_initialize/_framework_initialize_web.dart
Lines 40 to 45 in cfff32d
My guess is that this is because SSE used to be used for the storage (this was changed in #8284).
So this condition probably needs updating to detect whether the standard server API is available (without requiring SSE). But that probably raises a question about what this code should do:
devtools/packages/devtools_app/lib/src/shared/server/server.dart
Lines 40 to 41 in cfff32d
Does this mean "Is there an SSE server API available?" or is there a standard HTTP API server available? Perhaps it should be split into two booleans and then each place that uses it checked to see which it really cares about?
@kenzieschmoll LMK what you think (and whether I should revert my change for now until this is resolved).
[-]--dtd-uri doesn't seem to work with "dt serve" when embedded[/-][+]--dtd-uri (and server-provided storage) doesn't work with "dt serve" when embedded when SSE connection is disabled[/+]Switch isDevToolsServerAvailable to not depend on the SSE connection
Switch isDevToolsServerAvailable to not depend on the SSE connection (#…