Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Viewport randomly shrinking while using browser-use. #673

Closed
svaze-texau opened this issue Feb 11, 2025 · 6 comments
Closed

Viewport randomly shrinking while using browser-use. #673

svaze-texau opened this issue Feb 11, 2025 · 6 comments
Labels
bug Something isn't working

Comments

@svaze-texau
Copy link

Bug Description

When I try to scrape website (for e.g. Zillow) the browser view port randomly shrinks and then becomes normal.

llm is gemini-2.0-flash

Below is the video of the twitching happening on zillow

Untitled.video.-.Made.with.Clipchamp.mp4

Reproduction Steps

  1. install browser-use
  2. headless = false, disable_security = true in browser config
  3. Run basic scraping agent on zillow or similar website

Code Sample

I am not in a position to share my code.

Version

python 3.11, pip 22.3, browser-use 0.1.36

LLM Model

Other (specify in description)

Operating System

Windows 11

Relevant Log Output

@svaze-texau svaze-texau added the bug Something isn't working label Feb 11, 2025
@PaperBoardOfficial
Copy link
Contributor

This happens because browser-use (which uses playwright) takes screenshot of current page (for creating gif). The default viewport for playwright is 1280x720. You won't see this twitching in the final agent_history_gif. But if you want to record screen using some other tool, then you could change the scale of our system display.

@svaze-texau
Copy link
Author

I had already disabled the agent_history_gif feature. this issue comes even if it is off or on.

@PaperBoardOfficial
Copy link
Contributor

Earlier screenshot was taken when use_vision flag was true, but due to this commit, it is being taken for all cases.
I'll try to find a solution for the flickering.

@IAmAGoodBoy04
Copy link

Earlier screenshot was taken when use_vision flag was true, but due to this commit, it is being taken for all cases. I'll try to find a solution for the flickering.

So will changing the version <0.1.33 fix this?

@PaperBoardOfficial
Copy link
Contributor

I raised a PR, check if it resolves your issue.

@pirate
Copy link
Member

pirate commented Mar 25, 2025

Fixed by @PaperBoardOfficial, thanks!

@pirate pirate closed this as completed Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants