What is the Firefox Gecko equivalent to Chrome's --disable-dev-shm-usage flag

10

Docker environment: Docker Container, ubuntu:18.10, geckodriver-v0.23.0-linux64, selenium-3.14.1

In Chrome, I did not have enough resources allocated to my Docker Container. Adding the "--disable-dev-shm-usage" flag to Chrome fixed the issue. Since its using local /tmp instead of it's /dev/shm it has plenty of room.

Now I need to fix the same issue for the Geckodriver. I can't find documentation for Geckodriver's equivalent flag to "--disable-dev-shm-usage".

Does anyone know if there is an equivalent and/or what it is? Alternate ideas welcome.

Edit: Adding error messages:

I’m taking screenshots of specific elements on some very large webpages. Sometimes 200 images.

.

My Warning: Could not create image for ".thumbnail_none > .item-label-href[rel="nofollow"][target="_blank"] > .video-label-box > .branding" because:
Message: Browsing context has been discarded

My Warning: Could not create image for".thumbnail_none > .item-label-href[rel="nofollow"][target="_blank"] > .video-label-box > .branding" because:
Message: [Exception... "Failure"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://marionette/content/browser.js :: get rect :: line 254"  data: no]

My Warning: Could not create image for".active___2c4EX > .content___1UWin > .duration___fewg4" because:
Message: Browsing context has been discarded

My Warning: Could not create image for".article___1MtWi:nth-child(2) > .teaseCard > .think-module.teaseCard__picture > .eyebrow___3eQZ6.ph4-m.pt4 > .vilynx_listened > span" because:
Message: Failed to decode response from marionette

My Warning: Could not create image for".article___1Fn4y:nth-child(1) > .content___2Wmo9.teaseCard > .think-module.teaseCard__picture > .eyebrow___3eQZ6.ph4-m.pt4 > .vilynx_listened > span" because:
Message: Tried to run command without establishing a connection

All messages after that repeat every time the function that looks for the selector to make the image is called:

My Warning: Could not create image for"div[observeid="tbl-observe-1"] > .item-label-href[rel="nofollow"][target="_blank"] > .trc-main-label.video-label-box > .branding" because:
Message: Tried to run command without establishing a connection

Warning: Could not create image for".videoCube_2_child > .item-label-href[rel="nofollow"][target="_blank"] > .trc-main-label.video-label-box > .branding" because:
Message: Tried to run command without establishing a connection

Warning: Could not create image for".videoCube_3_child > .item-label-href[rel="nofollow"][target="_blank"] > .trc-main-label.video-label-box > .branding" because:
Message: Tried to run command without establishing a connection

Additional tracebacks for Chromedriver can be found in another unanswered question I have: Why would using Selenium webdriver to execute JS fine locally on my Mac, but not in a Docker container?

Adding "--disable-dev-shm-usage" does fix that question for Chomedriver, but I wanted to get an answer to the Geckodriver before I self answer. Feel free to answer that one if you have the answer. I will test and mark your answer as correct.

They are separate questions because I don't know 100% that they are the same issue.

Edit: Removed one unrelated stacktrace

selenium
docker
selenium-webdriver
asked on Stack Overflow Nov 29, 2018 by heart.cooks.mind • edited Nov 29, 2018 by heart.cooks.mind

2 Answers

0

Try to use a volume in the docker run execution with the flag -v /dev/shm:/dev/shm

This should work for chrome and firefox execution without any flag in the capabilities

Documentation

0

After looking into the documentation (https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#How_to_use_command_options), there is no such flag for Firefox.

answered on Stack Overflow Dec 30, 2019 by JackTheRipper

User contributions licensed under CC BY-SA 3.0