Skip to main content

Session Issues

Session Stuck in Pending State

Symptoms:
  • Session status remains pending indefinitely
  • Session never transitions to active state
  • No browser instance appears to be assigned
Common Causes:
  • No available browser instances
  • System experiencing high load
  • Network connectivity issues
  • Resource allocation bottleneck
Solutions:
  1. Wait and Check Status
  2. Terminate and Recreate
  3. Check System Status
    • Visit status.webrun.ai
    • Look for ongoing incidents or maintenance
    • Check response times and success rates
  4. Contact Support
    • If issue persists for > 2 minutes
    • Provide session ID and timestamp
    • Include error logs if available
Prevention:
  • Implement timeout logic when creating sessions
  • Use retry logic with exponential backoff
  • Monitor system status before critical operations

Tasks Timing Out

Symptoms:
  • Tasks return TASK_TIMEOUT error
  • Tasks exceed maxDuration limit
  • Incomplete results with timeout message
Common Causes:
  • Complex pages with heavy JavaScript
  • Slow network connections
  • Task requires multiple page loads
  • Website has anti-bot protections
  • Task instructions too complex
Solutions:
  1. Increase Maximum Duration
  2. Break Down Complex Tasks
  3. Use Starting URL
  4. Optimize Task Instructions
Prevention:
  • Set realistic maxDuration based on task complexity
  • Test tasks on fast network first
  • Monitor task execution times
  • Keep task instructions specific and focused

Tasks Completing But No Result Returned

Symptoms:
  • Polling returns pending: true indefinitely
  • Task appears stuck even though browser finished
  • No error message returned
Common Causes:
  • Task is still genuinely running
  • Network issue between browser instance and API
  • Result notification was lost
  • WebSocket connection dropped
Solutions:
  1. Continue Polling with Timeout
  2. Check WebSocket Events
  3. Terminate and Retry
Prevention:
  • Use WebSocket for real-time updates
  • Implement polling with timeouts
  • Monitor both polling and WebSocket channels

Cost & Performance Issues

High Token Usage / Unexpected Costs

Symptoms:
  • Tasks consuming more tokens than expected
  • Costs higher than estimated
  • usage object shows large token counts
Common Causes:
  • Complex pages with lots of DOM elements
  • Multiple failed attempts and retries
  • Long-running tasks with many interactions
  • Not using token limits
  • Navigation to unnecessary pages
Solutions:
  1. Set Token Limits
  2. Use Starting URL
  3. Block Unnecessary Domains
  4. Simplify Task Instructions
  5. Monitor Usage
Prevention:
  • Always set maxInputTokens and maxOutputTokens
  • Use startingUrl when possible
  • Block ad networks and analytics domains
  • Keep tasks focused and specific
  • Test on simple pages first

Guardrails & Interaction Issues

Guardrails Triggering Unexpectedly

Symptoms:
  • Agent frequently asks for input
  • Tasks pause for user confirmation
  • guardrail_trigger events fire often
Common Causes:
  • Task instructions are ambiguous
  • Website requires login/authentication
  • CAPTCHA or security check encountered
  • Agent uncertain about next action
  • Multiple valid options available
Solutions:
  1. Make Instructions More Specific
  2. Provide Credentials Upfront
  3. Handle Guardrails Programmatically
  4. Avoid Sites Requiring Auth
Prevention:
  • Write clear, unambiguous task instructions
  • Provide all necessary information upfront
  • Test tasks on public pages first
  • Handle common guardrail scenarios programmatically

Streaming & Connection Issues

Video Stream Not Loading

Symptoms:
  • Streaming endpoint returns errors
  • Video player shows no content
  • Connection timeout on stream URL
Common Causes:
  • Session not active yet
  • Invalid session ID
  • Network/firewall blocking WebRTC
  • Browser instance crashed
Solutions:
  1. Verify Session is Active
  2. Check Network Configuration
  3. Use Alternative Streaming Methods
Related:

WebSocket Connection Issues

Symptoms:
  • WebSocket fails to connect
  • Connection drops frequently
  • Events not received
Common Causes:
  • Invalid API key or session ID
  • Firewall blocking WebSocket connections
  • Network instability
  • Session expired
Solutions:
  1. Implement Reconnection Logic
  2. Fall Back to Polling
Prevention:
  • Implement automatic reconnection
  • Have polling fallback ready
  • Monitor connection health
  • Use heartbeat/ping messages

Polling Not Working

Symptoms:
  • Polling requests return 404
  • Task ID not recognized
  • No updates on task status
Common Causes:
  • Incorrect task ID or session ID
  • Task already completed and cleaned up
  • Session expired
  • Network request failing
Solutions:
  1. Verify IDs are Correct
  2. Handle Errors Gracefully
  3. Check Session is Still Active
Prevention:
  • Store IDs immediately when created
  • Validate IDs before polling
  • Check session status first
  • Handle 404 errors gracefully

CAPTCHA & Security Challenges

CAPTCHA Blocking Tasks

Symptoms:
  • Tasks fail at CAPTCHA pages
  • Agent cannot proceed past security checks
  • Guardrail triggers asking how to handle CAPTCHA
Common Causes:
  • Website uses bot detection
  • High security on target site
  • Rate limiting triggered CAPTCHA
  • IP address flagged
Solutions:
  1. Manual Intervention via Guardrails
  2. Use Manual Takeover
  3. Avoid CAPTCHA-Heavy Sites
  4. Rate Limit Your Requests
Prevention:
  • Use manual takeover mode when CAPTCHAs expected
  • Rate limit requests to avoid triggering security
  • Test target sites beforehand
  • Have fallback strategy for CAPTCHA sites

Debugging Tips

Enable Verbose Logging

Monitor All Events


Quick Reference


Next Steps

Error Codes Reference

Complete list of error codes

FAQs

Frequently asked questions

Best Practices

Guidelines for optimal usage

Get Support

Contact our support team