Closed c3er closed 5 months ago
I'm unfortunately not able to reproduce. I tried version 18 and latest 20, probably related to https://github.com/microsoft/playwright/commit/58187075c823a4f3751c0fc25e714077b0da7bdf.
Which Node.js version are you using on CI? Or are you reproducing it locally?
Could you set the $Env:DEBUG="pw:browser,pw:protocol"
env var? This might yield more debug output when launching Electron with Playwright.
It appears to be actually a problem with space characters in the path, which would explain, why this didn't appear on my macOS.
Protocol of the last run:
D:\eigene dateien\devel\web\electron-playwright-issue [master ≡]> $Env:DEBUG="pw:browser,pw:protocol"
D:\eigene dateien\devel\web\electron-playwright-issue [master ≡]> npm test
> electron-playwright-issue@1.0.0 test
> mocha --timeout 20000
Sample integration test
pw:browser <launching> D:\eigene dateien\devel\web\electron-playwright-issue\node_modules\electron\dist\electron.exe --inspect=0 --remote-debugging-port=0 D:\eigene dateien\devel\web\electron-playwright-issue\app\main.js +0ms
pw:browser <launched> pid=29208 +6ms
pw:browser [pid=29208][err] Der Befehl "D:\eigene" ist entweder falsch geschrieben oder +2ms
pw:browser [pid=29208][err] konnte nicht gefunden werden. +0ms
1) "before all" hook for "opens a window"
pw:browser [pid=29208] <process did exit: exitCode=1, signal=null> +3ms
pw:browser [pid=29208] starting temporary directories cleanup +0ms
2) "after all" hook for "opens a window"
0 passing (21ms)
2 failing
1) Sample integration test
"before all" hook for "opens a window":
electron.launch: Process failed to launch!
at async startApp (test\integration.spec.js:10:17)
at async Context.<anonymous> (test\integration.spec.js:26:39)
2) Sample integration test
"after all" hook for "opens a window":
TypeError: Cannot read properties of null (reading 'close')
at Context.<anonymous> (test\integration.spec.js:28:33)
at process.processImmediate (node:internal/timers:478:21)
at process.callbackTrampoline (node:internal/async_hooks:130:17)
pw:browser [pid=29208] finished temporary directories cleanup
The same project runs on a path without space characters just fine.
So, the regression is at handling space characters in the project's path.
Note: this should be fixed in npm install -D @playwright/test@beta
.
Note: this should be fixed in
npm install -D @playwright/test@beta
.
I can confirm, that the bug is fixed with version 1.44.1.
Version
1.44.0
Steps to reproduce
npm install
npm run test
Expected behavior
Test passes. If the test is executed on the desktop, the application window flickers.
Actual behavior
Test fails with this error message:
Additional context
The same test works fine with Playwright 1.43.1. If you change the version in the
package.json
and reinstall the dependencies, the test passes.The bug seems only to occur on Windows. On macOS, it works fine. I didn't try Linux.
Environment