Kaggle / Kaggle/kaggle-benchmarks
[Bug]: Bokeh frontend render error only in Kaggle saved notebook history preview
- Dominant language
- Python
- Stars
- 190
- Forks
- 53
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 3
Description
### Bug Description
Bokeh visualization works correctly during live cell execution on Kaggle Notebook, but after saving a notebook version and opening from Version History preview page, Bokeh widget fails to render with JS TypeError in browser console.
### Kaggle Username
liuweiq
### Execution Environment
Kaggle Notebook
### Are you using Kaggle Benchmarks in your code?
Yes — I import and use kaggle_benchmarks directly
### Steps to Reproduce
1. use example code
2. save version
3. view version
### Code to Reproduce
```python
https://www.kaggle.com/code/liuweiq/new-benchmark-task-d856f/notebook?scriptVersionId=324755834
```
### Expected Behavior
show AI response
### Actual Behavior
js error
### Error Output / Traceback
```shell
[Open Browser Console for more detailed log - Double click to close this message]
Failed to create view for 'BokehView' from module '@bokeh/jupyter_bokeh' with model 'BokehModel' from module '@bokeh/jupyter_bokeh'
TypeError: Cannot read properties of undefined (reading 'require')
at St (https://cdn.jsdelivr.net/npm/@bokeh/jupyter_bokeh@%5E4.0.5/dist/index.js:2:379889)
at new Tt (https://cdn.jsdelivr.net/npm/@bokeh/jupyter_bokeh@%5E4.0.5/dist/index.js:2:380410)
at https://unpkg.com/@jupyter-widgets/html-manager@*/dist/embed-amd.js:24:1004653
at async https://unpkg.com/@jupyter-widgets/html-manager@*/dist/embed-amd.js:33:297760
at async Promise.all (index 0)
at async https://unpkg.com/@jupyter-widgets/html-manager@*/dist/embed-amd.js:33:297296
at async Promise.all (index 0)
at async P.F.then.o.HTMLManager.loader (https://unpkg.com/@jupyter-widgets/html-manager@*/dist/embed-amd.js:33:297049)
```
### Environment Info
```shell
```
### LLM Model Used
_No response_
### Shared Asset Links
https://www.kaggle.com/code/liuweiq/new-benchmark-task-d856f/notebook?scriptVersionId=324755834
### Additional Context
_No response_
### Pre-submission Checklist
- [x] I have searched the existing issues and this bug has not been reported before.
- [x] I am using the latest version of kaggle-benchmarks (or have noted my version above).
- [x] I have shared my relevant Kaggle assets (notebooks, datasets, etc.) with kaggle-ai-resources-support@google.com as a Viewer, or I have explained in the issue why I cannot.
Contributor guide
Research direction
Start with the linked Kaggle notebook and compare live execution with the saved Version History preview, then inspect the browser console trace for the @bokeh/jupyter_bokeh and html-manager loading failure. Done means the Bokeh widget renders in the saved preview without the JavaScript TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter-notebook, python
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100