was-checker
v0.4.2
Published
Check if your domain passes WAS requirements.
Readme
WAS Checker
Check if your domain passes WAS requirements.
Contents
How to use in terminal
Run the following command:
npx was-checker <domain>How to use in your project
Coming soon
Troubleshooting
This section provides solutions to common issues when using WAS Checker.
Missing shared libraries
The missing shared libraries error most commonly occurs on "lightweight" Linux systems (e.g. Arch, Alpine or containerized environments), where a browser and/or required system libraries are not installed or cannot be found.
On Debian based systems, run the following command to install a compatible browser and all necessary dependencies. This should resolve the issue:
npx puppeteer browsers install chrome --install-depsOn other Linux systems, installing the chromium package along with its dependencies will usually work as well.
WAS Checker will most likely not work on Alpine Linux, even with chromium installed. This is due to Puppeteer — the browser automation tool used by WAS Checker — being unstable or non-functional on Alpine. The root cause is most likely Alpine’s use of the musl libc C library instead of the more common glibc library. While some online threads suggest workarounds — like installing a bunch of packages and running Puppeteer with --no-sandbox — this is not recommended by the Puppeteer team and will not be supported in WAS Checker, therefore Alpine Linux is not recommended.
Running as root
WAS Checker relies on Puppeteer, which in turn uses a headless Chromium browser. Chromium does not allow running as the root user unless the --no-sandbox option is used — but this introduces security risks and is not recommended by the Puppeteer team. Because of this, WAS Checker does not support running as root.
Please switch to a non-root user, or alternatively, try running WAS Checker in Docker.
No usable sandbox
This is a common issue on systems running Ubuntu 23.10 or newer, where there is a new AppArmor profile that applies restrictions to Chrome for Testing binaries (the ones used by Puppeteer). See more details here: https://pptr.dev/troubleshooting#issues-with-apparmor-on-ubuntu
There are a few possible solutions to this. The most reliable and relatively safe option is to create a new AppArmor profile that applies specifically to binaries used by Puppeteer. The risks and tradeoffs are explained here.
You can apply this solution by running the following snippet in your terminal:
export PPTR_CHROME_BUILD_PATH=/@{HOME}/.cache/puppeteer/chrome/**/chrome
cat | sudo tee /etc/apparmor.d/puppeteer-chrome-dev-builds <<EOF
abi <abi/4.0>,
include <tunables/global>
profile chrome $PPTR_CHROME_BUILD_PATH flags=(unconfined) {
userns,
# Site-specific additions and overrides. See local/README for details.
include if exists <local/chrome>
}
EOF
sudo service apparmor reload # reload AppArmor profiles to include the new oneAlternatives
If you are unable to run WAS Checker and the Troubleshooting section does not resolve your issue, you can try one of the following alternatives to run the tool.
Running WAS Checker in Docker
If you have Docker installed, running WAS Checker in a container should work on most systems. However, certain issues — such as the No Usable Sandbox problem on Ubuntu and other AppArmor-enabled systems — have been known to persist.
You can run WAS Checker in your terminal by using the following command (Replace <domain> with your domain):
docker run --rm ghcr.io/puppeteer/puppeteer:24.6.0 npx --yes --no-update-notifier was-checker <domain>If you are using WAS Checker as an npm dependency in a project, you can build a Docker image based on ghcr.io/puppeteer/puppeteer:24.6.0 and copy your code into it. This should allow it to run reliably.
Online WAS Checker tool
Coming soon
