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

[Codespaces/JavaScript] localhost is not accessible from a polyglot notebook within GitHub Codespaces environment #3600

Open
3 of 17 tasks
sinedied opened this issue Jul 10, 2024 · 2 comments

Comments

@sinedied
Copy link
Member

Describe the bug

Please provide as much information as you can.

Please complete the following:

Which version of .NET Interactive are you using? (In a notebook, run the #!about magic command. ):

  • OS
    • Windows 11
    • Windows 10
    • macOS
    • Linux (Please specify distro) Debian GNU/Linux 11 (bullseye) [devcontainer/Codespaces]
    • iOS
    • Android
  • Browser
    • Chrome
    • Edge
    • Firefox
    • Safari
  • Frontend
    • Jupyter Notebook
    • Jupyter Lab
    • nteract
    • Visual Studio Code
    • Visual Studio Code Insiders
    • Visual Studio
    • Other (please specify)

Screenshots

image

I have a JS notebook running in Codespaces. When I try fetching any URL through localhost from the notebook, it does not connect.
I can confirm the server is running, as running curl http://127.0.0.1:11434 in a terminal works fine.
image

Is there anything I'm missing, or is this maybe related only to devcontainer/Codespaces environments?

@jonsequitur
Copy link
Contributor

The Polyglot Notebooks JavaScript kernel runs in the browser, not on the server.

@sinedied
Copy link
Member Author

The Polyglot Notebooks JavaScript kernel runs in the browser, not on the server.

I'm not sure what you mean by that?
Even when running it on my local machine, this does not work. If I open http://127.0.0.1:11434 in my browser, this works. So even if the kernel is running in a different context that the VS Code backend, when running this locally I don't see why this should not work?

To make thing complete, even a simple call to https://www.google.com fails. I've also seen other having difficulties making HTTP call here: https://learn.microsoft.com/en-us/answers/questions/1289426/how-to-correctly-execute-requests-to-the-server-in

Being unable to make HTTP calls from a JS kernel makes it mostly useless, is there any kind of workaround for this?

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

2 participants