Troubleshooting
Solutions for common CBrowser issues.
Installation Issues
"playwright: command not found"
Problem: Playwright browsers not installed.
Solution:
npx playwright install chromium
"EACCES: permission denied"
Problem: npm permission issues on Linux/macOS.
Solution:
# Option 1: Use npx (recommended)
npx cbrowser --version
# Option 2: Fix npm permissions
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
npm install -g cbrowser
"Node version not supported"
Problem: CBrowser requires Node.js 18+.
Solution:
# Check version
node --version
# Update with nvm
nvm install 20
nvm use 20
Browser Issues
"Browser closed unexpectedly"
Problem: Browser crashes during operation.
Possible causes:
- Memory: Browser ran out of memory
- Timeout: Operation took too long
- GPU: Graphics driver issue
Solutions:
# Increase timeout
npx cbrowser navigate "https://example.com" --timeout 120000
# Disable GPU (Linux)
PLAYWRIGHT_CHROMIUM_ARGS="--disable-gpu" npx cbrowser ...
# Use different browser
npx cbrowser navigate "https://example.com" --browser firefox
"Display not found" / "Cannot open display"
Problem: No display available (headless server).
Solution:
# Force headless mode
CBROWSER_HEADLESS=true npx cbrowser navigate "https://example.com"
# Or install virtual display (Linux)
sudo apt-get install xvfb
xvfb-run npx cbrowser navigate "https://example.com"
Browser hangs on certain sites
Problem: Page never finishes loading.
Solutions:
# Increase timeout
npx cbrowser navigate "https://slow-site.com" --timeout 60000
# Some sites block automation - try with different user agent
# (Configure in .cbrowserrc.json)
Selector Issues
"Element not found"
Problem: CBrowser can't find the element.
Solutions:
- Check the page loaded: Add a wait or verify the URL first
go to https://example.com
wait 2 seconds
click "Login"
- Use more specific description:
# Instead of
click "Submit"
# Try
click "Submit button in the login form"
- Check if element is in iframe:
# CBrowser doesn't automatically switch to iframes
# The element might be inside an iframe
- Clear selector cache:
npx cbrowser heal clear
"Element not interactable"
Problem: Element exists but can't be clicked/filled.
Causes:
- Element is hidden
- Element is disabled
- Another element overlays it
- Element is still animating
Solutions:
# Add wait
wait 1 second
click "Button"
# Or wait for specific condition
wait for "Loading" to disappear
click "Button"
Self-healing not finding alternatives
Problem: Smart-click fails even with retries.
Solutions:
- Check heal stats:
npx cbrowser heal stats
- Clear corrupted cache:
npx cbrowser heal clear
- Increase retries:
npx cbrowser smart-click "Button" --max-retries 5
Test Issues
Tests pass locally but fail in CI
Common causes:
- Timing differences: CI is slower
# Add explicit waits
wait 2 seconds
- Screen size differences:
# Set consistent viewport
npx cbrowser test-suite tests.txt --viewport 1920x1080
- Missing browsers in CI:
# GitHub Actions
- run: npx playwright install chromium
Flaky tests despite fixes
Problem: Tests still intermittently fail.
Solutions:
- Run more iterations:
npx cbrowser flaky-check tests.txt --runs 20
-
Check per-step analysis: Find exactly which step is flaky
-
Add defensive waits:
click "Save"
wait for "Saved successfully" to appear
verify page contains "Saved"
- Avoid timing-dependent assertions:
# Bad - depends on exact count
verify page contains "10 results"
# Better - resilient to changes
verify page contains "results"
Test repair suggestions don't work
Problem: AI repair suggestions have low confidence or don't fix the issue.
Solutions:
- Run without auto-apply first: Review suggestions manually
npx cbrowser repair-tests tests.txt
# Review suggestions, then:
npx cbrowser repair-tests tests.txt --auto-apply
- Page might have changed significantly: Re-analyze the page
npx cbrowser analyze "https://example.com/page"
- Regenerate tests from scratch:
npx cbrowser generate-tests "https://example.com/page"
Session Issues
"Session not found"
Problem: Saved session doesn't exist.
Solution:
# List available sessions
npx cbrowser session list
# Check session directory
ls ~/.cbrowser/sessions/
Session loads but I'm logged out
Problem: Session expired or cookies cleared.
Causes:
- Session cookies expired
- Site invalidated the session
- Different browser fingerprint
Solutions:
-
Re-save the session after logging in again
-
Check session age:
npx cbrowser session list # Shows last used date
- Some sites require fresh sessions - save more frequently
Cookies not persisting
Problem: Changes not saved between commands.
Solution: Use persistent mode:
npx cbrowser navigate "https://example.com" --persistent
npx cbrowser fill "email" "[email protected]" --persistent
# Both commands share the same browser context
MCP Issues
Tools not appearing in Claude
Problem: CBrowser tools don't show in Claude Desktop.
Solutions:
- Check config syntax: Ensure valid JSON
{
"mcpServers": {
"cbrowser": {
"command": "npx",
"args": ["cbrowser", "mcp-server"]
}
}
}
-
Restart Claude Desktop completely (not just close window)
-
Check CBrowser is installed:
npx cbrowser --version
- Check config file location:
- Linux:
~/.config/Claude/claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
MCP connection timeout
Problem: Claude can't connect to CBrowser server.
Solutions:
- Increase timeout in config:
{
"mcpServers": {
"cbrowser": {
"command": "npx",
"args": ["cbrowser", "mcp-server"],
"env": {
"CBROWSER_TIMEOUT": "120000"
}
}
}
}
- Check for conflicting processes:
ps aux | grep cbrowser
Performance Issues
Commands are slow
Solutions:
- Use persistent mode:
npx cbrowser navigate "..." --persistent
- Reduce screenshots:
# Only screenshot when needed
go to https://example.com
# Don't: take screenshot after every step
verify page contains "text"
take screenshot # Only at end
- Use headless mode (default, fastest)
High memory usage
Problem: Browser consumes too much RAM.
Solutions:
- Close browser when done:
await browser.close();
-
Don't use persistent mode for long operations
-
Reduce concurrent operations
Getting Help
If none of these solutions work:
-
Check existing issues: GitHub Issues
-
Create detailed bug report with:
- CBrowser version (
npx cbrowser --version) - Node.js version (
node --version) - Operating system
- Full error message
- Minimal reproduction steps
- CBrowser version (
-
Include relevant logs:
DEBUG=cbrowser:* npx cbrowser ...
Copyright: (c) 2026 Alexa Eden.
License: MIT License
Contact: [email protected]