Playwright tests for Buckaroo widgets in marimo notebooks timeout waiting for widget elements to appear in the DOM. All 6 marimo tests fail with:
TimeoutError: locator.waitFor: Timeout 30000ms exceeded.
- waiting for locator('.buckaroo_anywidget').first() to be visible
- Python side: Widget instantiation and dataflow execution work perfectly
- Static assets: widget.js (2.3MB) and compiled.css (8.3KB) are built and present
- Marimo server: Starts without errors and serves HTML correctly
- Notebook execution: All cells execute successfully without Python errors
- Widget rendering in browser: The
.buckaroo_anywidgetelements never appear in the DOM - Marimo integration: Marimo logs "This notebook has errors, saving may lose data" warning
- Minimal anywidget test: Even a simple inline anywidget fails to render in marimo
-
Tested Python execution directly:
BuckarooWidget(small_df)andBuckarooInfiniteWidget(large_df)instantiate successfully- Static files load properly into
_esmand_cssattributes
-
Tested marimo server:
- HTML is served correctly
- No Python errors in execution
- CSS includes
.buckaroo_anywidgetselector
-
Tested minimal anywidget:
- Even a simple inline anywidget with no external files fails to render
- Marimo shows the same "notebook has errors" warning
Marimo's anywidget support appears to be incomplete or broken in version 0.17.6/0.18.4. The widgets are instantiated in Python but not rendered by the marimo frontend/anywidget integration layer.
-
✅ Version Update to 0.20.1:
- Upgraded from 0.17.6 to 0.20.1 via
uv sync - Result: Tests still fail with same widget rendering timeout
- Conclusion: Issue persists across versions, not a version-specific bug
- Upgraded from 0.17.6 to 0.20.1 via
-
❌ Wrapper Patterns:
- Tried
mo.output(widget, ...)wrapper pattern - Tried explicit widget return in cells
- Tried widget as last expression
- Result: All patterns fail with timeouts
- Conclusion: Not a usage pattern issue
- Tried
-
❌ Widget Display Patterns:
- Multiple cell structures tested
- All result in same widget rendering failure
- Conclusion: Fundamental marimo/anywidget integration issue
/Users/paddy/buckaroo/buckaroo/static/widget.js- Frontend code (added)/Users/paddy/buckaroo/buckaroo/static/compiled.css- Styles (added)/Users/paddy/buckaroo/tests/notebooks/marimo_pw_test.py- Test notebook/Users/paddy/buckaroo/packages/buckaroo-js-core/pw-tests/marimo.spec.ts- Playwright tests
Minimum marimo version set to 0.19.7 in pyproject.toml:
- Specified in both
[project.optional-dependencies]and[dependency-groups] - Allows recent marimo releases (0.20.1+ installed)
- 0.19.7 is the WASM release available on marimo.io
-
Skip marimo tests in CI (until upstream fix):
- Add
continue-on-error: trueto marimo test step in CI workflow - Prevents build failures due to infrastructure issue
- Add
-
File upstream issue with marimo project:
- Provide minimal reproduction: simple anywidget in marimo notebook
- Affects all anywidgets, not just Buckaroo
-
Monitor marimo releases:
- Check if future versions restore anywidget support
- May require marimo team investigation/fix
-
Alternative: Use Jupyter notebooks instead
- Tests work fine with Jupyter/JupyterLab
- marimo integration appears incomplete