Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workbench - Opening app in new tab fails with a proxy error #5431

Open
jonvanausdeln opened this issue Nov 20, 2024 · 3 comments
Open

Workbench - Opening app in new tab fails with a proxy error #5431

jonvanausdeln opened this issue Nov 20, 2024 · 3 comments
Labels
area: proxy Issues related to Positron Proxy category. area: workbench Issues related to Workbench category. bug Something isn't working

Comments

@jonvanausdeln
Copy link
Contributor

System details:

Positron and OS details:

Positron:

Positron: 2024.12.0-48
Workbench: 2024.12.0+440.pro1

Interpreter details:

Python 3.10.10

Describe the issue:

When trying to open an app via the link in the console to an external browser, it won't load

workbench-proxy-issue.mp4

Steps to reproduce the issue:

  1. Load a new Positron workbench session
  2. Run a python app, such as the example dash app.
  3. In the console, ctrl+click the link and pick open in a browser

Expected or desired behavior:

The app to open in a new browser tab.

Were there any error messages in the UI, Output panel, or Developer Tools console?

@jonvanausdeln jonvanausdeln added area: workbench Issues related to Workbench category. bug Something isn't working labels Nov 20, 2024
@sharon-wang sharon-wang added the area: proxy Issues related to Positron Proxy category. label Nov 21, 2024
@juliasilge
Copy link
Contributor

The button for "open in external browser" works.

@juliasilge juliasilge added this to the Release Candidate milestone Nov 25, 2024
@jonvanausdeln
Copy link
Contributor Author

When clicking the URL in the terminal.. the new tab URL:
http://localhost:8787/s/d5de86ae9dc1bce29c6b4/p/c123e575/s/d5de86ae9dc1bce29c6b4/p/6f90df7a/

When clickding the "open in external browser" button, the URL:
http://localhost:8787/s/d5de86ae9dc1bce29c6b4/p/6f90df7a/

@sharon-wang
Copy link
Member

We could add some handling in

resolveExternalUri: (uri: URI): Promise<URI> => {

to check if the URL already looks like one we've resolved.

We could add a function to https://github.com/posit-dev/positron/blob/main/src/vs/code/browser/workbench/urlPorts.ts to check if a url looks like a resolved portmapped url.

Then, we could return the URL as-is if it looks like a resolved URL instead of re-resolving the URL, which I believe is why we're getting a longer and incorrect URL.

Changes to the mentioned files will need to be upstreamed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: proxy Issues related to Positron Proxy category. area: workbench Issues related to Workbench category. bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants