Error when uploading Images in hedgedoc

I have been using hedgedoc for a few years now, but only sporadically. So far everything has worked fine.
Today I noticed when uploading images that this no longer works. Also, images that have already been inserted are no longer displayed.

The following error is displayed in the log file:

2025-02-21T17:46:37.694Z error:         uncaughtException: The "windows-1252" encoding is not supported
RangeError [ERR_ENCODING_NOT_SUPPORTED]: The "windows-1252" encoding is not supported
    at #prepareConverter (node:internal/encoding:433:15)
    at new TextDecoder (node:internal/encoding:425:31)
    at new StringType (file:///app/hedgedoc/node_modules/token-types/lib/index.js:386:28)
    at readChunkHeader (file:///app/hedgedoc/node_modules/file-type/core.js:1173:38)
    at async Object.detectConfident [as detect] (file:///app/hedgedoc/node_modules/file-type/core.js:1178:19)
    at async FileTypeParser.fromTokenizer (file:///app/hedgedoc/node_modules/file-type/core.js:195:21)
    at async FileTypeParser.fromFile (file:///app/hedgedoc/node_modules/file-type/index.js:23:11)
    at async checkUploadType (/app/hedgedoc/lib/web/imageRouter/index.js:21:23)
    at async /app/hedgedoc/lib/web/imageRouter/index.js:92:18
2025-02-21T17:46:37.695Z error:         An uncaught exception has occured.
2025-02-21T17:46:37.695Z error:         The "windows-1252" encoding is not supported
2025-02-21T17:46:37.695Z error:         Process will exit now.
(node:256) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
2025-02-21T17:46:39.081Z info:  All migrations performed successfully
2025-02-21T17:46:39.409Z info:  HTTP Server listening at 0.0.0.0:3000
2025-02-21T17:46:39.813Z info:  127.0.0.1 - - [21/Feb/2025:17:46:39 +0000] "GET /_health HTTP/1.1" 200 14 "-" "curl/8.12.0"

2025-02-21T17:46:40.091Z info:  deserializeUser: ebf50073-391a-4773-9a85-af51226f9405

Any idea what the problem could be?

Hi, we support the container, not the application. If you think this is a container issue, please share your container logs and docker run or compose. If you think it’s an application issue (looks like your encoding type isn’t supported) I suggest reaching out to the hedgedoc folks and/or reading their documentation.

Here my docker-compose setup

services:
  hedgedoc:
    image: lscr.io/linuxserver/hedgedoc:latest
    container_name: hedgedoc
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
      - DB_HOST=mariadb
      - DB_PORT=3306
      - DB_USER=<my_db_user>
      - DB_PASS=<my_db_password>
      - DB_NAME=hedgedoc
      - CMD_DOMAIN=192.168.200.10
      - CMD_URL_ADDPORT=true
      - CMD_PROTOCOL_USESSL=false
      - CMD_PORT=3000
      - CMD_ALLOW_ORIGIN=['localhost']
      - CMD_SESSION_SECRET=<my_session_secret>
      - CMD_DOCUMENT_MAX_LENGTH=200000
      - CMD_ALLOW_ANONYMOUS=false
      - CMD_DEFAULT_PERMISSION=private
    volumes:
      - /docker_app_data/hedgedoc/config:/config
    networks: 
      - mariadb_default
    ports:
      - 3000:3000
    restart: unless-stopped

networks:
  mariadb_default:
    external: true

The log is the output of the docker log (docker logs -f hedgedoc)!

As i stated, i need the logs, starting with our ascii logo

here the complete log:

hedgedoc  | [migrations] started
hedgedoc  | [migrations] no migrations found
hedgedoc  | ───────────────────────────────────────
hedgedoc  | 
hedgedoc  |       ██╗     ███████╗██╗ ██████╗
hedgedoc  |       ██║     ██╔════╝██║██╔═══██╗
hedgedoc  |       ██║     ███████╗██║██║   ██║
hedgedoc  |       ██║     ╚════██║██║██║   ██║
hedgedoc  |       ███████╗███████║██║╚██████╔╝
hedgedoc  |       ╚══════╝╚══════╝╚═╝ ╚═════╝
hedgedoc  | 
hedgedoc  |    Brought to you by linuxserver.io
hedgedoc  | ───────────────────────────────────────
hedgedoc  | 
hedgedoc  | To support LSIO projects visit:
hedgedoc  | https://www.linuxserver.io/donate/
hedgedoc  | 
hedgedoc  | ───────────────────────────────────────
hedgedoc  | GID/UID
hedgedoc  | ───────────────────────────────────────
hedgedoc  | 
hedgedoc  | User UID:    1000
hedgedoc  | User GID:    1000
hedgedoc  | ───────────────────────────────────────
hedgedoc  | Linuxserver.io version: 1.10.2-ls157
hedgedoc  | Build-date: 2025-02-14T21:42:59+00:00
hedgedoc  | ───────────────────────────────────────
hedgedoc  |     
hedgedoc  | Waiting for DB to be available
hedgedoc  | [custom-init] No custom files found, skipping...
hedgedoc  | (node:153) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
hedgedoc  | (Use `node --trace-deprecation ...` to show where the warning was created)
hedgedoc  | 2025-02-21T17:36:06.215Z info: 	All migrations performed successfully
hedgedoc  | 2025-02-21T17:36:06.230Z info: 	HTTP Server listening at 0.0.0.0:3000
hedgedoc  | 2025-02-21T17:36:06.573Z info: 	127.0.0.1 - - [21/Feb/2025:17:36:06 +0000] "GET /_health HTTP/1.1" 200 14 "-" "curl/8.12.0"
hedgedoc  | 
hedgedoc  | [ls.io-init] done.
hedgedoc  | 2025-02-21T17:36:09.502Z info: 	deserializeUser: 95ecc800-2fd8-42f6-8860-dae79bff818e
hedgedoc  | 2025-02-21T17:36:14.555Z info: 	deserializeUser: 95ecc800-2fd8-42f6-8860-dae79bff818e
hedgedoc  | 2025-02-21T17:36:15.728Z info: 	192.168.200.21 - - [21/Feb/2025:17:36:15 +0000] "GET /yKuADfvAQJmI91iQvG3v3g?both HTTP/1.1" 200 - "http://192.168.200.10:3000/" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
hedgedoc  | 
hedgedoc  | 2025-02-21T17:44:12.564Z info: 	deserializeUser: ebf50073-391a-4773-9a85-af51226f9405
hedgedoc  | 2025-02-21T17:44:12.570Z info: 	192.168.200.21 - - [21/Feb/2025:17:44:12 +0000] "GET /me HTTP/1.1" 200 183 "http://192.168.200.10:3000/" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
hedgedoc  | 
hedgedoc  | 2025-02-21T17:44:14.454Z info: 	deserializeUser: ebf50073-391a-4773-9a85-af51226f9405
hedgedoc  | 2025-02-21T17:44:15.221Z info: 	deserializeUser: ebf50073-391a-4773-9a85-af51226f9405
hedgedoc  | 2025-02-21T17:44:15.275Z info: 	192.168.200.21 - - [21/Feb/2025:17:44:15 +0000] "GET /me HTTP/1.1" 304 - "http://192.168.200.10:3000/olXRxq-fTQuDSUqcV4QvNA" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
hedgedoc  | 
hedgedoc  | 2025-02-21T17:45:10.861Z info: 	deserializeUser: ebf50073-391a-4773-9a85-af51226f9405
hedgedoc  | 2025-02-21T17:45:11.193Z error: 	uncaughtException: The "windows-1252" encoding is not supported
hedgedoc  | RangeError [ERR_ENCODING_NOT_SUPPORTED]: The "windows-1252" encoding is not supported
hedgedoc  |     at #prepareConverter (node:internal/encoding:433:15)
hedgedoc  |     at new TextDecoder (node:internal/encoding:425:31)
hedgedoc  |     at new StringType (file:///app/hedgedoc/node_modules/token-types/lib/index.js:386:28)
hedgedoc  |     at readChunkHeader (file:///app/hedgedoc/node_modules/file-type/core.js:1173:38)
hedgedoc  |     at async Object.detectConfident [as detect] (file:///app/hedgedoc/node_modules/file-type/core.js:1178:19)
hedgedoc  |     at async FileTypeParser.fromTokenizer (file:///app/hedgedoc/node_modules/file-type/core.js:195:21)
hedgedoc  |     at async FileTypeParser.fromFile (file:///app/hedgedoc/node_modules/file-type/index.js:23:11)
hedgedoc  |     at async checkUploadType (/app/hedgedoc/lib/web/imageRouter/index.js:21:23)
hedgedoc  |     at async /app/hedgedoc/lib/web/imageRouter/index.js:92:18
hedgedoc  | 2025-02-21T17:45:11.193Z error: 	An uncaught exception has occured.
hedgedoc  | 2025-02-21T17:45:11.193Z error: 	The "windows-1252" encoding is not supported
hedgedoc  | 2025-02-21T17:45:11.193Z error: 	Process will exit now.
hedgedoc  | (node:216) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
hedgedoc  | (Use `node --trace-deprecation ...` to show where the warning was created)
hedgedoc  | 2025-02-21T17:45:13.030Z info: 	All migrations performed successfully
hedgedoc  | 2025-02-21T17:45:13.532Z info: 	HTTP Server listening at 0.0.0.0:3000
hedgedoc  | 2025-02-21T17:45:13.997Z info: 	deserializeUser: ebf50073-391a-4773-9a85-af51226f9405
hedgedoc  | 2025-02-21T17:45:14.340Z info: 	127.0.0.1 - - [21/Feb/2025:17:45:14 +0000] "GET /_health HTTP/1.1" 200 14 "-" "curl/8.12.0"
hedgedoc  | 
hedgedoc  | 2025-02-21T17:46:37.572Z info: 	deserializeUser: ebf50073-391a-4773-9a85-af51226f9405
hedgedoc  | 2025-02-21T17:46:37.694Z error: 	uncaughtException: The "windows-1252" encoding is not supported
hedgedoc  | RangeError [ERR_ENCODING_NOT_SUPPORTED]: The "windows-1252" encoding is not supported
hedgedoc  |     at #prepareConverter (node:internal/encoding:433:15)
hedgedoc  |     at new TextDecoder (node:internal/encoding:425:31)
hedgedoc  |     at new StringType (file:///app/hedgedoc/node_modules/token-types/lib/index.js:386:28)
hedgedoc  |     at readChunkHeader (file:///app/hedgedoc/node_modules/file-type/core.js:1173:38)
hedgedoc  |     at async Object.detectConfident [as detect] (file:///app/hedgedoc/node_modules/file-type/core.js:1178:19)
hedgedoc  |     at async FileTypeParser.fromTokenizer (file:///app/hedgedoc/node_modules/file-type/core.js:195:21)
hedgedoc  |     at async FileTypeParser.fromFile (file:///app/hedgedoc/node_modules/file-type/index.js:23:11)
hedgedoc  |     at async checkUploadType (/app/hedgedoc/lib/web/imageRouter/index.js:21:23)
hedgedoc  |     at async /app/hedgedoc/lib/web/imageRouter/index.js:92:18
hedgedoc  | 2025-02-21T17:46:37.695Z error: 	An uncaught exception has occured.
hedgedoc  | 2025-02-21T17:46:37.695Z error: 	The "windows-1252" encoding is not supported
hedgedoc  | 2025-02-21T17:46:37.695Z error: 	Process will exit now.
hedgedoc  | (node:256) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
hedgedoc  | (Use `node --trace-deprecation ...` to show where the warning was created)
hedgedoc  | 2025-02-21T17:46:39.081Z info: 	All migrations performed successfully
hedgedoc  | 2025-02-21T17:46:39.409Z info: 	HTTP Server listening at 0.0.0.0:3000
hedgedoc  | 2025-02-21T17:46:39.813Z info: 	127.0.0.1 - - [21/Feb/2025:17:46:39 +0000] "GET /_health HTTP/1.1" 200 14 "-" "curl/8.12.0"
hedgedoc  | 
hedgedoc  | 2025-02-21T17:46:40.091Z info: 	deserializeUser: ebf50073-391a-4773-9a85-af51226f9405
hedgedoc  | 2025-02-21T17:54:08.230Z info: 	deserializeUser: ebf50073-391a-4773-9a85-af51226f9405
hedgedoc  | 2025-02-21T17:54:08.591Z info: 	192.168.200.21 - - [21/Feb/2025:17:54:08 +0000] "GET / HTTP/1.1" 200 - "http://192.168.200.10:3000/olXRxq-fTQuDSUqcV4QvNA?edit" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
hedgedoc  | 
hedgedoc  | 2025-02-21T17:54:08.648Z info: 	deserializeUser: ebf50073-391a-4773-9a85-af51226f9405
hedgedoc  | 2025-02-21T17:54:08.658Z info: 	192.168.200.21 - - [21/Feb/2025:17:54:08 +0000] "GET /config HTTP/1.1" 304 - "http://192.168.200.10:3000/" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
hedgedoc  | 
hedgedoc  | 2025-02-21T17:54:08.687Z info: 	deserializeUser: ebf50073-391a-4773-9a85-af51226f9405
hedgedoc  | 2025-02-21T17:54:08.699Z info: 	192.168.200.21 - - [21/Feb/2025:17:54:08 +0000] "GET /me HTTP/1.1" 200 183 "http://192.168.200.10:3000/" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
hedgedoc  | 
hedgedoc  | 2025-02-21T17:54:08.715Z info: 	deserializeUser: ebf50073-391a-4773-9a85-af51226f9405
hedgedoc  | 2025-02-21T17:54:08.726Z info: 	192.168.200.21 - - [21/Feb/2025:17:54:08 +0000] "GET /history HTTP/1.1" 200 - "http://192.168.200.10:3000/" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
hedgedoc  | 
hedgedoc  | 2025-02-21T17:54:30.859Z info: 	deserializeUser: ebf50073-391a-4773-9a85-af51226f9405
hedgedoc  | 2025-02-21T17:54:32.248Z info: 	192.168.200.21 - - [21/Feb/2025:17:54:32 +0000] "GET /s/release-notes HTTP/1.1" 200 - "http://192.168.200.10:3000/" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
hedgedoc  | 
hedgedoc  | 2025-02-21T17:54:32.304Z info: 	192.168.200.21 - - [21/Feb/2025:17:54:32 +0000] "GET /build/pretty.0424d40e7df68caf04c5.css HTTP/1.1" 200 - "http://192.168.200.10:3000/s/release-notes" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
hedgedoc  | 
hedgedoc  | 2025-02-21T17:54:32.321Z info: 	192.168.200.21 - - [21/Feb/2025:17:54:32 +0000] "GET /build/pretty-styles-pack.2fb0d01138de2df6de0a.css HTTP/1.1" 200 - "http://192.168.200.10:3000/s/release-notes" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
hedgedoc  | 
hedgedoc  | 2025-02-21T17:54:32.339Z info: 	192.168.200.21 - - [21/Feb/2025:17:54:32 +0000] "GET /build/pretty-styles.8aa1888af7df52aee395.css HTTP/1.1" 200 - "http://192.168.200.10:3000/s/release-notes" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
hedgedoc  | 
hedgedoc  | 2025-02-21T17:54:32.433Z info: 	192.168.200.21 - - [21/Feb/2025:17:54:32 +0000] "GET /build/pretty-pack.4e7d834ecc2f92a5f4df.js HTTP/1.1" 200 - "http://192.168.200.10:3000/s/release-notes" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
hedgedoc  | 
hedgedoc  | 2025-02-21T17:54:32.484Z info: 	deserializeUser: ebf50073-391a-4773-9a85-af51226f9405
hedgedoc  | 2025-02-21T17:54:32.515Z info: 	192.168.200.21 - - [21/Feb/2025:17:54:32 +0000] "GET /config HTTP/1.1" 304 - "http://192.168.200.10:3000/s/release-notes" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
hedgedoc  | 
hedgedoc  | 2025-02-21T17:56:15.026Z info: 	deserializeUser: ebf50073-391a-4773-9a85-af51226f9405
hedgedoc  | 2025-02-21T17:56:15.209Z info: 	192.168.200.21 - - [21/Feb/2025:17:56:15 +0000] "GET /logout HTTP/1.1" 302 56 "http://192.168.200.10:3000/" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
hedgedoc  | 
hedgedoc  | 2025-02-21T17:56:15.302Z info: 	192.168.200.21 - - [21/Feb/2025:17:56:15 +0000] "GET / HTTP/1.1" 200 - "http://192.168.200.10:3000/" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
hedgedoc  | 
hedgedoc  | 2025-02-21T17:56:15.395Z info: 	192.168.200.21 - - [21/Feb/2025:17:56:15 +0000] "GET /config HTTP/1.1" 304 - "http://192.168.200.10:3000/" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
hedgedoc  | 
hedgedoc  | 2025-02-21T17:56:15.428Z info: 	192.168.200.21 - - [21/Feb/2025:17:56:15 +0000] "GET /me HTTP/1.1" 200 22 "http://192.168.200.10:3000/" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"
hedgedoc  | 

I used

services:
  hedgedoc:
    image: lscr.io/linuxserver/hedgedoc:latest
    container_name: hedgedoc
    environment:
      - PUID=1006
      - PGID=996
      - TZ=Etc/UTC
      - DB_HOST=db
      - DB_PORT=3306
      - DB_USER=hedgedoc
      - DB_PASS=hedgedoc
      - DB_NAME=hedgedoc
      - CMD_DOMAIN=192.168.128.9
      - CMD_PORT=3000
      - CMD_URL_ADDPORT=true
      - CMD_PROTOCOL_USESSL=false
      - CMD_ALLOW_ORIGIN=['localhost']
      - CMD_SESSION_SECRET=UhF1H2sE_r-XWS7quwQbaejt6Y7hVOrR
      - CMD_DOCUMENT_MAX_LENGTH=200000
      - CMD_ALLOW_ANONYMOUS=false
      - CMD_DEFAULT_PERMISSION=private
    volumes:
      - /tmp/hedgedoc/config:/config
    ports:
      - 3003:3000
    restart: unless-stopped
  mariadb2:
    image: lscr.io/linuxserver/mariadb:latest
    container_name: db
    environment:
      - PUID=1006
      - PGID=996
      - TZ=Etc/UTC
      - MYSQL_ROOT_PASSWORD=ROOT_ACCESS_PASSWORD
      - MYSQL_DATABASE=hedgedoc
      - MYSQL_USER=hedgedoc
      - MYSQL_PASSWORD=hedgedoc
    volumes:
      - /tmp/mariadb/config:/config
    restart: unless-stopped

and am unable to reproduce your encoding error; i would suggest seeking further guidance from hedgedoc