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

Fatal error: Uncaught RuntimeException: Chrome process stopped before startup completed. Additional info: Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitte #603

Open
dev-mediakojo opened this issue Feb 9, 2024 · 2 comments

Comments

@dev-mediakojo
Copy link

Can't get it to work. It keeps failing when attempting to create a new browser. I tested with /usr/bin/chromium and /usr/bin/google-chrome-stable. Error is persistent.

use HeadlessChromium\BrowserFactory;

$browserFactory = new BrowserFactory('/usr/bin/chromium');
$browser = $browserFactory->createBrowser(); ([
'noSandbox' => true,
// 'headless' => true,
//'debugLogger' => 'php://stdout'
]);

Fatal error: Uncaught RuntimeException: Chrome process stopped before startup completed. Additional info: Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted [0209/111619.706814:FATAL:zygote_host_impl_linux.cc(201)] Check failed: . : Operation not permitted (1) in /var/www/vhosts/mydomain.com/httpdocs/src/Browser/BrowserProcess.php:427 Stack trace: #0 /var/www/vhosts/mydomain.com/httpdocs/src/Utils.php(60): HeadlessChromium\Browser\BrowserProcess->HeadlessChromium\Browser{closure}() #1 /var/www/vhosts/mydomain.com/httpdocs/src/Browser/BrowserProcess.php(467): HeadlessChromium\Utils::tryWithTimeout() #2 /var/www/vhosts/mydomain.com/httpdocs/src/Browser/BrowserProcess.php(138): HeadlessChromium\Browser\BrowserProcess->waitForStartup() #3 /var/www/vhosts/mydomain.com/httpdocs/src/BrowserFactory.php(83): HeadlessChromium\Browser\BrowserProcess->start() #4 /var/www/vhosts/mydomain.com/httpdocs/index.php(15): HeadlessChromium\BrowserFactory->createBrowser() #5 {main} thrown in /var/www/vhosts/mydomain.com/httpdocs/src/Browser/BrowserProcess.php on line 427

@dev-mediakojo
Copy link
Author

Here is some additional Info:
Server debian 12.4
PHP 8.2.15
Chromium 121.0.6167.160 built on Debian 12.4, running on Debian 12.4
Google Chrome 121.0.6167.160

@darkvovich
Copy link

I have the same problem on Cent OS, fixed it by REinstalling Chrome via this instruction https://linuxize.com/post/how-to-install-google-chrome-web-browser-on-centos-7/

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

No branches or pull requests

2 participants