Comments (2)
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:
- Add a hint or some additional documentation that the browser needs to be installed (https://rustwasm.github.io/docs/wasm-pack/commands/test.html).
- Maybe a friendly error message to indicate the browser is not installed.
Otherwise seems to work as expected.
Thanks to the team for the great work ❤️
from wasm-pack.
Updated the Dockerfile to install the correct chromedriver and chrome version, which then allows running: wasm-pack test --chrome --chromedriver "$(which chromedriver)" --headless
.
New Dockerfile
ARG 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
from wasm-pack.
Related Issues (20)
- Found invalid metadata `core` `compiler_builtins` HOT 1
- Add an option to --keep-debug HOT 2
- wasm build failed because of rimage HOT 1
- Allow specifying url(s) for interactive browsers tests
- NPM Package Fails to Install on Mingw
- Wasm-opt endless loop
- `wasm-pack` doesn't default-export the init function in .d.ts file HOT 1
- npm reports warnings in generated `package.json` file
- Support msys2 environment
- Please update the ring crate to 17.x HOT 2
- `wasm32-unknown-unknown` target not found HOT 2
- `cargo install wasm-pack --version 0.12.1` fails on MacOS HOT 4
- Unknown option '-0z' HOT 1
- Unable to pack/publish when out-dir option is used for build
- 'wasm-pack build' fails because of 'error: could not compile `crossterm` (lib)' HOT 1
- `build --release` should generate JS without white-space HOT 1
- --verbose should print cargo command
- Please update the npm package HOT 1
- yarn build-wasm errors with `Unknown system error -86`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wasm-pack.