Open Vad1mo opened 5 years ago
Hi!
I'm trying to understand your use case. Are you running java application with chromium inside a docker container or are you running just chromium inside a docker container?
Anyhow, the reason launcher is timing out is that it waits for process (chrome) to output DevTools listening on
, in order to get the port it's listening on, but that line never occurs.
If you're starting chrome manually (regardless if its docker container or standalone), you can instantiate a new ChromeService
as ChromeServiceImpl
, just pass it a port or host, if needed (also make sure port you're using is exposed, if you're using docker container`.
I'm trying to understand your use case. Are you running java application with chromium inside a docker container or are you running just chromium inside a docker container?
Yes the java application is running together with chromium in the same container. The java application should start chrome on demand.
Anyhow, the reason launcher is timing out is that it waits for process (chrome) to output DevTools listening on , in order to get the port it's listening on, but that line never occurs.
The question is why? I verified that I can start the chromium inside the container by hand, as seen in the code example. I am not sure why the application fails to do so.
If you're starting chrome manually (regardless if its docker container or standalone), you can instantiate a new ChromeService as ChromeServiceImpl, just pass it a port or host, if needed (also make sure port you're using is exposed, if you're using docker container.
I could try that as an workaround, but I would prefer that the java application controls chrome fully.
I am going to investigate a bit more to find out more about to root cause.
I am trying to run the example in a docker container but the chrome process is closes immediately,
this is my launcher code (the only thing different from the example)
Starting headless chromium works as expected
This is the dockerfile I am using it plain debian:stretch with the default chromium. Nothing fancy.
Maybe you have an idea what it might be, but I'll investigate some more in the following days.