Skip to content

Puppeteer ignoring lang arg to launch #5970

@kahunacohen

Description

@kahunacohen

Steps to reproduce

Tell us about your environment:

  • Puppeteer version: 3.10
  • Platform / OS version: OSX 10.14.6
  • URLs (if applicable):
  • Node.js version: 10.9.0

What steps will reproduce the problem?

  1. npm install puppeteer
  2. run the following code:
const puppeteer = require("puppeteer");

(async function() {
  const u = "https://www.google.com/search?q=foo"
  const browser = await puppeteer.launch({
    headless: false,
    args: ['--lang="en-US"'],
  });
  page = await browser.newPage();
  await page.goto(u);
})();
  1. I am in Israel the results are in Hebrew and sometimes German oddly enough.
  2. When I launch my local chromium like this:
    $ node_modules/puppeteer/.local-chromium/mac-756035/chrome-mac/Chromium.app/Contents/MacOS/Chromium --lang="en-US"
    and search for "foo" my results are in English.

What is the expected result?
Chromium should be launched in the language specified by the lang arg.

What happens instead?
Chromium seems to launch in the language of my location and ignores the lang arg to launch.
Screen Shot 2020-06-04 at 3 38 34 PM

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions