Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

The Dapr dashboard is opened when clicking "Open Dashboard in Browser" button in Tye view #191

Open
v-ruizh opened this issue Jul 11, 2022 · 1 comment
Labels
AT-CTI bug Something isn't working

Comments

@v-ruizh
Copy link

v-ruizh commented Jul 11, 2022

OS: Win10
Tye Extension Version: 20220629.2
Tye Version: 0.12.0-alpha.22328.1
Dapr Extension Version: 20220629.2

Repro Steps:

  1. Install Dapr extension.
  2. Open an application in VS Code -> Scaffold Dapr Task for it -> Debug with Dapr configuration.
  3. Open Dapr dashboard, close the dashboard.
  4. Install Tye extension.
  5. Download the application by the command "git clone https://github.com/pratiksanglikar/tye-demo.git" -> Open the application in VS Code.
  6. F1 -> Tye Run.
  7. Navigate to Tye view and click "Open Dashboard in Browser" button.
  8. Check whether the tye dashboard is opened or not.

Expect:
The tye dashboard is opened.
image

Actual:
The Dapr dashboard is opened.
image

More Info:
This issue does not reproduce if not open the Dapr dashboard before open the tye dashboard.

@v-ruizh v-ruizh added the AT-CTI label Jul 11, 2022
@philliphoff
Copy link
Member

It happens that both Dapr and Tye use the same default port for their dashboards (8000). Ordinarily, Tye would choose a random port if it notices the default port in use, but it appears that Tye binds to the 127.0.0.1 address while Dapr binds to the localhost address so technically the port is free, even though the two addresses are generally considered interchangeable.

The VS Code extension should note the address bound with the port and use that for building the dashboard URL, rather than use just the port and then assume localhost. (It looks like the extension has that information during port probing, but just doesn't use it.)

That said, Tye should probably see if its desired dashboard port is already bound to either 127.0.0.1 and localhost and use another port if either is bound with the port, as it's just confusing.

@philliphoff philliphoff added the bug Something isn't working label Jul 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AT-CTI bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants