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

[Bug] asExternalUri never returns #14248

Closed
jeromelaban opened this issue Oct 27, 2022 · 6 comments · Fixed by #14761
Closed

[Bug] asExternalUri never returns #14248

jeromelaban opened this issue Oct 27, 2022 · 6 comments · Fixed by #14761

Comments

@jeromelaban
Copy link

jeromelaban commented Oct 27, 2022

Bug description

Since what I think is coder/code-server#5624, awaiting vscode.env.asExternalUri(vscode.Uri.parse("http://localhost:12345"); never returns.

Steps to reproduce

I don't have a simple repro available, but the promise awaiting vscode.env.asExternalUri does not return.

Here's an larger repro:

  1. Open: https://gitpod.io/#https://github.com/unoplatform/uno.quickstart
  2. Install the suggested Uno Platform extension
  3. Once the C# environment is setup, with the commmand palette use the command "Omnisharp: Select project" (or click on the project name in the status bar)
  4. Select the MyApp.Wasm project
  5. If the vscode.env.asExternalUri works, the output for Uno Platform - Hot Reload will show Application started. Press Ctrl+C to shut down..

Currently, that message does not appear.

Workspace affected

No response

Expected behavior

A new listening port is opened based on the external uri.

Example repository

No response

Anything else?

No response

@jeanp413
Copy link
Member

jeanp413 commented Nov 6, 2022

@jeromelaban seems to be working for me, can you still reproduce? also not sure what you mean regarding the code-server PR you linked, Gitpod does not use code-server.

[Info] Launching remote control server (Port:41463, Path:/home/gitpod/.nuget/packages/uno.ui.remotecontrol/4.6.18/buildTransitive/../tools/rc/host/net6.0/Uno.UI.RemoteControl.Host.dll)
�[40m�[37mdbug�[39m�[22m�[49m: Microsoft.AspNetCore.Hosting.Diagnostics[3]
      Hosting starting

�[40m�[37mdbug�[39m�[22m�[49m: Microsoft.AspNetCore.Hosting.Diagnostics[4]
      Hosting started

�[40m�[37mdbug�[39m�[22m�[49m: Microsoft.AspNetCore.Hosting.Diagnostics[13]
      Loaded hosting startup assembly Uno.UI.RemoteControl.Host

Hosting environment: Production
Content root path: /workspace/Uno.QuickStart
Now listening on: http://[::]:41463
Application started. Press Ctrl+C to shut down.

@jeromelaban
Copy link
Author

Hi @jeanp413! We published a workaround for it in our v0.5.1, but if you install the version 0.4.0 of the addin, it should reproduce.

As for the code-server PR, my apologies if it's unrelated. I don't really understand yet the relations between all the pieces of gitpod's ecosystem :)

@jeanp413 jeanp413 self-assigned this Nov 7, 2022
@jeanp413 jeanp413 moved this to Scheduled in 🚀 IDE Team Nov 7, 2022
@jeanp413
Copy link
Member

jeanp413 commented Nov 7, 2022

Small repro:
You need to not have anything running in 32456 port

const d = vscode.Uri.parse(`http://localhost:32456`);
const h = await vscode.env.asExternalUri(d);

@mustard-mh maybe related to some optimizations we did about not firing event for ports, this logic is always returning false

jeanp413 added a commit to gitpod-io/openvscode-server that referenced this issue Nov 9, 2022
@jeanp413 jeanp413 moved this from Scheduled to In Progress in 🚀 IDE Team Nov 12, 2022
Repository owner moved this from In Progress to Done in 🚀 IDE Team Nov 18, 2022
@jeromelaban
Copy link
Author

Thanks!

@mustard-mh
Copy link
Contributor

@jeromelaban it's not deployed yet 🙏 , will ping you if we are going to deploy it to SaaS Gitpod

@mustard-mh
Copy link
Contributor

Sorry for being late, it's been deployed to production SaaS Gitpod. @jeromelaban

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants