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

WGLMakie doesn't show the plot in remote server using the Remote Tunnel extension in VSCode #4575

Open
albertomercurio opened this issue Nov 7, 2024 · 6 comments
Labels
bug specific environment related to a specific environment/configuration, e.g. headless, ssh, vscode, etc WGLMakie This relates to WGLMakie.jl, the Web-based WebGL backend for Makie.

Comments

@albertomercurio
Copy link

Hello, I want to create some interactive plots using vscode connected to a remote machine using the Remote Tunnel extension. I tried WGLMakie first in a .jl file, the plot panel appeared, but then nothing.

I noticed that, if I connect to the remote server using Remote SSH, it works. I see the localhost:9384 forwarded port and everything is fine. But if I connect to the remote using the Remote Tunnel extension, then the Plot Panel opens and it remains empty. I noticed that the forwarded port doesn't give the localhost:9384 url, but something like https://somecode-9384.euw.devtunnels.ms/ where somecode is some code id which I don't know if I can post here for security.

Then I tried the following. I disabled the Plot Pane, reconnected using Remote SSH instead of Remote Tunnel, executed the code for the simple plot, opened the web browser to the link localhost:9384/browser-display.
Everything worked. Then I tried to do the same connecting through the Remote Tunnel. I opened https://somecode-9384.euw.devtunnels.ms/browser-display, and it was an empty page.

VSCode Remote Tunnel is very useful because you don’t need to connect to a vpn if your remote server is under the organization’s network.

@ffreyer ffreyer added WGLMakie This relates to WGLMakie.jl, the Web-based WebGL backend for Makie. specific environment related to a specific environment/configuration, e.g. headless, ssh, vscode, etc labels Nov 20, 2024
@albertomercurio
Copy link
Author

Hello,

Any insights on this?

@SimonDanisch
Copy link
Member

I don't know how this works and have no way to reproduce it.
But if the only issue is, that things get served at a proxi'ed url, setting proxy_url should help.
You can try calling this, before any plotting is done:

using Bonito
Bonito.configure_server!(proxy_url="https://somecode-9384.euw.devtunnels.ms")

@albertomercurio
Copy link
Author

Ok it worked. Thanks.

To do that, I had to open the 9384 port first, then a link like https://somecode-9384.euw.devtunnels.ms appeared in the ports window. I then disabled the plot panel and run the code. The interactive plot opened on a browser window.

Is there a way to make it work also inside the vscode plot pane?

@SimonDanisch
Copy link
Member

What happens if you enable the vscode plotpane?

@albertomercurio
Copy link
Author

The plot pane appears, but empty. Julia keeps running for a minute or so and then nothing happens.

I have also tried to open the simple browser in VSCode and paste the web url working on an external browser, but I still see a blank page.

@SimonDanisch
Copy link
Member

Hm hard to tell what exactly happens.
What's the output of:

using Bonito, WGLMakie
Bonito.configure_server!(proxy_url="https://somecode-9384.euw.devtunnels.ms")
# enable plot pane
display(scatter(1:5))
server = Bonito.get_server()
println(server)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug specific environment related to a specific environment/configuration, e.g. headless, ssh, vscode, etc WGLMakie This relates to WGLMakie.jl, the Web-based WebGL backend for Makie.
Projects
None yet
Development

No branches or pull requests

3 participants