Open vmassol opened 1 year ago
Hi @vmassol looks like you were able to get this figured out. What was the problem and resolution?
@jamesmortensen Unfortunately no, I'm still blocked on this. I had opened a ticket on the TC issue tracker but they rightly told me that I should open an issue on the Selenium tracker which is what I've done here. I've closed the other issue since there's this one now.
I have tried many combinations of the seleniarm tags and selenium versions to no avail so far. If someone has any idea how I could debug this further, I would be much appreciated.
Thanks
I checked the TC docs but could not find it. How do you configure the used image?
@diemol With TC, use it like this:
BrowserWebDriverContainer<?> webDriverContainer =
new BrowserWebDriverContainer<>("seleniarm/standalone-firefox:latest")
// We set the width and height to one of the most used resolution by users so that we can reproduce issues
// for the larger use case and also we use a relatively large resolution to display the maximum number of
// elements on screen and reduce the risk of false positives in tests that could be due to elements not
// visible or missing elements (on small screens we don't display all elements).
.withEnv("SCREEN_WIDTH", DEFAULT_WIDTH_RESOLUTION)
.withEnv("SCREEN_HEIGHT", DEFAULT_HEIGHT_RESOLUTION)
// TODO: The default session timeout is 300 seconds (i.e. 5mn). We think this is what could cause the
// "Unable to find session with ID" error message we see sometimes on the CI. We think that it's possible
// that a session timeout of 300s means that the whole test suite of a docker test module must take less
// than 5mn or we can get the error. Thus, as a test, we increase the value to 10 times the default value.
// If there are still errors happening after this change then it'll mean the problem is elsewhere and we'll
// revert this change.
.withEnv("SE_NODE_SESSION_TIMEOUT", String.valueOf(10 * 300L))
.withCapabilities(browser.getCapabilities())
.withNetwork(Network.SHARED)
.withNetworkAliases("vnchost")
.withRecordingMode(BrowserWebDriverContainer.VncRecordingMode.SKIP, null);
Note that the source code for the TC BrowserWebDriverContainer
class is at https://github.com/testcontainers/testcontainers-java/blob/main/modules/selenium/src/main/java/org/testcontainers/containers/BrowserWebDriverContainer.java
Thanks
@vmassol did you say this worked with the previous release of docker-seleniarm images? What makes you think it's a Firefox browser and geckodriver incompatibility? Reason I ask is that we did update to geckodriver v0.33.0.
@vmassol I created a standalone-firefox with selenium 4.10.0, Firefox 114 and geckodriver 0.32.2 for debugging purposes. Do you want to try this one and see if there's any differences. It will rule out or confirm your theory on geckodriver being a problem:
docker pull jamesmortensen1/standalone-firefox/4.1.0-20230627
NOTE:
Please let me know what happens and if previous versions of Firefox/geckodriver/selenium work for you.
@jamesmortensen thanks a lot, much appreciated. I'm on holidays and will be back in 10 days but I'll try to find some time to check it out. Mentioning this so that you're aware that I may be slow to answer, but I'm on it! Thx
@vmassol no worries. Enjoy your holidays!
What happened?
The XWiki build broke recently on Mac M1 only, due to our TestContainer-based tests all failing. We're using:
1.18.3
4.10.0
seleniarm/standalone-firefox:latest
(currently pointing to114.0-geckodriver-0.33-20230615
)I've tried various combinations of different versions of TestContainers/Selenium/seleniarm image to no avail.
Not that it works fine on other oses (other than Mac M1) so the issue is mostly likely an incompatibility between the geckdriver version used with seleniarm latest (114.0).
Any idea of what I could do?
Command used to start Selenium Grid with Docker
Relevant log output