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

[BUG] Electron: Playwright specific arguments between executable and project path #23385

Open
1 task
c3er opened this issue May 31, 2023 · 0 comments
Open
1 task

Comments

@c3er
Copy link

c3er commented May 31, 2023

System info

Source code

  • I provided exact source code that allows reproducing the issue locally.
const electronPath = require("electron")
const playwright = require("playwright")

const electron = playwright._electron

// ...

const app = await electron.launch({
    args: [
        "path/to/main.js",
        "path/to/my/file",
    ],
    executablePath: electronPath,
})

Expected

Given, the code above, process.argv should look like this:

[
    'path/to/Electron',
    'path/to/project',
    'path/to/my/file',
    '--inspect=0',
    '--remote-debugging-port=0',
]

Actual

process.argv looks like this:

[
    'path/to/Electron',
    '--inspect=0',
    '--remote-debugging-port=0',
    'path/to/project',
    'path/to/my/file',
]
c3er added a commit to c3er/mdview-next that referenced this issue Dec 3, 2023
The "hideBin" function of the Yargs library fails on the additional
arguments that by Playwright *in between* the Electron executable and
the working directory containing the actual application.

See Playwright issues:
- microsoft/playwright#23385
- microsoft/playwright#16614
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants