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

can't launch playwright-aws-lambda with a user profile #40

Open
ua2028 opened this issue Aug 5, 2021 · 0 comments
Open

can't launch playwright-aws-lambda with a user profile #40

ua2028 opened this issue Aug 5, 2021 · 0 comments

Comments

@ua2028
Copy link

ua2028 commented Aug 5, 2021

Using versions;
"playwright-aws-lambda": "^0.6.0",
"playwright-core": "^1.7.1",

Trying to run pl-aws-chrome with a specific user profile fails, 'launchPersistentContext' is not defined for pl-aws-chrome, and passing as args fail as well. Not sure how to solve this issue, could use some help

running

const playwrightAWS = require('playwright-aws-lambda');
chromium = await playwrightAWS.launchChromium({headless: true, userDataDir: './user_profiles/'});

will result with:

Uncaught:
Error: browserType.launch: userDataDir option is not supported in `browserType.launch`. Use `browserType.launchPersistentContext` instead
    at Object.assert (SOME_PATH/node_modules/playwright-core/lib/utils/utils.js:80:15)
    at SOME_PATH/node_modules/playwright-core/lib/client/browserType.js:56:21
    at BrowserType._wrapApiCall (SOME_PATH/node_modules/playwright-core/lib/client/channelOwner.js:77:34)
    at BrowserType.launch (SOME_PATH/node_modules/playwright-core/lib/client/browserType.js:55:21)
    at Object.launchChromium (SOME_PATH/node_modules/playwright-aws-lambda/dist/src/chromium.js:97:47)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async repl:1:35

passing directory with profile flags in args:

chromium = await playwrightAWS.launchChromium({headless: true, args: ['--profile-directory=./user_profiles/', '--user-data-dir=./user_profiles/']});

Uncaught:
browserType.launch: Pass userDataDir parameter instead of specifying --user-data-dir argumentError


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant