Repository navigation
test(plugins): read the CSP probe's result path from its config, not argv's tail - #37329
Conversation
…argv's tail On Linux the probe launcher appends --no-sandbox, so argv[length - 2] is the --user-data-dir flag rather than the config path. The page then wrote result.json under a directory named after that flag, threw, never exited, and the launcher timed it out at 30s on every Linux run since #37300. The sibling Electron probes already pass the result path in config.json; this one now does too.
|
No actionable comments were generated in the recent review.
|
Why
src/main/plugins/panels/plugin-frame-blocked-requests.electron.test.ts, added in #37300, has failed on every Linux run since: the last run of #37300 itself (41386993736), and main pushes 41388813032 and 41389106099. Each fails withError: timeoutandno result. It passes on macOS.The probe's main script found its config as
process.argv[process.argv.length - 2]. On Linux,resolveElectronProbeLaunchappends--no-sandbox, so that slot holds the--user-data-dir=…flag. The script then wroteresult.jsonunder a directory named after the flag. That write threw inside theconsole-messagehandler, so Electron never exited and the launcher killed it at 30s. A diagnostic run (#37325, closed) added a 15s fallback write, and it never landed either, which confirms the write path, not the CSP messages, was the problem.Change
The sibling Electron probes (
plugin-frame-guest-clipboard,plugin-frame-guest-egress) already readresultPathfromconfig.jsonatargv[2]. This probe now does the same. The assertions are unchanged.Testing