Skip to content

Bug: uploading an html file causes the agent to try to navigate to a web page #4794

@zivshapiraintel

Description

@zivshapiraintel

Browser Use Version

0.12.6

Bug Description, Steps to Reproduce, Screenshots

Use the upload_file action to upload [/app/something_capabilities.html] causes the agent to try to navigate to http://capabilities.html

with many other file types there is no problem (same text only different file names]

Failing Python Code

LLM Model

browser-use llm (huggingface). latest (April 4 and previous)

Operating System & Browser Versions

Ubuntu 24.04

Full DEBUG Log Output

INFO     [Agent] Starting a browser-use agent with version 0.12.6, with provider=openai and model=model1
INFO     [BrowserSession] Setting viewport to 1920x1080 with device scale factor 1.0 whereas original device scale factor was 1.0
WARNING  [BrowserSession] ⚠️ Using glob patterns in allowed_domains. Note: Patterns like "*.example.com" will match both subdomains AND the main domain.
INFO     [BrowserSession] 📹 Started/Switched video recording to target A4CFF037EF35B1D880C83EBF300E74AC
INFO     [Agent]   ▶️   navigate: url: https://capabilities.html, new_tab: False
WARNING  [BrowserSession] ⛔️ Navigation to non-allowed URL detected: https://capabilities.html
INFO     [BrowserSession] ⛔️ Navigated to about:blank after blocked URL: https://capabilities.html
WARNING  [BrowserSession] ⛔️ Blocking navigation to disallowed URL: https://capabilities.html
ERROR    [BrowserSession] 🚌 [SecurityWatchdog.on_NavigateToUrlEvent(#eecc)]        ❌ Failed (0.00s): ValueError: Navigation to https://capabilities.html blocked by security policy
ERROR    [bubus] ❌ EventBus_f185051e🟢(⏳ 1 | ▶️ 0 | ✅ 10 ➡️ 31 👂) Error in event handler browser_use.browser.watchdog_base.SecurityWatchdog.on_NavigateToUrlEvent(?▶ NavigateToUrlEvent#eecc ✅) -> 
ValueError(Navigation to https://capabilities.html blocked by security policy)
ValueError: Navigation to https://capabilities.html blocked by security policy

ERROR    [BrowserSession] ❌ Navigation failed: Navigation to https://capabilities.html blocked by security policy
INFO     [Agent] 

INFO     [Agent] 📍 Step 1:
INFO     [Agent]   ⚠️ Eval: Navigation to https://capabilities.html was blocked by security policy; page did not load. Verdict: Failure
INFO     [Agent]   🧠 Memory: I am unable to access the target site https://capabilities.html due to security restrictions. The page is blank. I need to identify the correct URL or determine if this is an internal-only application.
INFO     [Agent]   🎯 Next goal: Search for information about "New feature available!" and "capabilities.html" in a new tab to identify the correct URL or access method.
INFO     [Agent]   ▶️   search: query: New feature available! capabilities.html, engine: duckduckgo

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions