[Codespaces/JavaScript] localhost is not accessible from a polyglot notebook within GitHub Codespaces environment
sinedied opened this issue · comments
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
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.
Is there anything I'm missing, or is this maybe related only to devcontainer/Codespaces environments?
The Polyglot Notebooks JavaScript kernel runs in the browser, not on the server.
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?