Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
Error at the end
Magnus Müller258456736c9c
diff --git a/browser_use/agent/service.py b/browser_use/agent/service.pyindex 558f05d1b..763364452 100644--- a/browser_use/agent/service.py+++ b/browser_use/agent/service.py@@ -1301,7 +1301,7 @@ class Agent(Generic[Context, AgentStructuredOutput]):# Check if agent failedis_successful = self.history.is_successful()- if is_successful is False:+ if is_successful is False or is_successful is None:# Get final result to check for specific failure reasonsfinal_result = self.history.final_result()final_result_str = str(final_result).lower() if final_result else ''@@ -1314,12 +1314,12 @@ class Agent(Generic[Context, AgentStructuredOutput]):# Suggest use_cloud=True for captcha/cloudflare issuestask_preview = self.task[:10] if len(self.task) > 10 else self.taskself.logger.info('')- self.logger.info(f'💡 Detected captcha/bot protection. For better browser fingerprinting, try:')+ self.logger.info('Failed because of CAPTCHA? For better browser stealth, try:')self.logger.info(f' agent = Agent(task="{task_preview}...", use_cloud=True)')# General failure messageself.logger.info('')- self.logger.info('❌ Did the Agent fail your expectation? Let us fix this!')+ self.logger.info('❌ Did the Agent not work as expected? Let us fix this!')self.logger.info(' Please open a short issue here: https://github.com/browser-use/browser-use/issues')def _log_agent_event(self, max_steps: int, agent_run_error: str | None = None) -> None: