(Created on )

Puppeteer: Missing value for profile command line argument

Firefox's profile command-line argument has no following value.


Firefox’s profile command-line argument has no following value.

Error message

Missing value for profile command line argument

How this error happens

Firefox’s -profile flag needs a following path. A trailing flag has no value for the launcher to read.

The snippets use the imported puppeteer instance.

await puppeteer.launch({
    browser: "firefox",
    args: [
        "-profile",
    ],
});

How to fix

Pass the profile through userDataDir, or let Puppeteer create its temporary profile.

const browser = await puppeteer.launch({
    browser: "firefox",
    userDataDir: "/absolute/path/firefox-automation-profile",
});

Things to keep in mind

The profile directory must be writable and must not be in use by another Firefox process.

All Puppeteer errors

Keep Reading

Puppeteer Guides

All Guides →