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

[BUG] Issue connecting with bokeh serve (using websocket origin) under 3.2.0 #13235

Closed
Latill opened this issue Jun 28, 2023 · 1 comment
Closed

Comments

@Latill
Copy link
Contributor

Latill commented Jun 28, 2023

Software versions

Python version : 3.9.2 (default, Feb 28 2021, 17:03:44)
IPython version : 7.20.0
Tornado version : 5.1.1
Bokeh version : 3.2.0
BokehJS static path : /home/dthillou/.local/lib/python3.9/site-packages/bokeh/server/static
node.js version : (not installed)
npm version : (not installed)
Operating system : Linux-5.10.0-23-amd64-x86_64-with-glibc2.31

Browser name and version

Chrome Version 114.0.5735.198 (but same issue in Egde)

Jupyter notebook / Jupyter Lab version

No response

Expected behavior

Any app launched using the --allow-websocket-origin argument.

Pattern in 3.1.0 (working)

Application working, with:

Hovering on the js link, I get the full address from where he fetched it, and it is the host indicated in websocket-origin

And everything works.

Observed behavior

Pattern in 3.2.0 (just calling python3 -m pip install bokeh==3.2.0 in between)

Application fails to load, without log on bokeh serve side, and with a fetch resources error on browser console side:
3a07394b88baf8e1626f22a019da5a82a2d2f75a

As you can see, he seemed to have not forwarded the request to the websocket origin, but instead went on with ‘localhost’, hence the fail.

2 additional checks:

  • Opening the app from a browser on the app host machine works, as the localhost request for resources logically works there.
  • Taking the resource request address e.g. http://localhost:12007/static/js/bokeh.min.js?v=c836b057bc9b401d63918fcc71d81351 , replacing localhost by the right remote websocket origin, and trying to open it directly in browser works, it returns the script. So with the right address the server let it through ok.

So it seems to me there was a regression in 3.2.0, with the resource request not being forwarded anymore to the websocket origin host.

Example code

from bokeh.models.widgets import Div
from bokeh.io import curdoc
curdoc().add_root(Div(text="test"))

Stack traceback or browser console output

App is launched using the --allow-websocket-origin argument

Issue already submited on https://discourse.bokeh.org/t/issue-connecting-with-bokeh-serve-under-3-2-0/10582

Screenshots

No response

@Latill Latill added the TRIAGE label Jun 28, 2023
@Latill Latill changed the title [BUG] Issue connecting with bokeh serve under 3.2.0 [BUG] Issue connecting with bokeh serve (using websocket origin) under 3.2.0 Jun 28, 2023
@mattpap
Copy link
Contributor

mattpap commented Jun 28, 2023

using websocket origin

If the main bokehjs bundle doesn't load, then this has no effect, because websockets won't be set up otherwise. This is almost certainly a duplicate of earlier issues, specifically #13170, which is a side effect of PR #13041.

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

No branches or pull requests

2 participants