Regarding the page crash issue in Webdriver

1,143 views
Skip to first unread message

Arthy Bhoopi

unread,
Mar 31, 2021, 4:52:37 AM3/31/21
to Selenium Users
Hello Everyone!!

Thanks in Advance!!!

Anyone observed a similar kind of issue, any solution for this?

I am facing this issue when build thru Jenkins hosed in CENTOS!! In my local (windows ) i dont get this issue!! 

org.openqa.selenium.WebDriverException: unknown error: session deleted because of page crash from unknown error: cannot determine loading status from tab crashed (Session info: headless chrome=87.0.4280.141)

I am using Webdrivermanager in Pom.xml
<dependency>
    <groupId>io.github.bonigarcia</groupId>
    <artifactId>webdrivermanager</artifactId>
    <version>4.2.2</version>
        </dependency>


With  regards,
Arthy V.

Adrian

unread,
Apr 5, 2021, 3:08:39 AM4/5/21
to Selenium Users
This looks like it is going to be very hard to find.
I suspect that when running in Jenkins it is running headless and on your local machine it is not running headless.  So maybe that is the place to start - investigating the difference in code.
I really can't provide a better answer than that.  I would need all the code to figure it out and a.lot of time.

I did have this error in my tests and it is a little hard to remember why.  It was something like I was calling a step from another step definition which may have been in a different class.
I fixed the issue by removing all calls from one step to another and calling the actual method instead.

So instead of something like:
  [Given(@"(.*) is logged in")] 
  public void GivenIsLoggedIn(string name) 
  { 
       Given(string.Format("the user {0} exists", name)); 
       Given(string.Format("I log in as {0}", name)); 
  }

I replaced with:
  [Given(@"(.*) is logged in")] 
  public void GivenIsLoggedIn(string name) 
  { 
       UserExists(name) 
       LogIn(name); 
  }

However the error you have maybe caused by other odd things.


Goodluck,
Adrian.

Arthy Bhoopi

unread,
Apr 5, 2021, 4:27:45 AM4/5/21
to seleniu...@googlegroups.com
thank you .Adrian
i will try this way.

arthy v.


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/f1b451f4-f8b2-42d3-aa40-624a0a4ac562n%40googlegroups.com.

Kumar Harshvardhan

unread,
Apr 5, 2021, 4:39:55 AM4/5/21
to seleniu...@googlegroups.com
Hi

I was getting  below error :
org.openqa.selenium.WebDriverException: unknown error: session deleted because of page crash
from unknown error: cannot determine loading status
from tab crashed

The solution that I got was : 
1. Simpy mount -v /dev/shm:/dev/shm

Or, longer, create a big shm

Started in privileged mode: docker run --privileged
Fix small /dev/shm size
2. 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.



What worked for me :
1. when running in chrome image :
chrome:
     image: selenium/node-chrome-debug:3.141.59-20200409
       #By default, Docker runs a container with a /dev/shm shared memory space 64MB. This is typically too small for Chrome and will cause Chrome to crash when rendering large pages.
       #Since Chrome 65, this is no longer necessary. Instead, launch the browser with the --disable-dev-shm-usage flag:
     volumes:
        - /dev/shm:/dev/shm
        #- /home/ec2-user/workspace/AUTOBOTS_QA_CERTIFICATION/testautomationrunner:/home/seluser/Downloads
        - ${PWD}:/home/seluser/Downloads
    # shm_size: 256mb
     depends_on:
        - selenium-hub

2. In script for chrome driver
options.addArguments("--no-sandbox"); //has to be the very first option , // Bypass OS security model
        options.addArguments("--disable-dev-shm-usage"); // overcome limited resource problems

Let me know if it works for you.

Regards
Harsh

Arthy Bhoopi

unread,
Apr 5, 2021, 5:17:38 AM4/5/21
to seleniu...@googlegroups.com
Hello Harsh!!
 
 I am running my automation thru jenkins hosted in Centos . I tried this way ,but it didnt solve my problem.
i think some other problem in Centos server ...

Regards.
Arthy V

Adrian

unread,
Apr 5, 2021, 5:29:08 PM4/5/21
to Selenium Users
To locate my issue, I put log messages in many places.
Then I examined the results to see which message was not logged and then I added even more log messages to narrow the issue down to 1 line of code.
I think this is your best strategy.

Reply all
Reply to author
Forward
0 new messages