-
Notifications
You must be signed in to change notification settings - Fork 413
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
wasm-pack test --headless --chrome
fails in docker container
#1355
Comments
Installing the correct googledriver and chrome version from google chrome labs will fix this. I will leave this issue open, as I believe two things would improve user friendliness:
Otherwise seems to work as expected. |
Updated the Dockerfile to install the correct chromedriver and chrome version, which then allows running: New DockerfileARG VARIANT="16"
ARG RUSTUP_VERSION="1.26.0"
ARG CHROME_VERSION="120.0.6099.109"
FROM node:${VARIANT}
ARG RUSTUP_VERSION
ENV RUSTUP_VERSION $RUSTUP_VERSION
ARG CHROME_VERSION
ENV CHROME_VERSION $CHROME_VERSION
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y \
ca-certificates \
fonts-liberation \
libasound2 \
libatk-bridge2.0-0 \
libatk1.0-0 \
libatspi2.0-0 \
libc6 \
libcairo2 \
libcups2 \
libcurl3-gnutls \
libcurl3-nss \
libcurl4 \
libdbus-1-3 \
libdbus-1-3 \
libdrm2 \
libexpat1 \
libgbm1 \
libglib2.0-0 \
libgtk-3-0 \
libnspr4 \
libnss3 \
libpango-1.0-0 \
libu2f-udev \
libvulkan1 \
libx11-6 \
libxcb1 \
libxcomposite1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxkbcommon0 \
libxrandr2 \
vim
# Install chrome + chromedriver
RUN mkdir -p /opt/google/chrome/ \
&& cd /opt/google/chrome/ \
&& curl -L --proto '=https' --tlsv1.2 --output /tmp/chromedriver.zip \
"https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/120.0.6099.109/linux64/chromedriver-linux64.zip" \
&& unzip /tmp/chromedriver.zip \
&& rm /tmp/chromedriver.zip \
&& ln -s /opt/google/chrome/chromedriver-linux64/chromedriver /usr/bin/chromedriver \
&& curl -L --proto '=https' --tlsv1.2 --output /tmp/chrome.zip \
"https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/120.0.6099.109/linux64/chrome-linux64.zip" \
&& unzip /tmp/chrome.zip \
&& ln -s /opt/google/chrome/chrome-linux64/chrome /usr/bin/google-chrome-stable \
&& ln -s /usr/bin/google-chrome-stable /usr/bin/google-chrome \
&& rm /tmp/chrome.zip
USER node
RUN curl -L --proto '=https' --tlsv1.2 --output /tmp/rustup-init \
"https://static.rust-lang.org/rustup/archive/${RUSTUP_VERSION}/x86_64-unknown-linux-gnu/rustup-init" \
&& chmod +x /tmp/rustup-init \
&& /tmp/rustup-init -y \
&& rm /tmp/rustup-init
RUN /home/node/.cargo/bin/cargo install \
wasm-pack |
🐛 Bug description
While running
wasm-pack-test --headless --chrome
in an docker container the test fails with following error:using the wasm-pack version
0.12.1
.The non
--headless
version works.Full log (`RUST_LOG=wasm_bindgen_test_runner wasm-pack test --chrome --headless`)
🤔 Expected Behavior
The test should succeed as they do with the non
--headless
version.👟 Steps to reproduce
Dockerfile
Start docker container
docker run --rm -it node:16 bash
Setup environment
wasm-pack test --headless --chrome
🌍 Your environment
wasm-pack version:
0.12.1
rustc version:
1.75.0 (82e1608df 2023-12-21)
Docker (Debian 10 - buster)
Docker Host (WSL)
Findings
This error seems to be related to chromedriver beeing started without
--whitelisted-ips=
.I do not know on how to pass arguments to the chrome driver to verify this.
The firefox headless fails aswell, thought with aExpected behaviorSIGKILL
Seems to be related to Headless chrome test fails due to incorrect chromedriver version #1126
The text was updated successfully, but these errors were encountered: