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

Add Chromium flags for arm64 #1415

Merged
merged 1 commit into from
Jan 7, 2023
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
20 changes: 16 additions & 4 deletions bpmn/src/browser-instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,23 @@ const puppeteer = require('puppeteer')
const createBrowser = async () => {
const browser = await puppeteer.launch({
args: [
'--disable-dev-shm-usage',
'--no-first-run',
// Disables GPU hardware acceleration.
// If software renderer is not in place, then the GPU process won't launch.
'--disable-gpu',
'--disable-translate',
// Disable the setuid sandbox (Linux only)
'--disable-setuid-sandbox',
// Run in headless mode, i.e., without a UI or display server dependencies
'--headless',
// Prevents creating scrollbars for web content. Useful for taking consistent screenshots.
'--hide-scrollbars',
// Mutes audio sent to the audio device, so it is not audible during automated testing.
'--mute-audio',
// Stops new Shell objects from navigating to a default url. ↪
'--no-initial-navigation',
'--no-sandbox',
'--disable-setuid-sandbox'
// Disables the sandbox for all process types that are normally sandboxed.
// Meant to be used as a browser-level switch for testing purposes only.
'--no-sandbox'
]
})
try {
Expand Down
26 changes: 20 additions & 6 deletions diagrams.net/src/browser-instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,27 @@ const puppeteer = require('puppeteer')
const createBrowser = async () => {
const browser = await puppeteer.launch({
args: [
'--disable-dev-shm-usage',
'--no-first-run',
'--no-initial-navigation',
'--no-sandbox',
// allow to local files from file://
// allow to access files from file:// protocol
'--allow-file-access-from-files',
// Disables GPU hardware acceleration.
// If software renderer is not in place, then the GPU process won't launch.
'--disable-gpu',
'--disable-translate',
// Disable the setuid sandbox (Linux only)
'--disable-setuid-sandbox',
// disable web security to access local files
'--disable-web-security',
'--allow-file-access-from-files'
// Run in headless mode, i.e., without a UI or display server dependencies
'--headless',
// Prevents creating scrollbars for web content. Useful for taking consistent screenshots.
'--hide-scrollbars',
// Mutes audio sent to the audio device, so it is not audible during automated testing.
'--mute-audio',
// Stops new Shell objects from navigating to a default url. ↪
'--no-initial-navigation',
// Disables the sandbox for all process types that are normally sandboxed.
// Meant to be used as a browser-level switch for testing purposes only.
'--no-sandbox'
]
})
try {
Expand Down
20 changes: 16 additions & 4 deletions excalidraw/src/browser-instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,23 @@ const puppeteer = require('puppeteer')
const createBrowser = async () => {
const browser = await puppeteer.launch({
args: [
'--disable-dev-shm-usage',
'--no-first-run',
// Disables GPU hardware acceleration.
// If software renderer is not in place, then the GPU process won't launch.
'--disable-gpu',
'--disable-translate',
// Disable the setuid sandbox (Linux only)
'--disable-setuid-sandbox',
// Run in headless mode, i.e., without a UI or display server dependencies
'--headless',
// Prevents creating scrollbars for web content. Useful for taking consistent screenshots.
'--hide-scrollbars',
// Mutes audio sent to the audio device, so it is not audible during automated testing.
'--mute-audio',
// Stops new Shell objects from navigating to a default url. ↪
'--no-initial-navigation',
'--no-sandbox',
'--disable-setuid-sandbox'
// Disables the sandbox for all process types that are normally sandboxed.
// Meant to be used as a browser-level switch for testing purposes only.
'--no-sandbox'
]
})
try {
Expand Down
21 changes: 17 additions & 4 deletions mermaid/src/browser-instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,25 @@ const { logger } = require('./logger')
const createBrowser = async () => {
const browser = await puppeteer.launch({
dumpio: true,
// reference: https://peter.sh/experiments/chromium-command-line-switches/
args: [
ggrossetie marked this conversation as resolved.
Show resolved Hide resolved
'--disable-dev-shm-usage',
'--no-first-run',
// Disables GPU hardware acceleration.
// If software renderer is not in place, then the GPU process won't launch.
'--disable-gpu',
'--disable-translate',
// Disable the setuid sandbox (Linux only)
'--disable-setuid-sandbox',
// Run in headless mode, i.e., without a UI or display server dependencies
'--headless',
// Prevents creating scrollbars for web content. Useful for taking consistent screenshots.
'--hide-scrollbars',
// Mutes audio sent to the audio device, so it is not audible during automated testing.
'--mute-audio',
// Stops new Shell objects from navigating to a default url. ↪
'--no-initial-navigation',
'--no-sandbox',
'--disable-setuid-sandbox'
// Disables the sandbox for all process types that are normally sandboxed.
// Meant to be used as a browser-level switch for testing purposes only.
'--no-sandbox'
]
})

Expand Down