Chrome browser crashes on docker-selenium instance with error message : session deleted because of page crash from unknown error: cannot determine loading status from tab crashed.
Image(s):
selenium/standalone-chrome
Docker-Selenium Image Version(s): selenium/standalone-chrome:3.4.0 & 3.3.0
Browser : Chrome
Version : 59.0
Browser should not crash in middle of the execution.
Browser is getting crashed in middle of the execution and session got closed.
Anyone has any idea regarding this? Help would be appreciated.
@vamshiangala
Can you share the docker command you use to start the containers?
@diemol
Below is the command used to start the docker containers.
$ docker run -d -p 4444:4444 selenium/standalone-chrome
This is a know thing.
Looks like you are not sharing the /dev/shm volume. Check: https://github.com/SeleniumHQ/docker-selenium#running-the-images
@diemol
We have pulled docker image for selenium standalone chrome in a instance and converted into AMI and added to a cluster. While we are creating Task Definition for this we are defining shared memory (/dev/shm).
As we are predefining shared memory in task definition, we are not giving /dev/shm (2GB) as a parameter while starting docker instance. We can also see the shared memory (/dev/shm) in the file system when we log into the instance and check.
But still chrome is crashing while execution.
@vamshiangala
I am not sure how it works in that specific environment, but I would double check and make sure that the running container /dev/shm size is at least 2GB (the default size is 64MB). Is there a way for you to do that? Go inside the container and check it, I am sure the EC2 instance has it but I am not sure if the container is actually using it.
This worked for us, thank you for the /dev/shm tip @diemol
Closing this issue due to inactivity from original OP, feel free to reopen in case more info is provided.
Most helpful comment
@vamshiangala
I am not sure how it works in that specific environment, but I would double check and make sure that the running container
/dev/shmsize is at least 2GB (the default size is 64MB). Is there a way for you to do that? Go inside the container and check it, I am sure the EC2 instance has it but I am not sure if the container is actually using it.