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
Add an env variable to allow delaying startup of external services #5613
There's currently an issue on Firebase Studio that prevents services that bind to ports really early on in the activate() method from being reachable correctly from the front-end. As a workaround while this is debugged, we should support a custom delay before we spawn things like DTD.
To avoid cluttering the users User or Workspace settings with this, we'll use an env variable that contains the number of milliseconds to delay startup of these services:
Danny, how about tweaking this a little bit? Instead of looking for DART_CODE_SERVICE_ACTIVATION_DELAY, look for MONOSPACE_ENV environment variable. If that is set to true, then it is Firebase Studio, and then we can delay the activation by the default value, which would be 5 secs.
@keertip I have pushed 4be3390 which adds a default delay of 5s based on that env variable. It can still be overridden by the config setting or the DART_CODE_SERVICE_ACTIVATION_DELAY env variable to make it easier to test other values.
Activity
DanTup commentedon Jul 28, 2025
As well as the env var, a config setting can be used:
The config setting is not declared, so VS Code will say that it's not valid, but it will still work (this exists just for convenience of testing).
The config value overrides the env var (to allow for testing different values even if the platform is setting the env var).
keertip commentedon Jul 30, 2025
Danny, how about tweaking this a little bit? Instead of looking for
DART_CODE_SERVICE_ACTIVATION_DELAY, look forMONOSPACE_ENVenvironment variable. If that is set to true, then it is Firebase Studio, and then we can delay the activation by the default value, which would be 5 secs.Default to a 5s delay for Firebase Studio
DanTup commentedon Jul 30, 2025
@keertip I have pushed 4be3390 which adds a default delay of 5s based on that env variable. It can still be overridden by the config setting or the
DART_CODE_SERVICE_ACTIVATION_DELAYenv variable to make it easier to test other values.keertip commentedon Jul 30, 2025
Thanks Danny, that looks good!
Add the ability to delay activation of exposed services like DTD