e2b-dev / e2b-dev/desktop

Failed to start Xvfb: context deadline exceeded:

Open
#129 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.5k
Forks
184
Avg merge
12h 6m
Merged PRs (30d)
7

Description

I am not sure but this simple script used to work earlier, but now e2b-desktop containers are not coming up and I keep getting this error

Error: context deadline exceeded: This error is likely due to exceeding 'timeout' — the total time a long running request (like process or directory watch) can be active. It can be modified by passing 'timeout' when making the request. Use '0' to disable the timeout.

I tried with timeout value zero but no luck.

Any help would be great. Thanks.

from e2b_desktop import Sandbox

def main():
    try:
        print("Creating custom-computer-agent desktop sandbox...")
        
        # Create the desktop sandbox
        desktop = Sandbox.create(
            template="custom-computer-agent"
        )
        
        print(f"Sandbox created with ID: {desktop.sandbox_id}")
        
        # Start the stream
        print("Starting desktop stream...")
        desktop.stream.start()
        
        # Get interactive stream URL
        interactive_url = desktop.stream.get_url()
        print(f"Interactive VNC URL: {interactive_url}")
        
        # Get view-only stream URL
        view_only_url = desktop.stream.get_url(view_only=True)
        print(f"View-only VNC URL: {view_only_url}")
        
        print(f"\nSandbox ID: {desktop.sandbox_id}")
        print("Sandbox is ready for VNC access!")
        
        # Keep the script running to maintain the connection
        print("\nPress Ctrl+C to stop the stream and close the sandbox...")
        
        # Wait for user interrupt
        try:
            while True:
                import time
                time.sleep(1)
        except KeyboardInterrupt:
            print("\nStopping desktop stream...")
            desktop.stream.stop()
            print("Stream stopped.")
            
    except Exception as e:
        print(f"Error: {e}")
        return 1
    
    return 0

if __name__ == "__main__":
    exit(main())

so I tried to copy the Sandbox from desktop, and re-run then I get

Error: Failed to start Xvfb: context deadline exceeded: This error is likely due to exceeding 'timeout' — the total time a long running request (like process or directory watch) can be active. It can be modified by passing 'timeout' when making the request. Use '0' to disable the timeout.

version of e2b-desktop is "e2b-desktop>=2.0.2",

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the provided Python script with e2b-desktop>=2.0.2, focusing on Sandbox.create and desktop.stream.start. Compare the original startup failure with the later “Failed to start Xvfb” error and determine what information is needed to identify the timeout cause. Done means documenting a reproducible cause and a confirmed way for the desktop stream to start.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.