fix: handle remote-debugging-port=0 correctly (#17800)
By default the Chromedriver will send remote-debugging-port=0 to let the browser choose a free port to listen on. The chosen port is written to a known file in the user data dir that is passed to the app through the CLI. This PR does two things. 1. Correctly passes the USER_DATA_DIR to the remote debugging server so it knows where to write the file 2. Adds support for --user-data-dir as we did not support that CLI argument and Chromedriver relies on being able to tell the "browser" where to write this file. Fixes #17354
This commit is contained in:
parent
be6fb7cb12
commit
b7b9efa875
5 changed files with 24 additions and 9 deletions
|
@ -151,10 +151,7 @@ if (packageJson.v8Flags != null) {
|
|||
v8.setFlagsFromString(packageJson.v8Flags)
|
||||
}
|
||||
|
||||
// Set the user path according to application's name.
|
||||
app.setPath('userData', path.join(app.getPath('appData'), app.getName()))
|
||||
app.setPath('userCache', path.join(app.getPath('cache'), app.getName()))
|
||||
app.setAppPath(packagePath)
|
||||
app._setDefaultAppPaths(packagePath)
|
||||
|
||||
// Load the chrome devtools support.
|
||||
require('@electron/internal/browser/chrome-devtools')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue