Browser Management Examples
These examples show how to list, install, select, and remove browsers used by Butler Sheet Icons. All commands are provided for macOS/Linux (Bash) and Windows (PowerShell).
Prerequisites
- Install Butler Sheet Icons from the releases page
- Ensure you can run the executable
- macOS/Linux:
./butler-sheet-icons - Windows:
./butler-sheet-icons.exe(orbutler-sheet-icons.exe)
- macOS/Linux:
Basic operations
List currently installed browsers
./butler-sheet-icons browser list-installed./butler-sheet-icons.exe browser list-installedExample output:
2024-02-16T14:10:55.141Z info: App version: 3.2.3
2024-02-16T14:10:55.141Z info: Installed browsers:
2024-02-16T14:10:55.156Z info: chrome, build id=121.0.6167.85, platform=mac, path=/Users/you/.cache/puppeteer/chrome/mac-121.0.6167.85
2024-02-16T14:10:55.156Z info: firefox, build id=124.0a1, platform=mac, path=/Users/you/.cache/puppeteer/firefox/mac-124.0a1Install default browser (latest Chrome)
./butler-sheet-icons browser install./butler-sheet-icons.exe browser installExample output:
2024-02-16T14:13:35.312Z info: App version: 3.2.3
2024-02-16T14:13:35.484Z info: Resolved browser build id: "121.0.6167.85" for browser "chrome" version "stable"
2024-02-16T14:13:35.562Z info: Installing browser...
2024-02-16T14:13:44.062Z info: Browser "chrome" version "121.0.6167.85" installedInstall Firefox (latest)
./butler-sheet-icons browser install --browser firefox./butler-sheet-icons.exe browser install --browser firefoxList available Chrome builds (channels)
./butler-sheet-icons browser list-available --browser chrome --channel stable./butler-sheet-icons.exe browser list-available --browser chrome --channel stableInstall a specific Chrome version
First list available versions (see above), then install:
./butler-sheet-icons browser install --browser chrome --browser-version 121.0.6167.85./butler-sheet-icons.exe browser install --browser chrome --browser-version 121.0.6167.85Uninstall a specific browser version
./butler-sheet-icons browser uninstall --browser chrome --browser-version 121.0.6167.85./butler-sheet-icons.exe browser uninstall --browser chrome --browser-version 121.0.6167.85Remove all cached browsers
./butler-sheet-icons browser uninstall-all./butler-sheet-icons.exe browser uninstall-allUsing browsers when creating sheet icons
Use default browser
BSI will download and use the default browser (Chrome) if needed:
butler-sheet-icons qscloud create-sheet-icons \
--tenanturl mytenant.eu.qlikcloud.com \
--apikey $BSI_API_KEY \
--logonuserid user@company.com \
--logonpwd mypassword \
--appid 12345678-1234-1234-1234-123456789012./butler-sheet-icons.exe qscloud create-sheet-icons `
--tenanturl mytenant.eu.qlikcloud.com `
--apikey $env:BSI_API_KEY `
--logonuserid user@company.com `
--logonpwd mypassword `
--appid 12345678-1234-1234-1234-123456789012Specify browser type
butler-sheet-icons qscloud create-sheet-icons \
--tenanturl mytenant.eu.qlikcloud.com \
--apikey $BSI_API_KEY \
--logonuserid user@company.com \
--logonpwd mypassword \
--appid 12345678-1234-1234-1234-123456789012 \
--browser chrome./butler-sheet-icons.exe qscloud create-sheet-icons `
--tenanturl mytenant.eu.qlikcloud.com `
--apikey $env:BSI_API_KEY `
--logonuserid user@company.com `
--logonpwd mypassword `
--appid 12345678-1234-1234-1234-123456789012 `
--browser chromechrome is the only value the thumbnail commands accept. Firefox can be installed and removed with the browser commands, but cannot render thumbnails — see Supported Browsers.
Use a specific browser version
Install and then use a pinned version for consistency:
# Install specific version
./butler-sheet-icons browser install --browser chrome --browser-version 121.0.6167.85
# Use it
butler-sheet-icons qscloud create-sheet-icons \
--tenanturl mytenant.eu.qlikcloud.com \
--apikey $BSI_API_KEY \
--logonuserid user@company.com \
--logonpwd mypassword \
--appid 12345678-1234-1234-1234-123456789012 \
--browser chrome \
--browser-version 121.0.6167.85# Install specific version
./butler-sheet-icons.exe browser install --browser chrome --browser-version 121.0.6167.85
# Use it
./butler-sheet-icons.exe qscloud create-sheet-icons `
--tenanturl mytenant.eu.qlikcloud.com `
--apikey $env:BSI_API_KEY `
--logonuserid user@company.com `
--logonpwd mypassword `
--appid 12345678-1234-1234-1234-123456789012 `
--browser chrome `
--browser-version 121.0.6167.85Docker usage
The Docker image already contains a browser, and the browser commands are not how you manage it.
Chromium is installed inside the image, and the image is configured to use it. This is deliberate: it is what lets the container run on a server with no internet access. See Air-gapped environments.
What to expect
browser list-installed reports nothing when run against the image:
docker run --rm ptarmiganlabs/butler-sheet-icons:latest browser list-installedinfo: No browsers installedThis is correct, not a fault. That command lists browsers Butler Sheet Icons downloaded and cached for itself. The browser in the image is a system package installed when the image was built, so it does not appear there.
To see which browser the container will actually use:
docker run --rm --entrypoint /usr/bin/chromium-browser \
ptarmiganlabs/butler-sheet-icons:latest --versionChromium 150.0.7871.181 Alpine Linux--browser-version has no effect inside the image
Passing --browser-version to a thumbnail command in the container does not change which browser runs. Butler Sheet Icons uses the embedded one and tells you it has done so:
warn: PUPPETEER_EXECUTABLE_PATH overrides --browser-version "121.0.6167.85": the browser at /usr/bin/chromium-browser will be used instead. Unset PUPPETEER_EXECUTABLE_PATH to use the requested build.Worse, on a machine without internet access, some values of --browser-version will make the run fail while still not changing the browser — because the version has to be resolved before the browser is chosen. Leave it at its default, recommended, when running in Docker. The reasoning is in Browser versions on an air-gapped host.
If you need a different browser build
browser install on its own achieves nothing here: in a --rm container the download lands somewhere that is deleted seconds later. Using a browser other than the embedded one takes three things together, and leaving out any one of them breaks the run.
1. Put a browser in a folder on the host that the container can see. Mount the folder and run browser install inside the container, so the browser that gets downloaded is a Linux build — which is what a Linux container can run. This step needs internet access:
mkdir -p "$HOME/bsi/browser-cache"
docker run --rm \
-v "$HOME/bsi/browser-cache:/home/nodejs/.cache/puppeteer" \
ptarmiganlabs/butler-sheet-icons:latest \
browser install --browser chrome --browser-version 151.0.7922.772. Mount that folder on every later run, and empty PUPPETEER_EXECUTABLE_PATH so the embedded browser stops winning.
3. Ask for the same build you installed. Butler Sheet Icons looks for the exact build id that --browser-version resolves to, so the two have to agree:
docker run --rm \
-v "$HOME/bsi/browser-cache:/home/nodejs/.cache/puppeteer" \
-v "$HOME/bsi/img:/nodeapp/img" \
-e PUPPETEER_EXECUTABLE_PATH="" \
ptarmiganlabs/butler-sheet-icons:latest \
qscloud create-sheet-thumbnails \
--browser-version 151.0.7922.77 \
--tenanturl mytenant.eu.qlikcloud.com \
--apikey "$BSI_API_KEY" \
--logonuserid user@company.com \
--logonpwd "$BSI_PASSWORD" \
--appid 12345678-1234-1234-1234-123456789012 \
--imagedir ./imgA successful run says which one it picked:
info: Using cached browser: chrome 151.0.7922.77
info: Browser ready from cache: chrome 151.0.7922.77Do not mount a browser folder built on Windows or macOS
The folder has to contain a Linux browser. A cache filled by running Butler Sheet Icons on a Windows desktop contains Windows builds, and mounting it into the container does not fail cleanly — Butler Sheet Icons accepts the entry and then tries to start a .exe inside a Linux container.
Filling the folder with the command in step 1 avoids this, because the download then happens inside the container. See Docker image with external browser.
Clearing PUPPETEER_EXECUTABLE_PATH without providing a browser breaks the run
With the variable emptied and no usable cache mounted, the container has no browser and tries to download one. On a host with no internet access that ends the run:
info: No local browser found. Downloading and installing browser...
error: Error installing browser: Browser "chrome" version "recommended" cannot be downloaded. Please use the "list-available" command to check available versionsMount the folder, or leave the embedded browser alone.
Diagnostics and troubleshooting
Full diagnostic of browser setup
# Installed browsers
./butler-sheet-icons browser list-installed
# Available Chrome builds
./butler-sheet-icons browser list-available --browser chrome
# Available Firefox builds
./butler-sheet-icons browser list-available --browser firefox# Installed browsers
./butler-sheet-icons.exe browser list-installed
# Available Chrome builds
./butler-sheet-icons.exe browser list-available --browser chrome
# Available Firefox builds
./butler-sheet-icons.exe browser list-available --browser firefoxClean cache and reinstall
# Remove all
./butler-sheet-icons browser uninstall-all
# Reinstall common browsers
./butler-sheet-icons browser install --browser chrome
./butler-sheet-icons browser install --browser firefox
# Verify
./butler-sheet-icons browser list-installed# Remove all
./butler-sheet-icons.exe browser uninstall-all
# Reinstall common browsers
./butler-sheet-icons.exe browser install --browser chrome
./butler-sheet-icons.exe browser install --browser firefox
# Verify
./butler-sheet-icons.exe browser list-installedVisible mode test (debugging)
./butler-sheet-icons qscloud create-sheet-icons \
--tenanturl mytenant.eu.qlikcloud.com \
--apikey $BSI_API_KEY \
--logonuserid user@company.com \
--logonpwd mypassword \
--appid 12345678-1234-1234-1234-123456789012 \
--headless false \
--pagewait 10 \
--loglevel verbose./butler-sheet-icons.exe qscloud create-sheet-icons `
--tenanturl mytenant.eu.qlikcloud.com `
--apikey $env:BSI_API_KEY `
--logonuserid user@company.com `
--logonpwd mypassword `
--appid 12345678-1234-1234-1234-123456789012 `
--headless false `
--pagewait 10 `
--loglevel verbosePlatform-specific notes
Windows
- Browsers are stored in
C:\Users\<username>\.cache\puppeteer\ - Use PowerShell for the best experience
- Windows Defender might scan downloaded browsers (slight delays)
macOS
- Browsers are stored in
~/.cache/puppeteer/ - BSI binaries are notarized by Apple
- First run might show a security warning (normal)
Linux
- Browsers are stored in
~/.cache/puppeteer/ - Ensure sufficient disk space for browser downloads
- Some distributions might require additional dependencies
Best practices
Production
- Use specific browser versions to ensure consistency
- Pre-install browsers rather than downloading during execution
- Use headless mode for better performance
- Monitor disk space (browsers are 100–200 MB each)
Development
- Use visible mode when debugging login issues
- Keep multiple browser versions for compatibility testing
- Use verbose logging to understand behavior
- Test against more than one Chrome build before pinning one
CI/CD
- Cache browser downloads between pipeline runs
- Use specific versions to avoid unexpected changes
- Include browser installation in your deployment scripts
- Test browser functionality in your pipeline
For conceptual information, see the Browser Management Guide.