-
Notifications
You must be signed in to change notification settings - Fork 275
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
Uncaught RuntimeException: Chrome process stopped before startup completed. #261
Comments
If you remove the headless option in the options, can you see the chrome window appear during the execution? And can you paste the debug output here? The debug info isn't displayed in a page, it's sent to the terminal. |
About the debug information it is simply not being generated. I'm using Monolog and in the version of my local machine, the logs are generated normally, but in this version that is giving an error, nothing is generated... apparently it doesn't even reach the "browserFactory->createBrowser(['debugLogger' => monologInstance] )". About the headless option I'll check it tomorrow as it's a machine that I don't have direct access to, but I'm afraid it will fall into the same problem as the debug. My code: $log = new Logger("chrome_php");
$logPath = __DIR__ . "/../logs/chrome_php.log";
$log->pushHandler(new StreamHandler($logPath));
$browserFactory = new BrowserFactory(); // seems to stop here
$browser = $browserFactory->createBrowser([
'headless' => false,
'debugLogger' => $log
]);
try {
$page = $browser->createPage();
$pdfOptions = [ 'printBackground' => true ];
// stuff
$page->navigate($url)->waitForNavigation(Page::DOM_CONTENT_LOADED);
$page->pdf($pdfOptions)->saveToFile($output);
} catch (Exception $e) {
$response['error'] = "Exception on Chrome-php: " . $e->getMessage();
} finally {
$browser->close();
} |
Here is the generated log: I tried using the connectionDelay and noSandbox options, but they did the same thing. The browser also doesn't seem to be opening with headless as false. |
Your chrome is just stopping shortly after starting. What happens if you try to execute |
Running your command opens chrome normally. |
Unfortunately I couldn't make it work through chrome-php and decided to make a separate script via command line with chrome. Thanks for trying to help |
I tried to solve this problem but I can't find a solution. I'm getting this issue but without any further information. I activated the suggested debug options but it doesn't make any difference since the error happens in the first line of code.
Error:
Fatal error: Uncaught RuntimeException: Chrome process stopped before startup completed. in D:\manual1_dev\Assistec\vendor\chrome-php\chrome\src\Browser\BrowserProcess.php:400 Stack trace: #0 D:\manual1_dev\Assistec\vendor\chrome-php\chrome\src\Utils.php(57): HeadlessChromium\Browser\BrowserProcess->HeadlessChromium\Browser{closure}(Object(Symfony\Component\Process\Process)) #1 D:\manual1_dev\Assistec\vendor\chrome-php\chrome\src\Browser\BrowserProcess.php(437): HeadlessChromium\Utils::tryWithTimeout(30000000, Object(Generator)) #2 D:\manual1_dev\Assistec\vendor\chrome-php\chrome\src\Browser\BrowserProcess.php(139): HeadlessChromium\Browser\BrowserProcess->waitForStartup(Object(Symfony\Component\Process\Process), 30000000) #3 D:\manual1_dev\Assistec\vendor\chrome-php\chrome\src\BrowserFactory.php(67): HeadlessChromium\Browser\BrowserProcess->start('C:\Program File...', Array) #4 D:\manual1_dev\Assistec\services\TicketDownloadService.php(278): HeadlessChromium\BrowserFactory->createBrowser(Array) #5 D:\manual1_dev in D:\manual1_dev\Assistec\vendor\chrome-php\chrome\src\Browser\BrowserProcess.php on line 400
The text was updated successfully, but these errors were encountered: