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

code-server: Not allowed to display insecure content from http://localhost:2718/ #27

Open
benz0li opened this issue Jun 22, 2024 · 14 comments

Comments

@benz0li
Copy link

benz0li commented Jun 22, 2024

Description

Does not work on a non-localhost deployment of code-server, e.g. at https://demo.jupyter.b-data.ch.
ℹ️ This deployment uses Træfik as [front-]proxy1 and for TLS termination.

Reproduce

intro.py.txt

  1. Open https://demo.jupyter.b-data.ch
  2. Sign in with your GitHub account
  3. Select an image and start
  4. Open a Terminal
    • pip install marimo click
  5. Open code-sever
  6. Install the marino extension from VSIX
  7. Upload file intro.py.txt and rename to intro.py
  8. Open file intro.py and start marimo server (edit or run)

Expected behavior

Output can be displayed both in internal and external browser.

Context

https://demo.jupyter.b-data.ch

Browser Output
[Warning] [blocked] The page at https://jupyter.b-data.ch/user/benz0li/test-for-jyio/code-server/stable-0c802ba1652296c79d26ff3e990578e67e6734b1/static/out/vs/workbench/contrib/webview/browser/pre/index.html?id=ab415c6a-f29a-48bf-85d8-8ef42f86a5ac&origin=10019dc9-ce7d-48be-b202-f15aba8dab21&swVersion=4&extensionId=marimo-team.vscode-marimo&platform=browser&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&parentOrigin=https%3A%2F%2Fjupyter.b-data.ch&remoteAuthority=jupyter.b-data.ch was not allowed to display insecure content from http://localhost:2718/.

Footnotes

  1. Other proxies in place: JupyterHub: proxy no. 2; JupyterLab: Jupyter Server Proxy (proxy no. 3); code-server: web app (proxy no. 4)

@benz0li
Copy link
Author

benz0li commented Jun 22, 2024

ShinyApps work just fine in the same context. It also works fine with the Shiny extension – both using the internal1 and external browser.

ℹ️ https://shiny.posit.co/r/getstarted/build-an-app/hello-shiny/getting-started.html

Footnotes

  1. Simple Browser

@mscolnick
Copy link
Contributor

@benz0li - can you try the pre-release version (>0.3.3)? you can set https, host, and port? Is that enough to bypass this issue?

@benz0li
Copy link
Author

benz0li commented Jun 26, 2024

@benz0li - can you try the pre-release version (>0.3.3)? you can set https, host, and port? Is that enough to bypass this issue?

You may test yourself at https://demo.jupyter.b-data.ch. Login with your GitHub account.
ℹ️ If the server (container) does not start, just try again.

@benz0li
Copy link
Author

benz0li commented Jun 26, 2024

@mscolnick Not that I am unwilling to test myself... but you get the results faster this way.

And you can check the Browser Console while testing.


P.S.: I consider https://demo.jupyter.b-data.ch a reference deployment where issues [like this one] can be reproduced by any user at any time – independently.

@benz0li
Copy link
Author

benz0li commented Jun 26, 2024

P.P.S.: @mscolnick There was the same error with the LaTeX Workshop extension. For more information, see James-Yu/LaTeX-Workshop@e4e48b1#commitcomment-138712360 ff plus

@benz0li
Copy link
Author

benz0li commented Jun 26, 2024

It does not work on GitHub Codespaces with the internal browser either.

Tested using b-data's/my Data Science dev containers, Python scipy image.

@mscolnick
Copy link
Contributor

Thanks @benz0li - i hopefully can test it out today (need to make the time)

@mscolnick
Copy link
Contributor

@benz0li im still unsure how to test in your environment - but hopefully this fixes it 6bf39d1. I will release shortly

@benz0li
Copy link
Author

benz0li commented Jul 14, 2024

@benz0li im still unsure how to test in your environment

Then, use b-data's/my Data Science dev containers, Python scipy image.

but hopefully this fixes it 6bf39d1.

Unfortunately, it does not.

I will release shortly

Tested with marimo extension v0.4.1.

@benz0li
Copy link
Author

benz0li commented Jul 18, 2024

Does not work with the marimo extension v0.4.2 either.

@benz0li
Copy link
Author

benz0li commented Aug 16, 2024

Still does not work with

  1. code-server
    • non-localhost deployment behind proxy
  2. GitHub Codespaces
    • which is – in its essence – the same as 1.

@legout
Copy link

legout commented Sep 10, 2024

Any updates here? Would be awesome to get this working in code-server.

@benz0li
Copy link
Author

benz0li commented Sep 10, 2024

ℹ️ The marimo extension in the Open VSX Registry is not up to date...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants