mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore(firefox): rewrite error message for $HOME directory ownership mismatch (#28921)
Fixes https://github.com/microsoft/playwright/issues/28896
This commit is contained in:
parent
4b99d21dbd
commit
2ddf3a45f9
@ -40,6 +40,9 @@ export class Firefox extends BrowserType {
|
|||||||
_doRewriteStartupLog(error: ProtocolError): ProtocolError {
|
_doRewriteStartupLog(error: ProtocolError): ProtocolError {
|
||||||
if (!error.logs)
|
if (!error.logs)
|
||||||
return error;
|
return error;
|
||||||
|
// https://github.com/microsoft/playwright/issues/6500
|
||||||
|
if (error.logs.includes(`as root in a regular user's session is not supported.`))
|
||||||
|
error.logs = '\n' + wrapInASCIIBox(`Firefox is unable to launch if the $HOME folder isn't owned by the current user.\nWorkaround: Set the HOME=/root environment variable${process.env.GITHUB_ACTION ? ' in your GitHub Actions workflow file' : ''} when running Playwright.`, 1);
|
||||||
if (error.logs.includes('no DISPLAY environment variable specified'))
|
if (error.logs.includes('no DISPLAY environment variable specified'))
|
||||||
error.logs = '\n' + wrapInASCIIBox(kNoXServerRunningError, 1);
|
error.logs = '\n' + wrapInASCIIBox(kNoXServerRunningError, 1);
|
||||||
return error;
|
return error;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user