louislam / uptime-kuma

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

ReferenceError: ReadableStream is not defined. #5141

Closed GavinL2001 closed 5 hours ago

GavinL2001 commented 6 hours ago

📑 I have found these related issues/pull requests

Did not find related issues when searching for error.

🛡️ Security Policy

Description

After updating to 1.23.14, my instance would no longer load due to the error. I did not change anything in my config between updates and I did not find any warnings about updates breaking existing configs.

👟 Reproduction steps

Here is my docker-compose.yml I use (slightly modified to remove network information):

services:
  uptime-kuma:
    image: louislam/uptime-kuma:1-alpine
    container_name: uptime-kuma
    volumes:
      - ./uptime-kuma-data:/app/data
      - /var/run/docker.sock:/var/run/docker.sock:ro
#    ports:
#      - 3001:3001  # <Host Port>:<Container Port>
    environment:
      - PUID=0
      - PGID=0
    expose:
      - 3001
    restart: always

👀 Expected behavior

These are the logs I get when running 1.23.13:

==> Performing startup jobs and maintenance tasks
==> Starting application with user 0 group 0
Welcome to Uptime Kuma
Your Node.js version: 16.13.1
2024-09-29T20:25:32Z [SERVER] INFO: Welcome to Uptime Kuma
2024-09-29T20:25:33Z [SERVER] INFO: Node Env: production
2024-09-29T20:25:33Z [SERVER] INFO: Inside Container: false
2024-09-29T20:25:33Z [SERVER] INFO: Importing Node libraries
2024-09-29T20:25:33Z [SERVER] INFO: Importing 3rd-party libraries
2024-09-29T20:25:34Z [SERVER] INFO: Creating express and socket.io instance
2024-09-29T20:25:34Z [SERVER] INFO: Server Type: HTTP
2024-09-29T20:25:34Z [SERVER] INFO: Importing this project modules
2024-09-29T20:25:34Z [NOTIFICATION] INFO: Prepare Notification Providers
2024-09-29T20:25:34Z [SERVER] INFO: Version: 1.23.13
2024-09-29T20:25:34Z [DB] INFO: Data Dir: ./data/
2024-09-29T20:25:34Z [SERVER] INFO: Connecting to the Database
2024-09-29T20:25:35Z [DB] INFO: SQLite config:
[ { journal_mode: 'wal' } ]
[ { cache_size: -12000 } ]
2024-09-29T20:25:35Z [DB] INFO: SQLite Version: 3.41.1
2024-09-29T20:25:35Z [SERVER] INFO: Connected
2024-09-29T20:25:35Z [DB] INFO: Your database version: 10
2024-09-29T20:25:35Z [DB] INFO: Latest database version: 10
2024-09-29T20:25:35Z [DB] INFO: Database patch not needed
2024-09-29T20:25:35Z [DB] INFO: Database Patch 2.0 Process
2024-09-29T20:25:35Z [SERVER] INFO: Load JWT secret from database.
2024-09-29T15:25:35-05:00 [SERVER] INFO: Adding route
2024-09-29T15:25:35-05:00 [SERVER] INFO: Adding socket handler
2024-09-29T15:25:35-05:00 [SERVER] INFO: Init the server
2024-09-29T15:25:35-05:00 [SERVER] INFO: Listening on 3001

😓 Actual Behavior

These are the logs I get when trying to run 1.23.14:

==> Performing startup jobs and maintenance tasks
==> Starting application with user 0 group 0
Welcome to Uptime Kuma
Your Node.js version: 16.13.1
2024-09-29T20:22:09Z [SERVER] INFO: Welcome to Uptime Kuma
2024-09-29T20:22:09Z [SERVER] INFO: Node Env: production
2024-09-29T20:22:09Z [SERVER] INFO: Inside Container: false
2024-09-29T20:22:09Z [SERVER] INFO: Importing Node libraries
2024-09-29T20:22:09Z [SERVER] INFO: Importing 3rd-party libraries
2024-09-29T20:22:10Z [SERVER] INFO: Creating express and socket.io instance
2024-09-29T20:22:10Z [SERVER] INFO: Server Type: HTTP
2024-09-29T20:22:10Z [SERVER] INFO: Importing this project modules
2024-09-29T20:22:10Z [NOTIFICATION] INFO: Prepare Notification Providers
2024-09-29T20:22:10Z [SERVER] INFO: Version: 1.23.14
/app/node_modules/cheerio/node_modules/undici/lib/web/fetch/response.js:527
  ReadableStream
  ^

ReferenceError: ReadableStream is not defined
    at Object.<anonymous> (/app/node_modules/cheerio/node_modules/undici/lib/web/fetch/response.js:527:3)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/app/node_modules/cheerio/node_modules/undici/lib/web/fetch/index.js:11:5)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)

🐻 Uptime-Kuma Version

1.23.14

💻 Operating System and Arch

Debain 12.7 x86_64

🌐 Browser

Firefox 128.0

🖥️ Deployment Environment

📝 Relevant log output

No response

louislam commented 5 hours ago

It should be fixed, please try to pull the image again.

Btw, the Alpine image is deprecated, switching to Debian is recommended.

GavinL2001 commented 4 hours ago

Noted, thanks for relaying the info about the alpine image!