I have selenium based web application developed using spring boot. The server is located as VM Instance of google cloud server.
Please find below the details about the versions.
Spring Boot – 2.0.0.RELEASE
Selenium – 3.9.1
Linux – Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux
Chrome Driver – 2.35.528139 (47ead77cb35ad2a9a83248b292151462a66cd881)
Google Chrome – 70.0.3538.110
JDK – 1.8.0_232
From the past few days, I am facing a strange issue, application works fine when business hours start but after few hours it becomes unstable and whole application stop working, even user can not login.
After digging more for this issue I found the below error from server logs. I have to restart the VM Instance in order to fix it.
After restart, it works fine for a few hours and then we face same issue again.
Also, I have noticed that while sending an email we face the below issue which works fine before
a few minutes.
I also verified the server resource usage but didn’t find any suspicious activity.
I googled for this issue but most of the solutions are provided for the problem being faced while running it first time. However, in my case it works fine for few hours and then start having this issue.
Please help me to understand the issue and root cause of this problem. It would be better if you can suggest a solution as well.
Thanks in advance.
2
Answers
This error message…
…implies that the ChromeDriver was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
So there is a clear mismatch between Selenium Client v3.9.1 , ChromeDriver v2.35 and the Chrome Browser v70.0
Solution
Ensure that:
@Test
as non-root user.In my case, it was bcoz of chrome driver instance was closed in the middle of test execution. so it was not able to get that particular chrome driver to process the selenium commands. I had to tweak the logic of chrome instantiation and closure as in my case, parallel 3 chrome instances were opened and these were getting closed in the middle of execution so the problem was not finding a particular needed chrome driver instance.