What happened?
I am getting an error when running webdriver.io based regression test suite. In this case, we have selenium grid and the browser nodes' instances set up in the Kubernetes cluster, there are 3 browser types consisting of chrome, edge and firefox. I set the test up to run against 2 instances of chrome and each time the test is fired it spins up 2 instances of chrome and runs about 4 tests before it crashes with the error message as:
"There has been an error while loading the running and queued Sessions from the Grid.
Unexpected token < in JSON at position 0"
Before this, I was getting spurious session queues with the session not cleaning up after the test might have stopped and eventual crashes. I managed this by including the following in my hook file:
afterSession: async function() {
// workaround to make sure the chromedriver shuts down
await browser.end().pause(1000);
},
after: async function() {
// workaround to make sure the chromedriver shuts down
await browser.pause(1000);
},
Then, I started getting the crashes as described above
How can we reproduce the issue?
This can be reproduced by setting up the selenium grid with the browsers' nodes in the Kubernetes cluster (in my case, I was testing against a remote selenium grid setup) and attempt to run a suite of webdriver.io cucumber scenarios based tests (12 or more tests) against it.
Relevant log output
There has been an error while loading the running and queued Sessions from the Grid.
Unexpected token < in JSON at position 0
Operating System
macOS BigSur
Selenium version
Selenium grid: 4.0.0-20211013, WebDriver.io, Nodejs vs 14.17.1
What are the browser(s) and version(s) where you see this issue?
Chrome 94.0.4606.81
What are the browser driver(s) and version(s) where you see this issue?
ChromeDriver 94.0.4606.81
Are you using Selenium Grid?
Selenium grid: 4.0.0
What happened?
I am getting an error when running webdriver.io based regression test suite. In this case, we have selenium grid and the browser nodes' instances set up in the Kubernetes cluster, there are 3 browser types consisting of chrome, edge and firefox. I set the test up to run against 2 instances of chrome and each time the test is fired it spins up 2 instances of chrome and runs about 4 tests before it crashes with the error message as:
"There has been an error while loading the running and queued Sessions from the Grid.
Unexpected token < in JSON at position 0"
Before this, I was getting spurious session queues with the session not cleaning up after the test might have stopped and eventual crashes. I managed this by including the following in my hook file:
afterSession: async function() {
// workaround to make sure the chromedriver shuts down
await browser.end().pause(1000);
},
Then, I started getting the crashes as described above
How can we reproduce the issue?
This can be reproduced by setting up the selenium grid with the browsers' nodes in the Kubernetes cluster (in my case, I was testing against a remote selenium grid setup) and attempt to run a suite of webdriver.io cucumber scenarios based tests (12 or more tests) against it.Relevant log output
Operating System
macOS BigSur
Selenium version
Selenium grid: 4.0.0-20211013, WebDriver.io, Nodejs vs 14.17.1
What are the browser(s) and version(s) where you see this issue?
Chrome 94.0.4606.81
What are the browser driver(s) and version(s) where you see this issue?
ChromeDriver 94.0.4606.81
Are you using Selenium Grid?
Selenium grid: 4.0.0