Agent Error when providing prompt
Running through docker desktop. I can open the portal using URL:http://localhost:7788/. When I provide prompt or run the pre-provided example prompt, it failed with following error.
cannot open resource Traceback (most recent call last): File "/app/webui.py", line 292, in run_custom_agent history = await agent.run(max_steps=max_steps) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/src/agent/custom_agent.py", line 405, in run self.create_history_gif() File "/app/src/agent/custom_agent.py", line 302, in create_history_gif task_frame = self._create_task_frame( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/browser_use/agent/service.py", line 713, in _create_task_frame larger_font = ImageFont.truetype( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/PIL/ImageFont.py", line 879, in truetype return freetype(font) ^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/PIL/ImageFont.py", line 876, in freetype return FreeTypeFont(font, size, index, encoding, layout_engine) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/PIL/ImageFont.py", line 288, in init load_from_bytes(cast(IO[bytes], font)) File "/usr/local/lib/python3.11/site-packages/PIL/ImageFont.py", line 268, in load_from_bytes self.font = core.getfont( ^^^^^^^^^^^^^ OSError: cannot open resource
Hi there. I just tested it out and it was fine. Maybe you missed a step?
With docker, you need to connect to VNC to let the browser do the work and see the flow of the program.
Simply go to http://localhost:6080/vnc.html after you got the docker up and running. It requires a password, but if you didn't provide any password in the .env file, you can simply type vncpassword on that webpage. Afterwards, you can click on Run Agent at 127.0.0.1:7788 and see the results in VNC. Make sure you don't have any terminal running the code beside your docker.
To sum up the steps:
- type below in your terminal:
docker compose up -d
- Go to:
http://localhost:6080/vnc.html
and type your password (default = vncpassword).
- After that, go to
127.0.0.1:7788and run the agent with your desired prompt.
Hope it helps.
P.S.
You can check the logs and see the process of the Agent via the Docker App or by typing docker compose logs -f in your terminal.
Running through docker desktop. I can open the portal using URL:http://localhost:7788/. When I provide prompt or run the pre-provided example prompt, it failed with following error.
cannot open resource Traceback (most recent call last): File "/app/webui.py", line 292, in run_custom_agent history = await agent.run(max_steps=max_steps) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/src/agent/custom_agent.py", line 405, in run self.create_history_gif() File "/app/src/agent/custom_agent.py", line 302, in create_history_gif task_frame = self._create_task_frame( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/browser_use/agent/service.py", line 713, in _create_task_frame larger_font = ImageFont.truetype( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/PIL/ImageFont.py", line 879, in truetype return freetype(font) ^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/PIL/ImageFont.py", line 876, in freetype return FreeTypeFont(font, size, index, encoding, layout_engine) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/PIL/ImageFont.py", line 288, in init load_from_bytes(cast(IO[bytes], font)) File "/usr/local/lib/python3.11/site-packages/PIL/ImageFont.py", line 268, in load_from_bytes self.font = core.getfont( ^^^^^^^^^^^^^ OSError: cannot open resource
There is a bug on generating gif :https://github.com/browser-use/browser-use/pull/202. Please update the codes of browser-use and web-ui, that should have been fixed
docker with vnc or running in a python environment I get these errors. 2025-01-12 09:30:55 browser-use-webui-1 | 2025-01-12 16:30:55,798 DEBG received SIGCHLD indicating a child quit
2025-01-12 09:31:05 browser-use-webui-1 | ERROR [src.browser.custom_browser] Failed to start a new Chrome instance.: BrowserType.connect_over_cdp: connect ECONNREFUSED ::1:9222
2025-01-12 09:31:05 browser-use-webui-1 | Call log:
2025-01-12 09:31:05 browser-use-webui-1 | -
docker with vnc or running in a python environment I get these errors. 2025-01-12 09:30:55 browser-use-webui-1 | 2025-01-12 16:30:55,798 DEBG received SIGCHLD indicating a child quit 2025-01-12 09:31:05 browser-use-webui-1 | ERROR [src.browser.custom_browser] Failed to start a new Chrome instance.: BrowserType.connect_over_cdp: connect ECONNREFUSED ::1:9222 2025-01-12 09:31:05 browser-use-webui-1 | Call log: 2025-01-12 09:31:05 browser-use-webui-1 | - retrieving websocket url from http://localhost:9222 2025-01-12 09:31:05 browser-use-webui-1 | 2025-01-12 09:31:05 browser-use-webui-1 | 2025-01-12 16:31:05,363 DEBG 'webui' stdout output: 2025-01-12 09:31:05 browser-use-webui-1 | ERROR [src.browser.custom_browser] Failed to start a new Chrome instance.: BrowserType.connect_over_cdp: connect ECONNREFUSED ::1:9222 2025-01-12 09:31:05 browser-use-webui-1 | Call log: 2025-01-12 09:31:05 browser-use-webui-1 | - retrieving websocket url from http://localhost:9222 2025-01-12 09:31:05 browser-use-webui-1 | 2025-01-12 09:31:05 browser-use-webui-1 | 2025-01-12 09:31:05 browser-use-webui-1 | 2025-01-12 16:31:05,363 DEBG 'webui' stdout output: 2025-01-12 09:31:05 browser-use-webui-1 | ERROR [src.browser.custom_browser] Failed to start a new Chrome instance.: BrowserType.connect_over_cdp: connect ECONNREFUSED ::1:9222 2025-01-12 09:31:05 browser-use-webui-1 | Call log: 2025-01-12 09:31:05 browser-use-webui-1 | - retrieving websocket url from http://localhost:9222 2025-01-12 09:31:05 browser-use-webui-1 | 2025-01-12 09:31:05 browser-use-webui-1 | 2025-01-12 09:31:05 browser-use-webui-1 | ERROR [agent] ❌ Result failed 1/5 times: 2025-01-12 09:31:05 browser-use-webui-1 | To start chrome in Debug mode, you need to close all existing Chrome instances and try again otherwise we can not connect to the instance. 2025-01-12 09:31:05 browser-use-webui-1 | INFO [src.agent.custom_agent] 2025-01-12 09:31:05 browser-use-webui-1 | 📍 Step 1 2025-01-12 09:31:05 browser-use-webui-1 | 2025-01-12 16:31:05,363 DEBG 'webui' stdout output: 2025-01-12 09:31:05 browser-use-webui-1 | ERROR [agent] ❌ Result failed 1/5 times: 2025-01-12 09:31:05 browser-use-webui-1 | To start chrome in Debug mode, you need to close all existing Chrome instances and try again otherwise we can not connect to the instance. 2025-01-12 09:31:05 browser-use-webui-1 | INFO [src.agent.custom_agent] 2025-01-12 09:31:05 browser-use-webui-1 | 📍 Step 1 2025-01-12 09:31:05 browser-use-webui-1 | 2025-01-12 09:31:05 browser-use-webui-1 | 2025-01-12 16:31:05,363 DEBG 'webui' stdout output: 2025-01-12 09:31:05 browser-use-webui-1 | ERROR [agent] ❌ Result failed 1/5 times: 2025-01-12 09:31:05 browser-use-webui-1 | To start chrome in Debug mode, you need to close all existing Chrome instances and try again otherwise we can not connect to the instance. 2025-01-12 09:31:05 browser-use-webui-1 | INFO [src.agent.custom_agent] 2025-01-12 09:31:05 browser-use-webui-1 | 📍 Step 1
You set the Use Own Browser with docker which is not quite right. I just tested the latest code and on terminal it was fine, but when using docker, by setting Use Own Browser in Browser Settings, you are trying to get a google chrome profile which VNC doesn't have access to. It can be a future update to do so. @warmshao
I'm not running with docker but still get similar error @MeshkatShB
ERROR [src.browser.custom_browser] Failed to start a new Chrome instance.: BrowserType.connect_over_cdp: connect ECONNREFUSED ::1:9222 Call log:
retrieving websocket url from http://localhost:9222
WARNING [browser] Page load failed, continuing... ERROR [src.browser.custom_browser] Failed to start a new Chrome instance.: BrowserType.connect_over_cdp: connect ECONNREFUSED ::1:9222 Call log:
retrieving websocket url from http://localhost:9222
WARNING [src.agent.custom_agent] No history to create GIF from Traceback (most recent call last): File "Q:\src\web-ui\src\browser\custom_browser.py", line 79, in _setup_browser browser = await playwright.chromium.connect_over_cdp( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "Q:\src\web-ui.venv\Lib\site-packages\playwright\async_api_generated.py", line 14779, in connect_over_cdp await self._impl_obj.connect_over_cdp( File "Q:\src\web-ui.venv\Lib\site-packages\playwright_impl_browser_type.py", line 174, in connect_over_cdp response = await self._channel.send_return_as_dict("connectOverCDP", params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "Q:\src\web-ui.venv\Lib\site-packages\playwright_impl_connection.py", line 67, in send_return_as_dict return await self._connection.wrap_api_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "Q:\src\web-ui.venv\Lib\site-packages\playwright_impl_connection.py", line 528, in wrap_api_call raise rewrite_error(error, f"{parsed_st['apiName']}: {error}") from None playwright._impl._errors.Error: BrowserType.connect_over_cdp: connect ECONNREFUSED ::1:9222 Call log:
retrieving websocket url from http://localhost:9222
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "Q:\src\web-ui\webui.py", line 372, in run_custom_agent history = await agent.run(max_steps=max_steps) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "Q:\src\web-ui\src\agent\custom_agent.py", line 383, in run state = await self.browser_context.get_state(use_vision=self.use_vision) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "Q:\src\web-ui.venv\Lib\site-packages\browser_use\browser\context.py", line 540, in get_state session = await self.get_session() ^^^^^^^^^^^^^^^^^^^^^^^^ File "Q:\src\web-ui.venv\Lib\site-packages\browser_use\browser\context.py", line 216, in get_session return await self._initialize_session() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "Q:\src\web-ui.venv\Lib\site-packages\browser_use\browser\context.py", line 172, in _initialize_session playwright_browser = await self.browser.get_playwright_browser() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "Q:\src\web-ui.venv\Lib\site-packages\browser_use\browser\browser.py", line 82, in get_playwright_browser return await self._init() ^^^^^^^^^^^^^^^^^^ File "Q:\src\web-ui.venv\Lib\site-packages\browser_use\browser\browser.py", line 89, in _init browser = await self._setup_browser(playwright) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "Q:\src\web-ui\src\browser\custom_browser.py", line 86, in _setup_browser raise RuntimeError( RuntimeError: To start chrome in Debug mode, you need to close all existing Chrome instances and try again otherwise we can not connect to the instance.
I'm not running with docker but still get similar error @MeshkatShB
ERROR [src.browser.custom_browser] Failed to start a new Chrome instance.: BrowserType.connect_over_cdp: connect ECONNREFUSED ::1:9222 Call log:
- retrieving websocket url from http://localhost:9222
WARNING [browser] Page load failed, continuing... ERROR [src.browser.custom_browser] Failed to start a new Chrome instance.: BrowserType.connect_over_cdp: connect ECONNREFUSED ::1:9222 Call log:
- retrieving websocket url from http://localhost:9222
WARNING [src.agent.custom_agent] No history to create GIF from Traceback (most recent call last): File "Q:\src\web-ui\src\browser\custom_browser.py", line 79, in _setup_browser browser = await playwright.chromium.connect_over_cdp( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "Q:\src\web-ui.venv\Lib\site-packages\playwright\async_api_generated.py", line 14779, in connect_over_cdp await self._impl_obj.connect_over_cdp( File "Q:\src\web-ui.venv\Lib\site-packages\playwright_impl_browser_type.py", line 174, in connect_over_cdp response = await self._channel.send_return_as_dict("connectOverCDP", params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "Q:\src\web-ui.venv\Lib\site-packages\playwright_impl_connection.py", line 67, in send_return_as_dict return await self._connection.wrap_api_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "Q:\src\web-ui.venv\Lib\site-packages\playwright_impl_connection.py", line 528, in wrap_api_call raise rewrite_error(error, f"{parsed_st['apiName']}: {error}") from None playwright._impl._errors.Error: BrowserType.connect_over_cdp: connect ECONNREFUSED ::1:9222 Call log:
- retrieving websocket url from http://localhost:9222
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "Q:\src\web-ui\webui.py", line 372, in run_custom_agent history = await agent.run(max_steps=max_steps) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "Q:\src\web-ui\src\agent\custom_agent.py", line 383, in run state = await self.browser_context.get_state(use_vision=self.use_vision) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "Q:\src\web-ui.venv\Lib\site-packages\browser_use\browser\context.py", line 540, in get_state session = await self.get_session() ^^^^^^^^^^^^^^^^^^^^^^^^ File "Q:\src\web-ui.venv\Lib\site-packages\browser_use\browser\context.py", line 216, in get_session return await self._initialize_session() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "Q:\src\web-ui.venv\Lib\site-packages\browser_use\browser\context.py", line 172, in _initialize_session playwright_browser = await self.browser.get_playwright_browser() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "Q:\src\web-ui.venv\Lib\site-packages\browser_use\browser\browser.py", line 82, in get_playwright_browser return await self._init() ^^^^^^^^^^^^^^^^^^ File "Q:\src\web-ui.venv\Lib\site-packages\browser_use\browser\browser.py", line 89, in _init browser = await self._setup_browser(playwright) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "Q:\src\web-ui\src\browser\custom_browser.py", line 86, in _setup_browser raise RuntimeError( RuntimeError: To start chrome in Debug mode, you need to close all existing Chrome instances and try again otherwise we can not connect to the instance.
Hi there. What LLM Provider/Model are you using?
I can think of two approaches right now with the info you provided. you can give me more info to discuss more.
- Close all your chrome windows; As stated in the readme file, when you want to set
Use Own Browser, you need to close all chrome windows to avoid this conflict. - Upgrade the
browser-usepackage to0.1.19by following command:
pip install browser-use==0.1.19
Hope it helps.
Same error running through docker desktop but under Ubuntu/WSL:
web-ui-browser-use-webui-1 | Traceback (most recent call last):
web-ui-browser-use-webui-1 | File "/app/webui.py", line 362, in run_custom_agent
web-ui-browser-use-webui-1 | history = await agent.run(max_steps=max_steps)
web-ui-browser-use-webui-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-ui-browser-use-webui-1 | File "/app/src/agent/custom_agent.py", line 422, in run
web-ui-browser-use-webui-1 | self.create_history_gif()
web-ui-browser-use-webui-1 | File "/app/src/agent/custom_agent.py", line 307, in create_history_gif
web-ui-browser-use-webui-1 | task_frame = self._create_task_frame(
web-ui-browser-use-webui-1 | ^^^^^^^^^^^^^^^^^^^^^^^^
web-ui-browser-use-webui-1 | File "/usr/local/lib/python3.11/site-packages/browser_use/agent/service.py", line 709, in _create_task_frame
web-ui-browser-use-webui-1 | larger_font = ImageFont.truetype(
web-ui-browser-use-webui-1 | ^^^^^^^^^^^^^^^^^^^
web-ui-browser-use-webui-1 | File "/usr/local/lib/python3.11/site-packages/PIL/ImageFont.py", line 879, in truetype
web-ui-browser-use-webui-1 | return freetype(font)
web-ui-browser-use-webui-1 | ^^^^^^^^^^^^^^
web-ui-browser-use-webui-1 | File "/usr/local/lib/python3.11/site-packages/PIL/ImageFont.py", line 876, in freetype
web-ui-browser-use-webui-1 | return FreeTypeFont(font, size, index, encoding, layout_engine)
web-ui-browser-use-webui-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
web-ui-browser-use-webui-1 | File "/usr/local/lib/python3.11/site-packages/PIL/ImageFont.py", line 288, in __init__
web-ui-browser-use-webui-1 | load_from_bytes(cast(IO[bytes], font))
web-ui-browser-use-webui-1 | File "/usr/local/lib/python3.11/site-packages/PIL/ImageFont.py", line 268, in load_from_bytes
web-ui-browser-use-webui-1 | self.font = core.getfont(
web-ui-browser-use-webui-1 | ^^^^^^^^^^^^^
web-ui-browser-use-webui-1 | OSError: cannot open resource
Same bug?
There is a bug on generating gif :browser-use/browser-use#202. Please update the codes of browser-use and web-ui, that should have been fixed
Solved installing MS TTF fonts from non-free additional repo
I confirm the same bug using docker-compose and by directly using python!! so basically it's not really working for me, even after installing MS TTF fonts :
System Info :
Linux 6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec 5 13:09:44 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
My Dockerfile :
`FROM python:3.11-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
wget \
gnupg \
curl \
unzip \
xvfb \
libgconf-2-4 \
libxss1 \
libnss3 \
libnspr4 \
libasound2 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcups2 \
libdbus-1-3 \
libdrm2 \
libgbm1 \
libgtk-3-0 \
libxcomposite1 \
libxdamage1 \
libxfixes3 \
libxrandr2 \
xdg-utils \
fonts-liberation \
dbus \
xauth \
xvfb \
x11vnc \
tigervnc-tools \
supervisor \
net-tools \
procps \
git \
python3-numpy \
fontconfig \
fonts-dejavu \
fonts-dejavu-core \
fonts-dejavu-extra \
cabextract \
xfonts-utils \
fontconfig \
&& rm -rf /var/lib/apt/lists/*
# Install noVNC
RUN git clone https://github.com/novnc/noVNC.git /opt/novnc \
&& git clone https://github.com/novnc/websockify /opt/novnc/utils/websockify \
&& ln -s /opt/novnc/vnc.html /opt/novnc/index.html
# Install Chrome
RUN curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /usr/share/keyrings/google-chrome.gpg \
&& echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main" | tee /etc/apt/sources.list.d/google-chrome.list
RUN echo "deb http://deb.debian.org/debian bullseye main contrib non-free" > /etc/apt/sources.list.d/non-free.list && \
apt-get update && apt-get install -y \
ttf-mscorefonts-installer \
--no-install-recommends
# Verify font installation
RUN fc-cache -f -v
# Set up working directory
WORKDIR /app
# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Install Playwright and browsers with system dependencies
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
RUN playwright install --with-deps chromium
RUN playwright install-deps
# Copy the application code
COPY . .
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV BROWSER_USE_LOGGING_LEVEL=info
ENV CHROME_PATH=/usr/bin/google-chrome
ENV ANONYMIZED_TELEMETRY=false
ENV DISPLAY=:99
ENV RESOLUTION=1920x1080x24
ENV VNC_PASSWORD=vncpassword
ENV CHROME_PERSISTENT_SESSION=true
ENV RESOLUTION_WIDTH=1920
ENV RESOLUTION_HEIGHT=1080
# Set up supervisor configuration
RUN mkdir -p /var/log/supervisor
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
EXPOSE 7788 6080 5900
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
Log :
INFO [src.agent.custom_agent] 🚀 Starting task: go to google.com and type 'OpenAI' click search and give me the first url
browser-use-webui-1 | 2025-01-22 10:58:55,666 DEBG 'webui' stdout output:
browser-use-webui-1 | INFO [src.agent.custom_agent] 🚀 Starting task: go to google.com and type 'OpenAI' click search and give me the first url
browser-use-webui-1 |
browser-use-webui-1 | 2025-01-22 10:58:55,666 DEBG 'webui' stdout output:
browser-use-webui-1 | INFO [src.agent.custom_agent] 🚀 Starting task: go to google.com and type 'OpenAI' click search and give me the first url
browser-use-webui-1 |
browser-use-webui-1 | 22/01/2025 10:58:56 copy_tiles: allocating first_line at size 61
browser-use-webui-1 | 2025-01-22 10:58:57,192 DEBG 'x11vnc_log' stdout output:
browser-use-webui-1 | 22/01/2025 10:58:56 copy_tiles: allocating first_line at size 61
browser-use-webui-1 |
browser-use-webui-1 | 2025-01-22 10:58:57,192 DEBG 'x11vnc_log' stdout output:
browser-use-webui-1 | 22/01/2025 10:58:56 copy_tiles: allocating first_line at size 61
browser-use-webui-1 |
browser-use-webui-1 | INFO [src.agent.custom_agent]
browser-use-webui-1 | 📍 Step 1
browser-use-webui-1 | 2025-01-22 10:58:57,460 DEBG 'webui' stdout output:
browser-use-webui-1 | INFO [src.agent.custom_agent]
browser-use-webui-1 | 📍 Step 1
browser-use-webui-1 |
browser-use-webui-1 | 2025-01-22 10:58:57,460 DEBG 'webui' stdout output:
browser-use-webui-1 | INFO [src.agent.custom_agent]
browser-use-webui-1 | 📍 Step 1
browser-use-webui-1 |
browser-use-webui-1 | ERROR [agent] ❌ Result failed 1/5 times:
browser-use-webui-1 | Failed to deserialize the JSON body into the target type: messages[2]: data did not match any variant of untagged enum ChatCompletionRequestContent at line 1 column 18249
browser-use-webui-1 | 2025-01-22 10:59:00,165 DEBG 'webui' stdout output:
browser-use-webui-1 | ERROR [agent] ❌ Result failed 1/5 times:
browser-use-webui-1 | Failed to deserialize the JSON body into the target type: messages[2]: data did not match any variant of untagged enum ChatCompletionRequestContent at line 1 column 18249
browser-use-webui-1 |
browser-use-webui-1 | 2025-01-22 10:59:00,165 DEBG 'webui' stdout output:
browser-use-webui-1 | ERROR [agent] ❌ Result failed 1/5 times:
browser-use-webui-1 | Failed to deserialize the JSON body into the target type: messages[2]: data did not match any variant of untagged enum ChatCompletionRequestContent at line 1 column 18249
browser-use-webui-1 |
browser-use-webui-1 | 22/01/2025 10:59:00 created selwin: 0x200041
browser-use-webui-1 | 22/01/2025 10:59:00 called initialize_xfixes()
browser-use-webui-1 | 2025-01-22 10:59:00,193 DEBG 'x11vnc_log' stdout output:
browser-use-webui-1 | 22/01/2025 10:59:00 created selwin: 0x200041
browser-use-webui-1 | 22/01/2025 10:59:00 called initialize_xfixes()
browser-use-webui-1 |
browser-use-webui-1 | 2025-01-22 10:59:00,193 DEBG 'x11vnc_log' stdout output:
browser-use-webui-1 | 22/01/2025 10:59:00 created selwin: 0x200041
browser-use-webui-1 | 22/01/2025 10:59:00 called initialize_xfixes()
browser-use-webui-1 |
browser-use-webui-1 | INFO [src.agent.custom_agent]
browser-use-webui-1 | 📍 Step 1
browser-use-webui-1 | 2025-01-22 10:59:01,290 DEBG 'webui' stdout output:
browser-use-webui-1 | INFO [src.agent.custom_agent]
browser-use-webui-1 | 📍 Step 1
browser-use-webui-1 |
browser-use-webui-1 | 2025-01-22 10:59:01,290 DEBG 'webui' stdout output:
browser-use-webui-1 | INFO [src.agent.custom_agent]
browser-use-webui-1 | 📍 Step 1
browser-use-webui-1 |
browser-use-webui-1 | ERROR [agent] ❌ Result failed 2/5 times:
browser-use-webui-1 | Failed to deserialize the JSON body into the target type: messages[2]: data did not match any variant of untagged enum ChatCompletionRequestContent at line 1 column 18249
browser-use-webui-1 | 2025-01-22 10:59:03,435 DEBG 'webui' stdout output:
browser-use-webui-1 | ERROR [agent] ❌ Result failed 2/5 times:
browser-use-webui-1 | Failed to deserialize the JSON body into the target type: messages[2]: data did not match any variant of untagged enum ChatCompletionRequestContent at line 1 column 18249
browser-use-webui-1 |
browser-use-webui-1 | 2025-01-22 10:59:03,435 DEBG 'webui' stdout output:
browser-use-webui-1 | ERROR [agent] ❌ Result failed 2/5 times:
browser-use-webui-1 | Failed to deserialize the JSON body into the target type: messages[2]: data did not match any variant of untagged enum ChatCompletionRequestContent at line 1 column 18249
browser-use-webui-1 |
browser-use-webui-1 | INFO [src.agent.custom_agent]
browser-use-webui-1 | 📍 Step 1
browser-use-webui-1 | 2025-01-22 10:59:04,530 DEBG 'webui' stdout output:
browser-use-webui-1 | INFO [src.agent.custom_agent]
browser-use-webui-1 | 📍 Step 1
browser-use-webui-1 |
browser-use-webui-1 | 2025-01-22 10:59:04,530 DEBG 'webui' stdout output:
browser-use-webui-1 | INFO [src.agent.custom_agent]
browser-use-webui-1 | 📍 Step 1
browser-use-webui-1 |
browser-use-webui-1 | ERROR [agent] ❌ Result failed 3/5 times:
browser-use-webui-1 | Failed to deserialize the JSON body into the target type: messages[2]: data did not match any variant of untagged enum ChatCompletionRequestContent at line 1 column 18249
browser-use-webui-1 | 2025-01-22 10:59:06,801 DEBG 'webui' stdout output:
browser-use-webui-1 | ERROR [agent] ❌ Result failed 3/5 times:
browser-use-webui-1 | Failed to deserialize the JSON body into the target type: messages[2]: data did not match any variant of untagged enum ChatCompletionRequestContent at line 1 column 18249
browser-use-webui-1 |
browser-use-webui-1 | 2025-01-22 10:59:06,801 DEBG 'webui' stdout output:
browser-use-webui-1 | ERROR [agent] ❌ Result failed 3/5 times:
browser-use-webui-1 | Failed to deserialize the JSON body into the target type: messages[2]: data did not match any variant of untagged enum ChatCompletionRequestContent at line 1 column 18249
browser-use-webui-1 |
browser-use-webui-1 | INFO [src.agent.custom_agent]
browser-use-webui-1 | 📍 Step 1
browser-use-webui-1 | 2025-01-22 10:59:07,921 DEBG 'webui' stdout output:
browser-use-webui-1 | INFO [src.agent.custom_agent]
browser-use-webui-1 | 📍 Step 1
browser-use-webui-1 |
browser-use-webui-1 | 2025-01-22 10:59:07,921 DEBG 'webui' stdout output:
browser-use-webui-1 | INFO [src.agent.custom_agent]
browser-use-webui-1 | 📍 Step 1
browser-use-webui-1 |
browser-use-webui-1 | ERROR [agent] ❌ Result failed 4/5 times:
browser-use-webui-1 | Failed to deserialize the JSON body into the target type: messages[2]: data did not match any variant of untagged enum ChatCompletionRequestContent at line 1 column 18249
browser-use-webui-1 | 2025-01-22 10:59:10,403 DEBG 'webui' stdout output:
browser-use-webui-1 | ERROR [agent] ❌ Result failed 4/5 times:
browser-use-webui-1 | Failed to deserialize the JSON body into the target type: messages[2]: data did not match any variant of untagged enum ChatCompletionRequestContent at line 1 column 18249
browser-use-webui-1 |
browser-use-webui-1 | 2025-01-22 10:59:10,403 DEBG 'webui' stdout output:
browser-use-webui-1 | ERROR [agent] ❌ Result failed 4/5 times:
browser-use-webui-1 | Failed to deserialize the JSON body into the target type: messages[2]: data did not match any variant of untagged enum ChatCompletionRequestContent at line 1 column 18249
browser-use-webui-1 |
browser-use-webui-1 | INFO [src.agent.custom_agent]
browser-use-webui-1 | 📍 Step 1
browser-use-webui-1 | 2025-01-22 10:59:11,538 DEBG 'webui' stdout output:
browser-use-webui-1 | INFO [src.agent.custom_agent]
browser-use-webui-1 | 📍 Step 1
browser-use-webui-1 |
browser-use-webui-1 | 2025-01-22 10:59:11,538 DEBG 'webui' stdout output:
browser-use-webui-1 | INFO [src.agent.custom_agent]
browser-use-webui-1 | 📍 Step 1
browser-use-webui-1 |
browser-use-webui-1 | ERROR [agent] ❌ Result failed 5/5 times:
browser-use-webui-1 | Failed to deserialize the JSON body into the target type: messages[2]: data did not match any variant of untagged enum ChatCompletionRequestContent at line 1 column 18249
browser-use-webui-1 | 2025-01-22 10:59:14,089 DEBG 'webui' stdout output:
browser-use-webui-1 | ERROR [agent] ❌ Result failed 5/5 times:
browser-use-webui-1 | Failed to deserialize the JSON body into the target type: messages[2]: data did not match any variant of untagged enum ChatCompletionRequestContent at line 1 column 18249
browser-use-webui-1 |
browser-use-webui-1 | 2025-01-22 10:59:14,089 DEBG 'webui' stdout output:
browser-use-webui-1 | ERROR [agent] ❌ Result failed 5/5 times:
browser-use-webui-1 | Failed to deserialize the JSON body into the target type: messages[2]: data did not match any variant of untagged enum ChatCompletionRequestContent at line 1 column 18249
browser-use-webui-1 |
browser-use-webui-1 | ERROR [agent] ❌ Stopping due to 5 consecutive failures
browser-use-webui-1 | 2025-01-22 10:59:15,206 DEBG 'webui' stdout output:
browser-use-webui-1 | ERROR [agent] ❌ Stopping due to 5 consecutive failures
browser-use-webui-1 |
browser-use-webui-1 | 2025-01-22 10:59:15,206 DEBG 'webui' stdout output:
browser-use-webui-1 | ERROR [agent] ❌ Stopping due to 5 consecutive failures
browser-use-webui-1 |
browser-use-webui-1 | INFO [src.agent.custom_agent] Created GIF at agent_history.gif
browser-use-webui-1 | 2025-01-22 10:59:15,495 DEBG 'webui' stdout output:
browser-use-webui-1 | INFO [src.agent.custom_agent] Created GIF at agent_history.gif
browser-use-webui-1 |
browser-use-webui-1 | 2025-01-22 10:59:15,495 DEBG 'webui' stdout output:
browser-use-webui-1 | INFO [src.agent.custom_agent] Created GIF at agent_history.gif
browser-use-webui-1 |
browser-use-webui-1 | 2025-01-22 10:59:16,496 INFO reaped unknown pid 148 (exit status 0)
browser-use-webui-1 | 2025-01-22 10:59:16,496 INFO reaped unknown pid 148 (exit status 0)
browser-use-webui-1 | 2025-01-22 10:59:16,497 INFO reaped unknown pid 150 (exit status 0)
browser-use-webui-1 | 2025-01-22 10:59:16,497 INFO reaped unknown pid 150 (exit status 0)
browser-use-webui-1 | 2025-01-22 10:59:16,497 INFO reaped unknown pid 153 (exit status 0)
browser-use-webui-1 | 2025-01-22 10:59:16,497 INFO reaped unknown pid 153 (exit status 0)
browser-use-webui-1 | 2025-01-22 10:59:16,497 INFO reaped unknown pid 154 (exit status 0)
browser-use-webui-1 | 2025-01-22 10:59:16,497 INFO reaped unknown pid 154 (exit status 0)
browser-use-webui-1 | 2025-01-22 10:59:16,497 DEBG received SIGCHLD indicating a child quit
browser-use-webui-1 | 2025-01-22 10:59:16,497 DEBG received SIGCHLD indicating a child quit
```
Is it 'bookworm', not 'bullseye'?
echo "deb http://deb.debian.org/debian bookworm contrib non-free-firmware" > /etc/apt/sources.list.d/contrib.list
apt-get install -y ttf-mscorefonts-installer
For me, this works.
I confirm the same bug using docker-compose and by directly using python!! so basically it's not really working for me, even after installing MS TTF fonts :
Are you using Deepseek? If so, please uncheck the Use Vision parameter.
Using docker approach, mine is not working. Getting this:
web-ui-browser-use-webui-1 | 04/02/2025 19:18:23 webSocketsHandshake: unknown connection error
web-ui-browser-use-webui-1 | 04/02/2025 19:18:23 Client 127.0.0.1 gone
Using docker approach, mine is not working. Getting this:
web-ui-browser-use-webui-1 | 04/02/2025 19:18:23 webSocketsHandshake: unknown connection error web-ui-browser-use-webui-1 | 04/02/2025 19:18:23 Client 127.0.0.1 gone
Same exact error for me
EDIT: after 1 hour of troubleshooting and different fixes attempts I give up, nothing worked.
The env variables weren't being picked up properly despite being both set up in my .env and Dockerfile, and it never went past the unknown connection error despite trying different network settings on docker.