testcontainers / testcontainers-java

Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.
https://testcontainers.org
MIT License
8.05k stars 1.66k forks source link

Launching chrome on Windows 10 fails if SHM not specified #4490

Open 11aleksandrmd11 opened 3 years ago

11aleksandrmd11 commented 3 years ago

Good day!

I use Windows 10, testcontainers 1.16.0 selenium 4.0.0-alpha-4

.testcontainers.properties

docker.client.strategy=org.testcontainers.dockerclient.NpipeSocketClientProviderStrategy
vncrecorder.container.image = testcontainers/vnc-recorder:1.1.0
ryuk.container.image = testcontainers/ryuk:0.3.2 
tinyimage.container.image = alpine:3.14
sshd.container.image = testcontainers/sshd
checks.disable = false

The problem occurs when using the chrome browser. Firefox works without errors.

public static final BrowserWebDriverContainer<?> container = new BrowserWebDriverContainer<>()
            .withCapabilities(new ChromeOptions())
            .withRecordingMode(VncRecordingMode.RECORD_ALL, new File("target"), VncRecordingFormat.MP4)
            .withStartupTimeout(Duration.ofMinutes(10)).withNetwork(Network.newNetwork());
container.start();

The following error occurs:

[main] INFO 🐳 [selenium/standalone-chrome-debug:2.45.0] - Creating container for image: selenium/standalone-chrome-debug:2.45.0
[main] INFO 🐳 [selenium/standalone-chrome-debug:2.45.0] - Starting container with ID: e83ff10ecebe6721c05a49de0b6aaef0d2fcc924b8ed8bb91ed67b0983bfb407
[main] INFO 🐳 [selenium/standalone-chrome-debug:2.45.0] - Container selenium/standalone-chrome-debug:2.45.0 is starting: e83ff10ecebe6721c05a49de0b6aaef0d2fcc924b8ed8bb91ed67b0983bfb407
[main] INFO 🐳 [selenium/standalone-chrome-debug:2.45.0] - Container selenium/standalone-chrome-debug:2.45.0 started in PT1M18.882S
[main] ERROR 🐳 [selenium/standalone-chrome-debug:2.45.0] - Could not start container
org.rnorth.ducttape.TimeoutException: org.rnorth.ducttape.TimeoutException: java.util.concurrent.TimeoutException
    at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:56)
    at org.testcontainers.containers.BrowserWebDriverContainer.containerIsStarted(BrowserWebDriverContainer.java:276)
    at org.testcontainers.containers.GenericContainer.containerIsStarted(GenericContainer.java:685)
    at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:502)
    at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:329)
    at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
    at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:327)
    at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:315)
    at ru.sbtqa.tag.pagefactory.drivers.TagWebDriver.startContainer(TagWebDriver.java:243)
    at ru.sbtqa.tag.pagefactory.drivers.TagWebDriver.createDriver(TagWebDriver.java:127)
    at ru.sbtqa.tag.pagefactory.drivers.TagWebDriver.getDriver(TagWebDriver.java:98)
    at ru.sbtqa.tag.pagefactory.PageFactory.getDriver(PageFactory.java:83)
    at ru.sbtqa.tag.pagefactory.PageFactory.getWebDriver(PageFactory.java:75)
    at ru.sbtqa.ufs.ui.stepdefinitions.CommonStepDefinitionsGUI.loginInFs(CommonStepDefinitionsGUI.java:78)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at cucumber.runtime.Utils$1.call(Utils.java:26)
    at cucumber.runtime.Timeout.timeout(Timeout.java:16)
    at cucumber.runtime.Utils.invoke(Utils.java:20)
    at cucumber.runtime.java.JavaStepDefinition.execute(JavaStepDefinition.java:57)
    at cucumber.runner.PickleStepDefinitionMatch.runStep(PickleStepDefinitionMatch.java:50)
    at cucumber.runner.TestStep.executeStep(TestStep.java:65)
    at cucumber.runner.TestStep.run(TestStep.java:50)
    at cucumber.runner.PickleStepTestStep.run(PickleStepTestStep.java:43)
    at cucumber.runner.TestCase.run(TestCase.java:46)
    at cucumber.runner.Runner.runPickle(Runner.java:50)
    at cucumber.runtime.junit.PickleRunners$NoStepDescriptions.run(PickleRunners.java:146)
    at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:68)
    at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:23)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:73)
    at cucumber.api.junit.Cucumber.runChild(Cucumber.java:126)
    at cucumber.api.junit.Cucumber.runChild(Cucumber.java:66)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at cucumber.api.junit.Cucumber$RunCucumber.evaluate(Cucumber.java:156)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
Caused by: org.rnorth.ducttape.TimeoutException: java.util.concurrent.TimeoutException
    at org.rnorth.ducttape.timeouts.Timeouts.callFuture(Timeouts.java:70)
    at org.rnorth.ducttape.timeouts.Timeouts.getWithTimeout(Timeouts.java:43)
    at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:40)
    ... 52 more
Caused by: java.util.concurrent.TimeoutException
    at java.util.concurrent.FutureTask.get(FutureTask.java:205)
    at org.rnorth.ducttape.timeouts.Timeouts.callFuture(Timeouts.java:65)
    ... 54 more
[main] ERROR 🐳 [selenium/standalone-chrome-debug:2.45.0] - Log output from the failed container:
Waiting xvfb...
17:36:54.004 INFO - Launching a standalone server
17:36:54.042 INFO - Java: Oracle Corporation 24.79-b02
17:36:54.042 INFO - OS: Linux 5.10.16.3-microsoft-standard-WSL2 amd64
17:36:54.056 INFO - v2.45.0, with Core v2.45.0. Built from revision 5017cb8
17:36:54.111 INFO - Default driver org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: registration capabilities Capabilities [{platform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=}] does not match with current platform: LINUX
17:36:54.175 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
17:36:54.176 INFO - Version Jetty/5.1.x
17:36:54.180 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
17:36:54.182 INFO - Started HttpContext[/selenium-server,/selenium-server]
17:36:54.182 INFO - Started HttpContext[/,/]
17:36:54.203 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@4ce1bafc
17:36:54.203 INFO - Started HttpContext[/wd,/wd]
17:36:54.208 INFO - Started SocketListener on 0.0.0.0:4444
17:36:54.208 INFO - Started org.openqa.jetty.jetty.Server@1fdf75cc
29/09/2021 17:36:54 passing arg to libvncserver: -rfbport
29/09/2021 17:36:54 passing arg to libvncserver: 5900
29/09/2021 17:36:54 -usepw: found /root/.vnc/passwd
29/09/2021 17:36:54 x11vnc version: 0.9.13 lastmod: 2011-08-10  pid: 51
29/09/2021 17:36:54 Using X display :99.0
29/09/2021 17:36:54 rootwin: 0x169 reswin: 0x200001 dpy: 0x1367770
29/09/2021 17:36:54 
29/09/2021 17:36:54 ------------------ USEFUL INFORMATION ------------------
Failed to read: session.ignoreBorder
Setting default value
Failed to read: session.forcePseudoTransparency
Setting default value
Failed to read: session.colorsPerChannel
Setting default value
Failed to read: session.doubleClickInterval
Setting default value
Failed to read: session.tabPadding
Setting default value
Failed to read: session.styleOverlay
Setting default value
Failed to read: session.slitlistFile
Setting default value
Failed to read: session.appsFile
Setting default value
Failed to read: session.tabsAttachArea
Setting default value
Failed to read: session.cacheLife
Setting default value
Failed to read: session.cacheMax
Setting default value
Failed to read: session.autoRaiseDelay
Setting default value
Failed to read: session.ignoreBorder
Setting default value
Failed to read: session.forcePseudoTransparency
Setting default value
Failed to read: session.colorsPerChannel
Setting default value
Failed to read: session.doubleClickInterval
Setting default value
Failed to read: session.tabPadding
Setting default value
Failed to read: session.styleOverlay
Setting default value
Failed to read: session.slitlistFile
Setting default value
Failed to read: session.appsFile
Setting default value
Failed to read: session.tabsAttachArea
Setting default value
Failed to read: session.cacheLife
Setting default value
Failed to read: session.cacheMax
Setting default value
Failed to read: session.autoRaiseDelay
Setting default value
Failed to read: session.screen0.opaqueMove
Setting default value
Failed to read: session.screen0.fullMaximization
Setting default value
Failed to read: session.screen0.maxIgnoreIncrement
Setting default value
Failed to read: session.screen0.maxDisableMove
Setting default value
Failed to read: session.screen0.maxDisableResize
Setting default value
Failed to read: session.screen0.workspacewarping
Setting default value
Failed to read: session.screen0.showwindowposition
Setting default value
Failed to read: session.screen0.autoRaise
Setting default value
Failed to read: session.screen0.clickRaises
Setting default value
Failed to read: session.screen0.defaultDeco
Setting default value
Failed to read: session.screen0.tab.placement
Setting default value
Failed to read: session.screen0.windowMenu
Setting default value
Failed to read: session.screen0.noFocusWhileTypingDelay
Setting default value
Failed to read: session.screen0.workspaces
Setting default value
Failed to read: session.screen0.edgeSnapThreshold
Setting default value
Failed to read: session.screen0.window.focus.alpha
Setting default value
Failed to read: session.screen0.window.unfocus.alpha
Setting default value
Failed to read: session.screen0.menu.alpha
Setting default value
Failed to read: session.screen0.menuDelay
Setting default value
Failed to read: session.screen0.tab.width
Setting default value
Failed to read: session.screen0.tooltipDelay
Setting default value
Failed to read: session.screen0.allowRemoteActions
Setting default value
Failed to read: session.screen0.clientMenu.usePixmap
Setting default value
Failed to read: session.screen0.tabs.usePixmap
Setting default value
Failed to read: session.screen0.tabs.maxOver
Setting default value
Failed to read: session.screen0.tabs.intitlebar
Setting default value
Failed to read: session.screen0.focusModel
Setting default value
Failed to read: session.screen0.tabFocusModel
Setting default value
Failed to read: session.screen0.focusNewWindows
Setting default value
Failed to read: session.screen0.focusSameHead
Setting default value
Failed to read: session.screen0.rowPlacementDirection
Setting default value
Failed to read: session.screen0.colPlacementDirection
Setting default value
Failed to read: session.screen0.windowPlacement
Setting default value
Xlib:  extension "RANDR" missing on display ":99.0".
Failed to read: session.ignoreBorder
Setting default value
Failed to read: session.forcePseudoTransparency
Setting default value
Failed to read: session.colorsPerChannel
Setting default value
Failed to read: session.doubleClickInterval
Setting default value
Failed to read: session.tabPadding
Setting default value
Failed to read: session.styleOverlay
Setting default value
Failed to read: session.slitlistFile
Setting default value
Failed to read: session.appsFile
Setting default value
Failed to read: session.tabsAttachArea
Setting default value
Failed to read: session.cacheLife
Setting default value
Failed to read: session.cacheMax
Setting default value
Failed to read: session.autoRaiseDelay
Setting default value
Failed to read: session.screen0.opaqueMove
Setting default value
Failed to read: session.screen0.fullMaximization
Setting default value
Failed to read: session.screen0.maxIgnoreIncrement
Setting default value
Failed to read: session.screen0.maxDisableMove
Setting default value
Failed to read: session.screen0.maxDisableResize
Setting default value
Failed to read: session.screen0.workspacewarping
Setting default value
Failed to read: session.screen0.showwindowposition
Setting default value
Failed to read: session.screen0.autoRaise
Setting default value
Failed to read: session.screen0.clickRaises
Setting default value
Failed to read: session.screen0.defaultDeco
Setting default value
Failed to read: session.screen0.tab.placement
Setting default value
Failed to read: session.screen0.windowMenu
Setting default value
Failed to read: session.screen0.noFocusWhileTypingDelay
Setting default value
Failed to read: session.screen0.workspaces
Setting default value
Failed to read: session.screen0.edgeSnapThreshold
Setting default value
Failed to read: session.screen0.window.focus.alpha
Setting default value
Failed to read: session.screen0.window.unfocus.alpha
Setting default value
Failed to read: session.screen0.menu.alpha
Setting default value
Failed to read: session.screen0.menuDelay
Setting default value
Failed to read: session.screen0.tab.width
Setting default value
Failed to read: session.screen0.tooltipDelay
Setting default value
Failed to read: session.screen0.allowRemoteActions
Setting default value
Failed to read: session.screen0.clientMenu.usePixmap
Setting default value
Failed to read: session.screen0.tabs.usePixmap
Setting default value
Failed to read: session.screen0.tabs.maxOver
Setting default value
Failed to read: session.screen0.tabs.intitlebar
Setting default value
Failed to read: session.screen0.focusModel
Setting default value
Failed to read: session.screen0.tabFocusModel
Setting default value
Failed to read: session.screen0.focusNewWindows
Setting default value
Failed to read: session.screen0.focusSameHead
Setting default value
Failed to read: session.screen0.rowPlacementDirection
Setting default value
Failed to read: session.screen0.colPlacementDirection
Setting default value
Failed to read: session.screen0.windowPlacement
Setting default value
29/09/2021 17:36:55 X DAMAGE available on display, using it for polling hints.
29/09/2021 17:36:55   To disable this behavior use: '-noxdamage'
29/09/2021 17:36:55 
29/09/2021 17:36:55   Most compositing window managers like 'compiz' or 'beryl'
29/09/2021 17:36:55   cause X DAMAGE to fail, and so you may not see any screen
29/09/2021 17:36:55   updates via VNC.  Either disable 'compiz' (recommended) or
29/09/2021 17:36:55   supply the x11vnc '-noxdamage' command line option.
29/09/2021 17:36:55 
29/09/2021 17:36:55 Wireframing: -wireframe mode is in effect for window moves.
29/09/2021 17:36:55   If this yields undesired behavior (poor response, painting
29/09/2021 17:36:55   errors, etc) it may be disabled:
29/09/2021 17:36:55    - use '-nowf' to disable wireframing completely.
29/09/2021 17:36:55    - use '-nowcr' to disable the Copy Rectangle after the
29/09/2021 17:36:55      moved window is released in the new position.
29/09/2021 17:36:55   Also see the -help entry for tuning parameters.
29/09/2021 17:36:55   You can press 3 Alt_L's (Left "Alt" key) in a row to 
29/09/2021 17:36:55   repaint the screen, also see the -fixscreen option for
29/09/2021 17:36:55   periodic repaints.
29/09/2021 17:36:55 
29/09/2021 17:36:55 XFIXES available on display, resetting cursor mode
29/09/2021 17:36:55   to: '-cursor most'.
29/09/2021 17:36:55   to disable this behavior use: '-cursor arrow'
29/09/2021 17:36:55   or '-noxfixes'.
29/09/2021 17:36:55 using XFIXES for cursor drawing.
29/09/2021 17:36:55 GrabServer control via XTEST.
29/09/2021 17:36:55 
29/09/2021 17:36:55 Scroll Detection: -scrollcopyrect mode is in effect to
29/09/2021 17:36:55   use RECORD extension to try to detect scrolling windows
29/09/2021 17:36:55   (induced by either user keystroke or mouse input).
29/09/2021 17:36:55   If this yields undesired behavior (poor response, painting
29/09/2021 17:36:55   errors, etc) it may be disabled via: '-noscr'
29/09/2021 17:36:55   Also see the -help entry for tuning parameters.
29/09/2021 17:36:55   You can press 3 Alt_L's (Left "Alt" key) in a row to 
29/09/2021 17:36:55   repaint the screen, also see the -fixscreen option for
29/09/2021 17:36:55   periodic repaints.
29/09/2021 17:36:55 
29/09/2021 17:36:55 XKEYBOARD: number of keysyms per keycode 7 is greater
29/09/2021 17:36:55   than 4 and 51 keysyms are mapped above 4.
29/09/2021 17:36:55   Automatically switching to -xkb mode.
29/09/2021 17:36:55   If this makes the key mapping worse you can
29/09/2021 17:36:55   disable it with the "-noxkb" option.
29/09/2021 17:36:55   Also, remember "-remap DEAD" for accenting characters.
29/09/2021 17:36:55 
29/09/2021 17:36:55 X FBPM extension not supported.
29/09/2021 17:36:55 X display is not capable of DPMS.
29/09/2021 17:36:55 --------------------------------------------------------
29/09/2021 17:36:55 
29/09/2021 17:36:55 Default visual ID: 0x21
29/09/2021 17:36:55 Read initial data from X display into framebuffer.
29/09/2021 17:36:55 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/5440
29/09/2021 17:36:55 
29/09/2021 17:36:55 X display :99.0 is 32bpp depth=24 true color
29/09/2021 17:36:55 
29/09/2021 17:36:55 Listening for VNC connections on TCP port 5900
29/09/2021 17:36:55 Listening for VNC connections on TCP6 port 5900
29/09/2021 17:36:55 listen6: bind: Address already in use
29/09/2021 17:36:55 Not listening on IPv6 interface.
29/09/2021 17:36:55 fb read rate: 1510 MB/sec
29/09/2021 17:36:55 fast read: reset -wait  ms to: 10
29/09/2021 17:36:55 fast read: reset -defer ms to: 10
29/09/2021 17:36:55 The X server says there are 10 mouse buttons.
29/09/2021 17:36:55 screen setup finished.
29/09/2021 17:36:55 

The VNC desktop is:      e83ff10ecebe:0

******************************************************************************
Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?

The scheme stores pixel data offscreen on the VNC viewer side for faster
retrieval.  It should work with any VNC viewer.  Try it by running:

    x11vnc -ncache 10 ...

One can also add -ncache_cr for smooth 'copyrect' window motion.
More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching

PORT=5900
Failed to read: session.screen0.slit.acceptKdeDockapps
Setting default value
Failed to read: session.screen0.slit.autoHide
Setting default value
Failed to read: session.screen0.slit.maxOver
Setting default value
Failed to read: session.screen0.slit.placement
Setting default value
Failed to read: session.screen0.slit.alpha
Setting default value
Failed to read: session.screen0.slit.onhead
Setting default value
Failed to read: session.screen0.slit.layer
Setting default value
Failed to read: session.screen0.toolbar.autoHide
Setting default value
Failed to read: session.screen0.toolbar.maxOver
Setting default value
Failed to read: session.screen0.toolbar.visible
Setting default value
Failed to read: session.screen0.toolbar.alpha
Setting default value
Failed to read: session.screen0.toolbar.layer
Setting default value
Failed to read: session.screen0.toolbar.onhead
Setting default value
Failed to read: session.screen0.toolbar.placement
Setting default value
Failed to read: session.screen0.toolbar.height
Setting default value
Failed to read: session.screen0.iconbar.mode
Setting default value
Failed to read: session.screen0.iconbar.alignment
Setting default value
Failed to read: session.screen0.iconbar.iconWidth
Setting default value
Failed to read: session.screen0.iconbar.iconTextPadding
Setting default value
Failed to read: session.screen0.iconbar.usePixmap
Setting default value
29/09/2021 17:36:56 Got connection from client 192.168.32.1
29/09/2021 17:36:56   other clients:
29/09/2021 17:36:56 webSocketsHandshake: unknown connection error
29/09/2021 17:36:56 Client 192.168.32.1 gone
29/09/2021 17:36:56 Statistics             events    Transmit/ RawEquiv ( saved)
29/09/2021 17:36:56  TOTALS              :      0 |         0/        0 (  0.0%)
29/09/2021 17:36:56 Statistics             events    Received/ RawEquiv ( saved)
29/09/2021 17:36:56  TOTALS              :      0 |         0/        0 (  0.0%)
17:36:56.835 INFO - Executing: [new session: Capabilities [{javascriptEnabled=true, acceptSslCerts=true, browserName=chrome, webdriver.chrome.driver=[--ignore-ssl-errors=true], goog:chromeOptions={useAutomationExtension=true, args=[--ignore-certificate-errors, --ignore-ssl-errors=yes, --no-sandbo], extensions=[]}, takesScreenshot=true, version=latest, acceptInsecureCerts=true}]])
17:36:56.904 INFO - Creating a new session for Capabilities [{javascriptEnabled=true, acceptSslCerts=true, browserName=chrome, webdriver.chrome.driver=[--ignore-ssl-errors=true], goog:chromeOptions={useAutomationExtension=true, args=[--ignore-certificate-errors, --ignore-ssl-errors=yes, --no-sandbo], extensions=[]}, takesScreenshot=true, version=latest, acceptInsecureCerts=true}]
Starting ChromeDriver 2.14.313457 (3d645c400edf2e2c500566c9aa096063e707c9cf) on port 11788
Only local connections are allowed.
[0.068][WARNING]: PAC support disabled because there is no system implementation

CommonStepDefinitionsGUI.loginInFs(String)
      org.testcontainers.containers.ContainerLaunchException: Container startup failed
    at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:334)
    at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:315)
    at ru.sbtqa.tag.pagefactory.drivers.TagWebDriver.startContainer(TagWebDriver.java:243)
    at ru.sbtqa.tag.pagefactory.drivers.TagWebDriver.createDriver(TagWebDriver.java:127)
    at ru.sbtqa.tag.pagefactory.drivers.TagWebDriver.getDriver(TagWebDriver.java:98)
    at ru.sbtqa.tag.pagefactory.PageFactory.getDriver(PageFactory.java:83)
    at ru.sbtqa.tag.pagefactory.PageFactory.getWebDriver(PageFactory.java:75)
    at ru.sbtqa.ufs.ui.stepdefinitions.CommonStepDefinitionsGUI.loginInFs(CommonStepDefinitionsGUI.java:78)
    at ✽.пользователь открывает страницу по параметру "url-clickstream"(file:src/test/resources/features/ui/Новая%20ТМ/Слепые%20зоны/BL/CSA-T1835_Нет_данных_для_отображения.feature:8)
Caused by: org.rnorth.ducttape.RetryCountExceededException: Retry limit hit with exception
    at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:88)
    at org.testcontainers.containers.GenericContainer.doStart(GenericContainer.java:327)
    at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:315)
    at ru.sbtqa.tag.pagefactory.drivers.TagWebDriver.startContainer(TagWebDriver.java:243)
    at ru.sbtqa.tag.pagefactory.drivers.TagWebDriver.createDriver(TagWebDriver.java:127)
    at ru.sbtqa.tag.pagefactory.drivers.TagWebDriver.getDriver(TagWebDriver.java:98)
    at ru.sbtqa.tag.pagefactory.PageFactory.getDriver(PageFactory.java:83)
    at ru.sbtqa.tag.pagefactory.PageFactory.getWebDriver(PageFactory.java:75)
    at ru.sbtqa.ufs.ui.stepdefinitions.CommonStepDefinitionsGUI.loginInFs(CommonStepDefinitionsGUI.java:78)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at cucumber.runtime.Utils$1.call(Utils.java:26)
    at cucumber.runtime.Timeout.timeout(Timeout.java:16)
    at cucumber.runtime.Utils.invoke(Utils.java:20)
    at cucumber.runtime.java.JavaStepDefinition.execute(JavaStepDefinition.java:57)
    at cucumber.runner.PickleStepDefinitionMatch.runStep(PickleStepDefinitionMatch.java:50)
    at cucumber.runner.TestStep.executeStep(TestStep.java:65)
    at cucumber.runner.TestStep.run(TestStep.java:50)
    at cucumber.runner.PickleStepTestStep.run(PickleStepTestStep.java:43)
    at cucumber.runner.TestCase.run(TestCase.java:46)
    at cucumber.runner.Runner.runPickle(Runner.java:50)
    at cucumber.runtime.junit.PickleRunners$NoStepDescriptions.run(PickleRunners.java:146)
    at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:68)
    at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:23)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:73)
    at cucumber.api.junit.Cucumber.runChild(Cucumber.java:126)
    at cucumber.api.junit.Cucumber.runChild(Cucumber.java:66)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at cucumber.api.junit.Cucumber$RunCucumber.evaluate(Cucumber.java:156)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
Caused by: org.testcontainers.containers.ContainerLaunchException: Could not create/start container
    at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:523)
    at org.testcontainers.containers.GenericContainer.lambda$doStart$0(GenericContainer.java:329)
    at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:81)
    ... 47 more
Caused by: org.rnorth.ducttape.TimeoutException: org.rnorth.ducttape.TimeoutException: java.util.concurrent.TimeoutException
    at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:56)
    at org.testcontainers.containers.BrowserWebDriverContainer.containerIsStarted(BrowserWebDriverContainer.java:276)
    at org.testcontainers.containers.GenericContainer.containerIsStarted(GenericContainer.java:685)
    at org.testcontainers.containers.GenericContainer.tryStart(GenericContainer.java:502)
    ... 49 more
Caused by: org.rnorth.ducttape.TimeoutException: java.util.concurrent.TimeoutException
    at org.rnorth.ducttape.timeouts.Timeouts.callFuture(Timeouts.java:70)
    at org.rnorth.ducttape.timeouts.Timeouts.getWithTimeout(Timeouts.java:43)
    at org.rnorth.ducttape.unreliables.Unreliables.retryUntilSuccess(Unreliables.java:40)
    ... 52 more
Caused by: java.util.concurrent.TimeoutException
    at java.util.concurrent.FutureTask.get(FutureTask.java:205)
    at org.rnorth.ducttape.timeouts.Timeouts.callFuture(Timeouts.java:65)
    ... 54 more

`

kiview commented 3 years ago

Hi @11aleksandrmd11, this is a known issue with the Chrome image and Docker on Windows (probably introduced through the WSL2 backend).

Can you check if specifying withSharedMemorySize(2147483648L) for the container solves the issue for you?

11aleksandrmd11 commented 3 years ago

Many thanks! It really helped! Can you please tell me, it only works in browsers FireFox and Chrome?

kiview commented 3 years ago

It should work with all Selenium image flavors: https://github.com/SeleniumHQ/docker-selenium

I have never tested it with the Edge images.