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

keepalive not working #637

Open
andreas-globi opened this issue Jul 21, 2024 · 2 comments
Open

keepalive not working #637

andreas-globi opened this issue Jul 21, 2024 · 2 comments

Comments

@andreas-globi
Copy link

I've read some other issues here but they're all referring to symphony, which I'm not using.

My simplest code:

require_once "lib/vendor/autoload.php";
$factory = new HeadlessChromium\BrowserFactory();
$browser = $factory->createBrowser(["headless" => false, "keepAlive" => true ]);

But when the script ends, the browser closes.

I've also tried with /snap/bin/chromium but get the same result.

@enricodias
Copy link
Member

The other issues here are referring to the package symfony/process that this lib uses to create the chrome process. The keepAlive option should work. Are you testing it in linux?

@andreas-globi
Copy link
Author

Yes, this is on Ubuntu 22.04. I tried both with the default installed Chrome, and with specifying Chromium from a snap install. Same behaviour with both. On script completion the browser closes.

I also tried from a CLI script, a PhpUnit test, and from PsySh directly.

PhpUnit gave some extra info: Process finished with exit code 129 (interrupted by signal 1:SIGHUP)

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