Bug: view screenshot hangs on headless Linux (chromium waits indefinitely for external resources)
Environment
- OS: Rocky Linux 10.1
- OfficeCLI: v1.0.131 (linux-x64)
- Chromium: 149.0.7827.53 (
headless=new)
- Network: external access OK (
fonts.googleapis.com and cdn.jsdelivr.net reachable)
Steps to reproduce
officecli create test.docx
officecli add test.docx / --type paragraph --prop text="Hello" --prop size=48
officecli close test.docx
officecli view test.docx screenshot -o test.png # hangs forever
Root cause
OfficeCLI's generated HTML references external CDN resources:
fonts.googleapis.com/css2?family=...
cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css
cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.js
Chromium in headless mode waits for these to fully load before taking the screenshot. Without --virtual-time-budget, it waits indefinitely even though the network is accessible.
Verified
chromium-browser --headless about:blank → screenshot completes instantly ✅
- OfficeCLI's
__resident-serve__ correctly discovers and spawns chromium with --headless=new --no-sandbox --disable-gpu --screenshot=... ✅
- Same chromium, same HTML file, but with
--virtual-time-budget=10000 → screenshot completes in <2s ✅
Workaround
officecli view test.docx html -o test.html
chromium-browser --headless=new --no-sandbox --disable-gpu \
--virtual-time-budget=10000 \
--screenshot=test.png \
file:///test.html
Suggested fix
Pass --virtual-time-budget (10000-15000ms) to chromium in screenshot mode, or inline critical CSS/fonts to avoid external dependency blocking.
Additional feedback
dump → batch and merge are excellent. Worth the install cost alone. 🚀
Bug:
view screenshothangs on headless Linux (chromium waits indefinitely for external resources)Environment
headless=new)fonts.googleapis.comandcdn.jsdelivr.netreachable)Steps to reproduce
Root cause
OfficeCLI's generated HTML references external CDN resources:
fonts.googleapis.com/css2?family=...cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.csscdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.jsChromium in headless mode waits for these to fully load before taking the screenshot. Without
--virtual-time-budget, it waits indefinitely even though the network is accessible.Verified
chromium-browser --headless about:blank→ screenshot completes instantly ✅__resident-serve__correctly discovers and spawns chromium with--headless=new --no-sandbox --disable-gpu --screenshot=...✅--virtual-time-budget=10000→ screenshot completes in <2s ✅Workaround
Suggested fix
Pass
--virtual-time-budget(10000-15000ms) to chromium in screenshot mode, or inline critical CSS/fonts to avoid external dependency blocking.Additional feedback
dump→batchandmergeare excellent. Worth the install cost alone. 🚀