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
[BUG] Static paths loaded always from localhost in Bokeh 3.1.1 #13170
Comments
This is a side effect of PR #13041. |
+1, I currently did not find a way to deploy a Dockerfile based on |
@albertosottile unless you are in an air-gapped situation, I'd recommend setting the environment variable |
We have also seen that 3.1.1 breaks proxied serving of Bokeh applications. Previously, with the 3.1.0 release, relative URLs were used for the various Bokeh resources. These relative references were successfully resolved when the Bokeh application was hosted behind a proxy server (rewriting the protocol, the host, the port, and the path). Here is a simple Dockerfile to help recreate the problem: FROM python:3.11
ARG BOKEH_VERSION=3.1.1
RUN pip install bokeh==${BOKEH_VERSION}
COPY sliders.py /content/sliders.py
WORKDIR /content You can build then run with: docker build --build-arg BOKEH_VERSION=3.1.1 -t bokeh-test .
docker run -it --rm -p 5007:5006 bokeh-test bokeh serve --allow-websocket-origin='*' --show sliders.py Visit the hosted application at Use @bryevdv & @mattpap - Are you indicating that this is an intentional regression in the 3.1.1 patch release? That is not obvious from the https://github.com/bokeh/bokeh/blob/branch-3.1/docs/CHANGELOG (also, minor point: the 3.1.1 notes aren't available on the branch-3.2 or main versions of the CHANGELOG) |
@aronatkins this issue has been labeled as a bug.
Forward porting of changelogs to newer branches is still manual, so it currently happens whenever someone gets to it. Someone helping to automate this would be appreciated. |
Thanks @bryevdv. It wasn't clear that folks were treating this as a regression. The suggestion to use CDN-hosted assets felt like it was given as a long-term solution rather than a temporary workaround. I apologize for my initial misinterpretation. |
Adding |
Software versions
Python version : 3.11.3 (tags/v3.11.3:f3909b8, Apr 4 2023, 23:49:59) [MSC v.1934 64 bit (AMD64)]
IPython version : (not installed)
Tornado version : 6.3.2
Bokeh version : 3.1.1
BokehJS static path : C:\bokeh-error\venv\Lib\site-packages\bokeh\server\static
node.js version : v16.14.2
npm version : 8.5.0
Operating system : Windows-10-10.0.19044-SP0
Browser name and version
No response
Jupyter notebook / Jupyter Lab version
No response
Expected behavior
When running bokeh server on remote server it is expected that browser would try to load static paths from the server, not from the localhost. However, it seems that it always tries to load static paths from the localhost with Bokeh 3.1.1 while Bokeh 3.1.0 works well.
This can be demonstrated from local machine as well by the following steps:
Observed behavior
Static paths are loaded from localhost instead of actual IP_ADDRESS
Example code
Stack traceback or browser console output
No response
Screenshots
The text was updated successfully, but these errors were encountered: