Skip to content

Default Viewport always changes back to 800x600 #1347

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

Open
raygamedev opened this issue Apr 10, 2025 · 4 comments
Open

Default Viewport always changes back to 800x600 #1347

raygamedev opened this issue Apr 10, 2025 · 4 comments
Assignees
Labels
bug Something isn't working server-puppeteer Reference implementation for the Puppeteer MCP server - src/puppeteer

Comments

@raygamedev
Copy link

Describe the bug
Even though default launch options is set
"PUPPETEER_LAUNCH_OPTIONS": "{ \"headless\": false, \"defaultViewport\": { \"width\": 1920, \"height\": 1080 }, \"args\": [] }"

the viewport always changes back to 800x600 when Claude tries to continue

To Reproduce
Steps to reproduce the behavior:

  1. Set the launch options to whatever size, it will open in that size, but immediately return back to 800x600 when Claude continues;

Expected behavior
Page always stays in the size configured in the viewport

Logs
If applicable, add logs to help explain your problem.

Additional context
Add any other context about the problem here.

@raygamedev raygamedev added the bug Something isn't working label Apr 10, 2025
@morrelljd
Copy link

Same issue here. Soups frustrating

@raygamedev
Copy link
Author

i found out that the screenshot is hardcoded for 800x600, you can try telling it to take screenshots at your resolution, though its not consistent

@olaservo olaservo added the server-puppeteer Reference implementation for the Puppeteer MCP server - src/puppeteer label May 5, 2025
@olaservo
Copy link
Member

olaservo commented May 5, 2025

Good catch @raygamedev , I think instead of the hard-coded defaults we would need to check for the applicable launch options first, then fall back to the hard-coded ones.

@olaservo
Copy link
Member

olaservo commented May 5, 2025

I've opened a PR here which needs more testing, if anyone here can help check this out: #1670

@olaservo olaservo self-assigned this May 5, 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 server-puppeteer Reference implementation for the Puppeteer MCP server - src/puppeteer
Projects
None yet
Development

No branches or pull requests

3 participants