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

Fix chrome sandbox error on ubuntu 24.04 #949

Merged
merged 5 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/testing_dev_e2e_with_live_services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ jobs:

- if: matrix.os == 'ubuntu-latest'
name: Run tests with xvfb
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run coverage:tutorial
run: |
# Adjust Chrome sandbox (used by Puppeteer) owner and permissions to bypass Ubuntu 24.04's
# new restrictions for AppImage apps. https://github.com/electron/electron/issues/42510
sudo chown root ./node_modules/electron/dist/chrome-sandbox
sudo chmod 4755 ./node_modules/electron/dist/chrome-sandbox
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run coverage:tutorial

- name: Archive E2E Test Screenshots
uses: actions/upload-artifact@v4
Expand Down
12 changes: 6 additions & 6 deletions src/electron/frontend/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ button[disabled] {
padding: 3px 10px;
background-color: #fff;
font-size: 13px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans",
sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

.menu.file {
Expand All @@ -324,8 +324,8 @@ button[disabled] {
background-color: #fff;
color: black;
font-size: 13px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans",
sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

.menu.file li:hover {
Expand Down Expand Up @@ -355,8 +355,8 @@ button[disabled] {
padding: 3px 10px;
background-color: #fff;
font-size: 13px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans",
sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

.menu.reg-folder.off {
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/puppeteer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ export const connect = () => {
});

const browserURL = `http://localhost:${electronDebugPort}`
const browser = output.browser = await puppeteer.launch({ headless: 'new' })
// See notes on no sandbox mode: https://pptr.dev/troubleshooting#setting-up-chrome-linux-sandbox
const browser = output.browser = await puppeteer.launch({ headless: 'new', args: ["--no-sandbox", "--disable-setuid-sandbox"] })
const page = output.page = await browser.newPage();
await page.goto(browserURL);
const endpoint = await page.evaluate(() => fetch(`json/version`).then(res => res.json()).then(res => res.webSocketDebuggerUrl))
Expand Down
Loading