louislam / uptime-kuma

A fancy self-hosted monitoring tool
https://uptime.kuma.pet
MIT License
55.78k stars 5.02k forks source link

Chromium is not installed automatically when adding a Browser Engine Monitor #5013

Open chrisdeely opened 1 month ago

chrisdeely commented 1 month ago

📑 I have found these related issues/pull requests

Related to #4488. A potential distinction is that I already have Browser Engine Monitors configured before the container starts?

🛡️ Security Policy

Description

Chromium is not installed automatically when adding a Browser Engine Monitor.

Attempting the manual install command provides an error as well:

# apt install chromium
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package chromium

I also attempted the installation command used in the codebase at server/monitor-types /real-browser-monitor-type.js

# apt update && apt --yes --no-install-recommends install chromium fonts-indic fonts-noto fonts-noto-cjk
Reading package lists... Done
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/

Previously reported and closed in #4488

👟 Reproduction steps

Fresh install of kuma using the following:

$ docker run -d --restart=always -p 3001:3001 -v uptime-kuma:/app/data --name uptime-kuma louislam/uptime-kuma:1
Unable to find image 'louislam/uptime-kuma:1' locally
1: Pulling from louislam/uptime-kuma
b09759921de7: Download complete
8e208ccce385: Download complete
2fa455cae2bf: Download complete
4f4fb700ef54: Already exists
2bf5a632d8e4: Download complete
d4781d947d98: Download complete
1957dcecc453: Download complete
0e893e9bc55f: Download complete
5bc7dff3aaf3: Download complete
1dd5af03256d: Download complete
da1998da34c0: Download complete
ef94e1d893c1: Download complete
Digest: sha256:96510915e6be539b76bcba2e6873591c67aca8a6075ff09f5b4723ae47f333fc
Status: Downloaded newer image for louislam/uptime-kuma:1
1051dc84127bbaxxxxxxxxxxxxxxdf401628d8407322968dfdsaf87
  1. Add a Browser Engine Monitor
  2. Watch the system logs and see the following loop continually:
    2024-07-13 08:56:12 2024-07-13T08:56:12-04:00 [CHROMIUM] INFO: Installing Chromium...
    2024-07-13 08:56:12 2024-07-13T08:56:12-04:00 [CHROMIUM] INFO: apt install chromium exited with code 100
    2024-07-13 08:56:20 2024-07-13T08:56:20-04:00 [CHROMIUM] INFO: Installing Chromium...
    2024-07-13 08:56:20 2024-07-13T08:56:20-04:00 [CHROMIUM] INFO: apt install chromium exited with code 100
    2024-07-13 08:56:37 2024-07-13T08:56:37-04:00 [CHROMIUM] INFO: Installing Chromium...
    2024-07-13 08:56:38 2024-07-13T08:56:38-04:00 [CHROMIUM] INFO: apt install chromium exited with code 100
    2024-07-13 08:56:38 2024-07-13T08:56:38-04:00 [CHROMIUM] INFO: Installing Chromium...
    2024-07-13 08:56:38 2024-07-13T08:56:38-04:00 [CHROMIUM] INFO: apt install chromium exited with code 100

👀 Expected behavior

Chromium should be installed automatically within a few minutes

😓 Actual Behavior

Chromium fails to install

🐻 Uptime-Kuma Version

1.23.4

💻 Operating System and Arch

Ubuntu 20.04

🌐 Browser

Chrome

🖥️ Deployment Environment

📝 Relevant log output

2024-07-13 08:56:12 2024-07-13T08:56:12-04:00 [CHROMIUM] INFO: Installing Chromium... 2024-07-13 08:56:12 2024-07-13T08:56:12-04:00 [CHROMIUM] INFO: apt install chromium exited with code 100 2024-07-13 08:56:20 2024-07-13T08:56:20-04:00 [CHROMIUM] INFO: Installing Chromium... 2024-07-13 08:56:20 2024-07-13T08:56:20-04:00 [CHROMIUM] INFO: apt install chromium exited with code 100 2024-07-13 08:56:37 2024-07-13T08:56:37-04:00 [CHROMIUM] INFO: Installing Chromium... 2024-07-13 08:56:38 2024-07-13T08:56:38-04:00 [CHROMIUM] INFO: apt install chromium exited with code 100 2024-07-13 08:56:38 2024-07-13T08:56:38-04:00 [CHROMIUM] INFO: Installing Chromium... 2024-07-13 08:56:38 2024-07-13T08:56:38-04:00 [CHROMIUM] INFO: apt install chromium exited with code 100

$ apt install chromium Reading package lists... Done Building dependency tree
Reading state information... Done E: Unable to locate package chromium

$ apt update && apt --yes --no-install-recommends install chromium fonts-indic fonts-noto fonts-noto-cjk Reading package lists... Done E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/

CommanderStorm commented 1 month ago

Could you have a look via the diagnostic commands proposed here if there is currently an apt or apt-get command holding the lock?

Could you also please update to 1.23.13 to avoid related headaches?