Got it fixed here also.
For Unraid docker use following instructions:
1 Get inside your docker console:
docker exec -it MANAGER-DOCKER-NAME bash
2 Update & install chromium:
apt-get update
apt-get install -y chromium || apt-get install -y chromium-browser
3 Search for the right chromium which is installed:
which chromium || which chromium-browser
4:
cat << ‘EOF’ > /usr/local/bin/manager-chrome-wrapper
#!/bin/bash
exec /usr/bin/chromium --no-sandbox --disable-gpu --headless “$@”
EOF
chmod +x /usr/local/bin/manager-chrome-wrapper
5 Look for PUPPETEER:
env | grep PUPPETEER
6:
Go in Unraid UI → Docker → your docker container → Edit
Below the page: Add another Path, Port, Variable, Label → Variable
Name: PUPPETEER_EXECUTABLE_PATH
Key: PUPPETEER_EXECUTABLE_PATH
Value: /usr/local/bin/manager-chrome-wrapper
Apply (container restart)
Again check in the container if you can find PUPPETEER:
env | grep PUPPETEER_EXECUTABLE_PATH
Response should be:
PUPPETEER_EXECUTABLE_PATH=/usr/local/bin/manager-chrome-wrapper
7 Check if Chrome is working inside the docker:
Enter in the console inside the container:
manager-chrome-wrapper --dump-dom https://example.com
If you get this HTML response back →
Chromium works through the wrapper.
8:
If using HTTP instead of HTTPS make sure you mark your IP address as secure for HTTP.
Otherwise your browser will block the API.
Fill this in your browser you are using:
Brave: brave://flags/#unsafely-treat-insecure-origin-as-secure
Chrome: chrome://flags/#unsafely-treat-insecure-origin-as-secure
Edge: edge://flags/#unsafely-treat-insecure-origin-as-secure
Look for the flag “Insecure origins treated as secure”.
Set this option to enabled.
In the text field add your IP or URL, something like this:
HTTP://192.168.1.105:8080 and/or HTTP://yourdomain.com/manager/
Then relaunch your browser as stated below in your screen.
9:
If you get error message missing chrome headless shell, then apply following commands in your console in your docker.
If not in your docker console yet:
docker exec -it MANAGER-DOCKER-NAME bash
10:
apt-get update
apt-get install -y wget unzip
11:
unzip chrome-headless-shell-linux64.zip
mkdir -p /root/.cache/puppeteer/chrome-headless-shell/linux-138.0.7204.101/
mv chrome-headless-shell-linux64 /root/.cache/puppeteer/chrome-headless-shell/linux-138.0.7204.101/
12 Last check:
If your moving has done correctly you can check it with this command:
ls -l /root/.cache/puppeteer/chrome-headless-shell/linux-138.0.7204.101/chrome-headless-shell-linux64
If it repeats back with the files in that folder you are good to go.
Now check if the PDF creator and the Email button works. It should be working.
Took me some time to figure out but I managed to get it fixed.
If you want to use HTTPS instead of making an exception in your browser you should be using Nginx reverse proxy server.
Good luck!
Sincerely,
Dreammert
