You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We found several Chrome browsers hanging around in someone's container. I believe sometimes ALKiln test are interrupted and don't close the browser properly. Two things to do:
Help people who are currently using this package to close the ghost browsers. If they don't have their own chrome instances that they need, I'm looking at sudo killall -e chrome. I did research it, but I also use it regularly (for Reasons) and it may sound extreme, but it's ok.
Figure out how to take care of it in the future. Here's what I'm thinking, using this stackoverflow as a starting point:
Save the browser PID to a list of browser PIDs in the ALKiln runtime config.
When starting the AitP interview, loop through that list and try to close the processes with those IDs that have also been running for more than a day. We can think about adding an env var for max time for a test run.
There might be other things we can do, for example I'm looking into try/catch/finally for closing the browser. I'm not sure where in cucumber to put it. In Before() where we first create the browser? Currently we don't kill it till AfterAll(), so maybe we should move the start into BeforeAll() and also use a timeout that errors after 1 day.
I think that would probably be good practice, but also unlikely to solve what I think are more likely sources for the problem - internal un-terminated timeouts or the background action ending early/getting interrupted early by the server reloading and doing something funky. Need to experiment a bit.
The text was updated successfully, but these errors were encountered:
First findings: When we add shell=True to the subprocess.run() in the background action, chrome closes correctly. That confirms that we can recreate the behavior we have locally. Using shell isn't as secure as we want, though, so next is research into how to get the same result without shell.
That does mean we might be able to take care of it properly in this package, which would be ideal.
We found several Chrome browsers hanging around in someone's container. I believe sometimes ALKiln test are interrupted and don't close the browser properly. Two things to do:
sudo killall -e chrome
. I did research it, but I also use it regularly (for Reasons) and it may sound extreme, but it's ok.There might be other things we can do, for example I'm looking into
try/catch/finally
for closing the browser. I'm not sure where in cucumber to put it. InBefore()
where we first create the browser? Currently we don't kill it tillAfterAll()
, so maybe we should move the start intoBeforeAll()
and also use a timeout that errors after 1 day.I think that would probably be good practice, but also unlikely to solve what I think are more likely sources for the problem - internal un-terminated timeouts or the background action ending early/getting interrupted early by the server reloading and doing something funky. Need to experiment a bit.
The text was updated successfully, but these errors were encountered: