RESOLVED: Email and PDF Button not working in recent releases (cronet docker)

Version = 25.10.23.3022
Environment = Linux Server Docker (https://hub.docker.com/r/cronet/manager.io)
Hosting = Self hosted local network.

I recently updated my version to the latest docker release version and ever since that update I am unable to use the email and pdf functions. After doing some network troubleshooting I found that if the server version is not based on https url the buttons just flat out don’t work when you click on them. This goes for local ip address such as 192.168… Did not try localhost as i have a server for this purpose.

After some research on this error when clicking the buttons would pop up in the console for my browser.

async function sha256Hex(str) { const data = new TextEncoder().encode(str); const hash = await crypto.subtle.digest('SHA-256', data); return Array.from(new Uint8Array(hash)).map(b => b.toString(16).padStart(2, '0')).join(''); }

*Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘digest’) on the crypto.subtle line
*
This led me to the conclusion of the https issue with the app now. Once that was resolved by setting up my proxy to forward on https this error went away and was replaced with this error from chrome. This might not be the case for everyone I understand but the call out is that they server needs to be on a https url for the buttons to work.

Chromium distribution 'chrome' is not found at /opt/google/chrome/chrome Run "pwsh bin/Debug/netX/playwright.ps1 install chrome"

By installing chromium in the docker with this command (replace the container name)
docker exec -it <container_name> bash -c “apt-get update && apt-get install -y chromium && mkdir -p /opt/google/chrome && ln -s /usr/bin/chromium /opt/google/chrome/chrome”

I was able to resolve all issue with PDF and Email functions and now the buttons work as expected in the newest release.

1 Like

I am using Server edition on Almalinux9. I resolve the same issue with the following code, using Terminal.

Add Google Chrome Repository
sudo tee /etc/yum.repos.d/google-chrome.repo <<EOF
[google-chrome]
name=google-chrome
baseurl=https://dl.google.com/linux/chrome/rpm/stable/\$basearch
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub
EOF

Install Google Chrome
sudo dnf install -y google-chrome-stable

Verify Chrome Installation
/opt/google/chrome/chrome --version
1 Like

I am getting below error on my ubuntu server edition, can anybody help to resolve this?

Little bit of chatgpt resulted in this. Not really knowing how you are running the software assuming it is bare metal ubuntu and running local on ubuntu no docker?

:magnifying_glass_tilted_left: What’s really going on

That log you’re seeing:

cannot start document portal: dial unix /run/user/999/bus: connect: no such file or directory
/system.slice/managerio.service is not a snap cgroup
Target page, context or browser has been closed

…means Manager.io is trying to launch Chrome (or Chromium) in headless mode to render something — usually a PDF, report, or a print preview — but Chrome can’t talk to the desktop session because:

  • The user running managerio.service (UID 999) doesn’t have a runtime directory (/run/user/999), and

  • Chrome is failing to start since it expects a DBus session (a background service that’s usually present in desktop environments).

Since you’re on a headless Ubuntu server, that session doesn’t exist — so Chrome crashes instantly.


:white_check_mark: Fix options (bare-metal Ubuntu)

Option 1 — Create a runtime directory for the service user

If Manager.io is running under a system user (like UID 999), it doesn’t have the /run/user/999 directory it needs.
Create it manually and give it proper ownership:

sudo mkdir -p /run/user/999
sudo chown -R 999:999 /run/user/999

Then restart the service:

sudo systemctl restart managerio


Option 2 — Install and use Chromium with the right flags

If you haven’t already installed Chromium:

sudo apt-get update
sudo apt-get install -y chromium-browser

Manager.io (or its embedded Playwright/Puppeteer) sometimes looks for Chrome at /opt/google/chrome/chrome, but Ubuntu typically installs Chromium at /usr/bin/chromium-browser.

So, create a symlink to satisfy that expectation:

sudo ln -s /usr/bin/chromium-browser /opt/google/chrome/chrome

Then test Chrome manually:

chromium-browser --no-sandbox --disable-setuid-sandbox --disable-dev-shm-usage --headless --version

If it prints a version without crashing, you’re golden.


Option 3 — Set environment variables for headless mode

If Manager.io runs as a systemd service, add these environment variables to its service file.

Edit it:

sudo systemctl edit managerio.service

Add this section:

[Service]
Environment="CHROMIUM_FLAGS=--no-sandbox --disable-setuid-sandbox --disable-dev-shm-usage"
Environment="CHROME_PATH=/usr/bin/chromium-browser"

Then reload and restart:

sudo systemctl daemon-reload
sudo systemctl restart managerio

This ensures Chromium starts cleanly even without a GUI session.


Option 4 — (Optional) Install a virtual display backend

If you still see Chrome errors, it might need a fake display server.
You can install xvfb (a virtual framebuffer X server):

sudo apt-get install -y xvfb

Then wrap Chrome commands with:

xvfb-run -a chromium-browser --no-sandbox ...

That tricks Chrome into thinking a display exists, even though your server is headless.


:brain: TL;DR Fix Summary

Run these once:

sudo apt-get update
sudo apt-get install -y chromium-browser xvfb
sudo mkdir -p /run/user/999
sudo chown 999:999 /run/user/999
sudo ln -s /usr/bin/chromium-browser /opt/google/chrome/chrome

Then add this to your Manager.io service (via sudo systemctl edit managerio.service):

[Service]
Environment="CHROMIUM_FLAGS=--no-sandbox --disable-setuid-sandbox --disable-dev-shm-usage"
Environment="CHROME_PATH=/usr/bin/chromium-browser"

Restart Manager.io:

sudo systemctl daemon-reload
sudo systemctl restart managerio