Dashboard Fails to Load Bokeh Resources After Google OAuth Integration on FastAPI

Hello Bokeh Community,

What I am trying to do:

I’ve built a dashboard application using HoloViz Panel (built on Bokeh), served via FastAPI. It was working perfectly on deployment. However, after integrating Google OAuth for authentication, upon successful login, the dashboard is not rendering correctly, and I’m seeing multiple 404 errors in the console(browser inspect element) related to Bokeh and Panel static resources.

What did not work:

Post-OAuth integration, the application fails to load the necessary JavaScript and CSS resources required for Bokeh and Panel to function. Directly accessing these URLs provides a {"detail":"Not Found"} response, despite the resources being present in their respective directories on the server.

Additional Details:

  • The errors include 404 for bokeh.min.js, bokeh-widgets.min.js, bokeh-tables.min.js, and related Panel extension files.
  • A ReferenceError is thrown in the console for the Bokeh JavaScript variable, implying that the Bokeh files are not loaded.
  • A TypeError associated with window.fastDesignProvider suggests a failure in initializing some JavaScript components.

Given the nature of the problem, I am unable to provide a minimal reproducible code example, as I assume this is a deployment issue rather than a code issue.

Please let me know, if you want me to provide any code blocks or any further information that can help clarify things

Request for Help:

I am looking for guidance on what might be causing these resource loading issues in the context of OAuth integration and how to resolve them. Any advice on additional checks or configurations that might address this problem would be greatly appreciated.

Thank you in advance for your assistance!

I’d suggest taking this to the Holoviz Discourse: https://discourse.holoviz.org/ It was the Holoviz team that created the OAuth integration with Panel, not the Bokeh team.

Thanks @Bryan I would do so.

Otherwise, I should mention, another option is to set BOKEH_RESOURCES=cdn to load BokehJS from cdn.bokeh.org instead of having the Bokeh server be responsible for serving those things. This is what I would recommend “for production” in any case (assuming you are not in an airgapped situation, etc.) since it will allow browsers to successfully cache BokehJS and also take work off the Bokeh server.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.