Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hedgedoc docker container dies with uncaughtException: Cannot read properties of undefined (reading 'userid') #5449

Open
moepman opened this issue Feb 1, 2024 · 0 comments
Labels
type: bug Something isn't working

Comments

@moepman
Copy link

moepman commented Feb 1, 2024

Description

Sometimes the hedgedoc docker container dies.

Steps to reproduce

I have not been able to reproduce the bug myself, as this never happend when I used the hedgedoc instance.
I hope that the lines indicated in the backtrace are helpful enough.

Expected behaviour

The error not happening and therefore the docker container not dying.

Logs

Note: The first line repeats many times.

Jan 31 20:25:11 fluorine docker-compose[847815]: app_1       | 2024-01-31T19:25:11.599Z info:         deserializeUser: a76bb187-8078-4508-aa35-e7ca812e0546
Jan 31 20:25:20 fluorine docker-compose[847815]: app_1       | 2024-01-31T19:25:20.159Z error:         uncaughtException: Cannot read properties of undefined (reading 'userid')
Jan 31 20:25:20 fluorine docker-compose[847815]: app_1       | TypeError: Cannot read properties of undefined (reading 'userid')
Jan 31 20:25:20 fluorine docker-compose[847815]: app_1       |     at finishConnection (/hedgedoc/lib/realtime.js:389:25)
Jan 31 20:25:20 fluorine docker-compose[847815]: app_1       |     at startConnection (/hedgedoc/lib/realtime.js:510:12)
Jan 31 20:25:20 fluorine docker-compose[847815]: app_1       |     at Timeout._onTimeout (/hedgedoc/lib/realtime.js:361:7)
Jan 31 20:25:20 fluorine docker-compose[847815]: app_1       |     at listOnTimeout (node:internal/timers:573:17)
Jan 31 20:25:20 fluorine docker-compose[847815]: app_1       |     at process.processTimers (node:internal/timers:514:7)
Jan 31 20:25:20 fluorine docker-compose[847815]: app_1       | 2024-01-31T19:25:20.160Z error:         An uncaught exception has occured.
Jan 31 20:25:20 fluorine docker-compose[847815]: app_1       | 2024-01-31T19:25:20.160Z error:         Cannot read properties of undefined (reading 'userid')
Jan 31 20:25:20 fluorine docker-compose[847815]: app_1       | 2024-01-31T19:25:20.160Z error:         Process will exit now.

Config

version: "3"
services:
  database:
    image: postgres:13-alpine
    environment:
      - POSTGRES_USER={{ hedgedoc_dbuser }}
      - POSTGRES_PASSWORD={{ hedgedoc_dbpass }}
      - POSTGRES_DB={{ hedgedoc_dbname }}
    volumes:
      - ./database:/var/lib/postgresql/data
  app:
    image: quay.io/hedgedoc/hedgedoc:1.9.9
    environment:
      - CMD_DOMAIN={{ hedgedoc_domain }}
      - CMD_PROTOCOL_USESSL=true
      - CMD_ALLOW_ANONYMOUS=false
      - CMD_ALLOW_ANONYMOUS_EDITS=true
      - CMD_ALLOW_FREEURL=true
      - CMD_SESSION_SECRET={{ hedgedoc_secret }}
      - CMD_HSTS_ENABLE=true
      - CMD_HSTS_MAX_AGE=2592000
      - CMD_HSTS_INCLUDE_SUBDOMAINS=true
      - CMD_HSTS_PRELOAD=true
      - CMD_CSP_ENABLE=true
      - CMD_DB_URL=postgres://{{ hedgedoc_dbuser }}:{{ hedgedoc_dbpass }}@database/{{ hedgedoc_dbname }}
      - CMD_LDAP_URL={{ ldap_uri }}
      - CMD_LDAP_BINDDN={{ ldap_binddn }}
      - CMD_LDAP_BINDCREDENTIALS={{ ldap_bindpw }}
      - CMD_LDAP_SEARCHBASE={{ ldap_base }}
      - CMD_LDAP_SEARCHFILTER=(uid={{ '{{' }}username{{ '}}' }})
      - CMD_LDAP_SEARCHATTRIBUTES=cn,uid
      - CMD_LDAP_USERIDFIELD=uid
      - CMD_LDAP_USERNAMEFIELD=cn
      - CMD_LDAP_TLS_CA=/etc/ssl/certs/ca-certificates.crt
      - CMD_EMAIL=false
    volumes:
      - /etc/hosts:/etc/hosts:ro
      - /etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt:ro
      - ./uploads:/hedgedoc/public/uploads
    ports:
      - "127.0.0.1:3000:3000"
    depends_on:
      - database

Your Setup

The hedgedoc instance is running as a Dockerized Setup on Debian 12. See the config section for the docker-compose from my ansible Setup. The container is behind an nginx reverse proxy.

Additional context

No response

@moepman moepman added the type: bug Something isn't working label Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant