Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there an image that integrates Chrome, Firefox and Edge? - (ffmpeg Error with Edge) #450

Closed
mrpicklez70 opened this issue Feb 23, 2021 · 3 comments
Assignees

Comments

@mrpicklez70
Copy link

mrpicklez70 commented Feb 23, 2021

Hi, I need to include Edge as one of the supported browsers for my application, but I'm not able to run the specs sequentially as I do in Chrome and Firefox.

Context:

  • I've been using node12.18.3-chrome87-ff82 as base image (this is the base image of a DockerFile where I download some other dependencies).
  • I'm using parallelization with up to 9 machines(still some specs run in sequence) and everything works perfectly in Chrome and Firefox. Recently, I wanted to add Edge as a third browser to verify our application under.

Things I've tried:

  • Initially, I pulled the node12.18.4-edge88 image and tried to run my tests in sequence; it all worked perfectly.
  • Then, since I want to have my config under a single gitlab-ci.yml file, I tried to add Microsoft Edge as a dependency to my DockerFile and the installation was successful. However, when I ran the tests in Edge from the created container, I got this ffmpeg error after the first spec was executed. I tried the suggested workarounds from the thread, yet nothing seemed to work.
  • Then, I started checking the differences between the base image from node12.18.4-edge88 and node12.18.3-chrome87-ff82. What I found was that only the node version seemed to be different.
  • Therefore, I tried to use cypress/base:12.18.4 as base for my DockerFile and installed all three browsers 'manually'. And... again, Chrome and Firefox worked fine, but Edge threw the ffmpeg error after the first spec finished running.
  • Finally, I tried using the node12.18.4-edge88 as base image for my DockerFile and installed Chrome and Firefox 'manually. This time everything worked fine in all three browsers.

Attempted Approaches:

Cypress Base Image Cypress Browser Image Chrome Firefox Edge
cypress/base:12.18.3 cypress/browsers:node12.18.3-chrome87-ff82 Included - Runs Fine Included - Runs Fine Not Included (installed as additional dependency) - Runs fine first spec; then, throws ‘ffmpeg’ error in next spec.
cypress/base:12.18.4 none Installed as additional dependency - Runs Fine Installed as additional dependency - Runs Fine Installed as additional dependency - Runs fine first spec; then, throws ‘ffmpeg’ error in next spec.
cypress/base:12.18.4 cypress/browsers:node12.18.4-edge88 none none Included - Runs fine all specs in sequence
cypress/base:12.18.4 cypress/browsers:node12.18.4-edge88 Installed as additional dependency Installed as additional dependency Included - Runs fine all specs in sequence

Conclusion/Request?

  • First of all, I'm curious as to why there isn't an image with all three browsers integrated. These are three popular browsers and most applications are expected to work properly on them, so I would assume having an image with these 3 could come in handy for some folks.
  • Secondly, are there major differences (besides the browsers installation) between node12.18.3-chrome87-ff82 and node12.18.4-edge88 that could prevent Edge from working properly on it?
  • Will you guys consider creating an integrated image, or is there one that I don't know of? For now I was able to 'make it work', but it doesn't feel like the cleanest solution, and I would assume there's probably a reason why you guys have them in separate images (right?).

Thanks in advance for the help!

@RobinHoutevelts
Copy link

I'm interested in this as well

@mrpicklez70, could you share your DockerFile that is basednode12.18.4-edge88 where you installed chrome and ff yourself? It might save others me a few hours of work 😇

@mrpicklez70
Copy link
Author

mrpicklez70 commented Feb 23, 2021

I'm interested in this as well

@mrpicklez70, could you share your DockerFile that is basednode12.18.4-edge88 where you installed chrome and ff yourself? It might save others me a few hours of work 😇

Hi @RobinHoutevelts, sure thing. It looks somewhat like this:

FROM cypress/browsers:node12.18.4-edge88

RUN apt-get update
RUN apt-get install -y fonts-liberation libappindicator3-1 xdg-utils

# install Chrome browser
# check https://chromium.cypress.io/
ENV CHROME_VERSION 87.0.4280.66
RUN wget -O /usr/src/google-chrome-stable_current_amd64.deb "http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}-1_amd64.deb" && \
  dpkg -i /usr/src/google-chrome-stable_current_amd64.deb ; \
  apt-get install -f -y && \
  rm -f /usr/src/google-chrome-stable_current_amd64.deb
RUN google-chrome --version

# "fake" dbus address to prevent errors
# https://github.com/SeleniumHQ/docker-selenium/issues/87
ENV DBUS_SESSION_BUS_ADDRESS=/dev/null

# Add zip utility - it comes in very handy
RUN apt-get update && apt-get install -y zip

# add codecs needed for video playback in firefox
# https://github.com/cypress-io/cypress-docker-images/issues/150
RUN apt-get install mplayer -y

# install Firefox browser
ARG FIREFOX_VERSION=82.0
RUN wget --no-verbose -O /tmp/firefox.tar.bz2 https://download-installer.cdn.mozilla.net/pub/firefox/releases/$FIREFOX_VERSION/linux-x86_64/en-US/firefox-$FIREFOX_VERSION.tar.bz2 \
  && tar -C /opt -xjf /tmp/firefox.tar.bz2 \
  && rm /tmp/firefox.tar.bz2 \
  && ln -fs /opt/firefox/firefox /usr/bin/firefox

Note: I removed a list of dependencies that are specific to my project. If you look at the DockerFile of node12.18.3-chrome87-ff82 you'll notice that all I did was copy the installation lines for both chrome and firefox.

@jennifer-shehane
Copy link
Member

Duplicate of #333

@jennifer-shehane jennifer-shehane marked this as a duplicate of #333 Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants