[Bug]: `/proxy/<port>/` does not work (at least for Streamlit and Vaadin apps)
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
OS/Web Information
- Web Browser: Chrome
- Local OS: MacOS
- Remote OS: Ubuntu 22.04
- Remote Architecture: x86
code-server --version
: 4.7.1
Steps to Reproduce
- Clone any Streamlit or Vaadin app (possibly others?), e.g. https://github.com/aghasemi/streamlit_js_eval.
- Run it. Example:
streamlit run example.py
- Vidit
myCodeServer/proxy/8501
Expected
The app should run.
Actual
There is just a blank screen with Streamlit loading title.
Logs
No response
Screenshot/Video
On the server, logs look normal.
On the client (browser), if you open the JS console, you see errors in the form of
/:vendor/bokeh/bokeh-gl-2.4.3.min.js:1
Failed to load resource: the server responded with a status of 404 (Not Found)
, where I believe the part with the colon is the culprit.
Is there anything else I need to do to make this work? I just followed the steps in .
Many thanks Best
Does this issue happen in VS Code or GitHub Codespaces?
- I cannot reproduce this in VS Code.
- I cannot reproduce this in GitHub Codespaces.
Are you accessing code-server over HTTPS?
- I am using HTTPS.
Notes
No response
Issue Analytics
- State:
- Created a year ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
App is not loading when running remotely - Streamlit Docs
Symptom #1: The app never loads ... If that still doesn't solve the problem, try running a simple HTTP server instead of Streamlit,...
Read more >New error for all existing streamlit apps
Hello, I have multiple streamlit apps, that all have been working fine ... The error message doesn't seem to refer to a line...
Read more >Possible bug in app start message - Using Streamlit
I'm beginning to get familiar with streamlit, and I'm noticing a strange behaviour. I'm running my app with the following command: python -m...
Read more >Troubleshooting - Streamlit Docs
This is best suited for any questions related to the open source library and Community Cloud - debugging code, deployment, resource limits, etc....
Read more >After upgrade to the latest version now this error id showing up ...
Let's get your app running first, and then we'll fix the issue with the configuration file. Try running your script with streamlit run...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Uhh nevermind I am being dumb, a proxied application at the root would only see
/
in both trailing and non-trailing cases which means a trailing slash is always required at the root of a proxied application (unless the rewriting proxy itself distinguishes between a blank string and/
at the root which I am not sure they do; would need to test this). The last paragraph I wrote in the previous comment only applies to the application’s own sub-paths.I guess to summarize all the noise I just put down this seems to be working as intended. 😆
I was not able to reproduce the colon (it looks like it is evaluating the JS but not sure how that would happen) but for anyone curious the served HTML looks like this:
The behavior of
.
in browsers depends on the trailing slash so for example if the URL is./vendor
then with/proxy/8501
that becomes/proxy/vendor
(a 404) and with/proxy/8501/
that becomes/proxy/8501/vendor
(works).~Ideally the application itself would check for a trailing slash and use either
.
or./8501
so it works with or without a trailing slash (this is what code-server does to work at any path with or without a trailing slash) but this is pretty rare; most applications in the wild seem to depend on either a hard-coded base path or a trailing slash.~ (nevermind see next comment)