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

Support for using sandbox #142

Closed
aumeshm opened this issue Aug 25, 2024 · 4 comments
Closed

Support for using sandbox #142

aumeshm opened this issue Aug 25, 2024 · 4 comments

Comments

@aumeshm
Copy link

aumeshm commented Aug 25, 2024

Right now, puppeteer real browser only uses the --no-sandbox flag. There should be a setting so we can set the real browser to use sandbox vs --no-sandbox

@zfcsoftware
Copy link
Owner

ignoreAllFlags: true https://github.com/GoogleChrome/chrome-launcher?tab=readme-ov-file#api You can turn it off by adding the defaultFlags here again. However, I cannot turn it off to avoid problems when running with Docker. You can follow the steps I forwarded to turn it off.
it doesn't just use the ol flag. It uses many flags. You can visit the link for details.

@aumeshm
Copy link
Author

aumeshm commented Aug 27, 2024

@zfcsoftware losing the default flags just to turn off --no-sandbox may be undesirable. What are the implications here of turning off all flags, seeing that's the only way to turn off --no-sandbox right now.

Is it worth to have a param: enableSandbox?

@zfcsoftware
Copy link
Owner

@zfcsoftware losing the default flags just to turn off --no-sandbox may be undesirable. What are the implications here of turning off all flags, seeing that's the only way to turn off --no-sandbox right now.

Is it worth to have a param: enableSandbox?

When running with Docker, the browser cannot start if --no-sandbox is not used. I can't remove it for compatibility reasons. I've added the default arguments below. You can add the following arguments to the args value using ignoreAllFlags.

[
  '--disable-extensions',
  '--disable-component-extensions-with-background-pages',
  '--disable-background-networking',
  '--disable-client-side-phishing-detection',
  '--disable-sync',
  '--metrics-recording-only',
  '--disable-default-apps',
  '--mute-audio',
  '--no-default-browser-check',
  '--no-first-run',
  '--disable-backgrounding-occluded-windows',
  '--disable-renderer-backgrounding',
  '--disable-background-timer-throttling',
  '--disable-ipc-flooding-protection',
  '--password-store=basic',
  '--use-mock-keychain',
  '--force-fieldtrials=*BackgroundTracing/default/',
  '--disable-hang-monitor',
  '--disable-prompt-on-repost',
  '--disable-domain-reliability',
  '--propagate-iph-for-testing',
  '--start-maximized',
  '--disable-features=Translate,OptimizationHints,MediaRouter,DialMediaRouteProvider,CalculateNativeWinOcclusion,InterestFeedContentSuggestions,CertificateTransparencyComponentUpdater,AutofillServerCommunication,PrivacySandboxSettings4,AutomationControlled',
  '--no-sandbox'
]

@aumeshm
Copy link
Author

aumeshm commented Aug 27, 2024

fair enough thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants