browser-use: Chromium stuck, need manual intervention to unlock

Bug Description

When I launch a basic agent, after Step 1, Chromium is opened in a blank page (“about:blank” tab) then nothing happens. In the terminal it keeps looping “INFO [agent] 📍 Step 1”.

The situation unlocks only when a I go to the address bar of Chromium, I write something (even a single letter) then I press “Enter”.

(Please not that I’m a newbie, I might have missed some basic steps)

Reproduction Steps

Install browser-use Configure Azure OpenAI Keys in .env file Launch the code sample below

Code Sample

from langchain_openai import AzureChatOpenAI
from browser_use import Agent
from pydantic import SecretStr
from dotenv import load_dotenv
load_dotenv()
import os
import asyncio

llm = AzureChatOpenAI(
    model="gpt-4o",
    azure_endpoint=os.getenv('AZURE_OPENAI_ENDPOINT', ''),
    api_key=SecretStr(os.getenv('AZURE_OPENAI_API_KEY', '')),
    api_version=os.getenv('AZURE_OPENAI_API_VERSION', ''),
)

async def main():
    agent = Agent(
        task="Compare the price of gpt-4o and DeepSeek-V3",
        llm=llm
    )
    result = await agent.run()
    print (result)

asyncio.run(main())

Version

0.1.40

LLM Model

GPT-4o

Operating System

Windows 11

Relevant Log Output

INFO     [browser_use] BrowserUse logging setup complete with level info
INFO     [root] Anonymized telemetry enabled. See https://docs.browser-use.com/development/telemetry for more information.
C:\Users\mialdrov\OneDrive\Documents\BaiBai\PoC_Lab\Browser-Use\.venv\Lib\site-packages\browser_use\agent\message_manager\views.py:59: LangChainBetaWarning: The function `load` is in beta. It is actively being worked on, so the API may change.
  value['message'] = load(value['message'])
INFO     [agent] 🚀 Starting task: Compare the price of gpt-4o and DeepSeek-V3
INFO     [agent] 📍 Step 1
INFO     [agent] 📍 Step 1
INFO     [agent] 📍 Step 1
INFO     [agent] 📍 Step 1
INFO     [agent] 📍 Step 1
INFO     [agent] 📍 Step 1
INFO     [agent] 📍 Step 1
INFO     [agent] 📍 Step 1
INFO     [agent] 📍 Step 1
INFO     [agent] 📍 Step 1
INFO     [agent] 📍 Step 1
INFO     [agent] 📍 Step 1
...

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 14
  • Comments: 41 (4 by maintainers)

Most upvoted comments

I encountered the same issue while using the DeepSeek Model. Through debugging, I found that the error occurred in the following location within the browser_use/agent/service.py file:

class Agent(Generic[Context]):
    async def step(self, step_info: Optional[AgentStepInfo] = None) -> None:
        # ...
        except Exception as e:
        # model call failed, remove last state message from history

I suspected that the problem was due to DeepSeek not supporting visual features, so I added the following configuration:

agent = Agent(
    task=task,
    llm=llm,
    use_vision=False, # here
    )

Finally, it worked successfully 😃

Seeing the same thing… tried with my local chrome install as well, same deal. On MacOS.

EDIT: I was out of OpenAI credits, added more and this was fixed. Maybe lets add some sort of error messaging for this?

faced same issue. turns out I am running out openai’s credit. resolved by top up my openai’s credit

For anyone experiencing this issue, try checking your API KEY. If the API KEY is invalid, it will get stuck on the first step (even though it might show some boxes around inputs). I debugged the problem and realized that my API KEY was being provided from the terminal environment and not from the .env file. So, if you’re using load_dotenv, make sure to use it as load_dotenv(env_path, override=True).

thanks,The problem is solved

For anyone experiencing this issue, try checking your API KEY. If the API KEY is invalid, it will get stuck on the first step (even though it might show some boxes around inputs). I debugged the problem and realized that my API KEY was being provided from the terminal environment and not from the .env file. So, if you’re using load_dotenv, make sure to use it as load_dotenv(env_path, override=True).

I encountered the same issue while using the DeepSeek Model. Through debugging, I found that the error occurred in the following location within the browser_use/agent/service.py file:

class Agent(Generic[Context]): async def step(self, step_info: Optional[AgentStepInfo] = None) -> None: # … except Exception as e: # model call failed, remove last state message from history I suspected that the problem was due to DeepSeek not supporting visual features, so I added the following configuration:

agent = Agent( task=task, llm=llm, use_vision=False, # here ) Finally, it worked successfully 😃

This work for me, THX

I am using openai and im seeing the same, too

I am seeing the same. I’ve just cloned the main branch. It is the same.

Chromium is opened in a blank page (“about:blank” tab) then nothing happens.

MacBook Pro user (MacOS 15.0). Using OpenAI, model: gpt-4o