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

500 error on trying to use Gmail to send email notifications via SMTP #15154

Closed
1 of 3 tasks
1oh1 opened this issue Jan 8, 2025 · 1 comment · Fixed by #15157
Closed
1 of 3 tasks

500 error on trying to use Gmail to send email notifications via SMTP #15154

1oh1 opened this issue Jan 8, 2025 · 1 comment · Fixed by #15157

Comments

@1oh1
Copy link

1oh1 commented Jan 8, 2025

The bug

My SMTP config in Immich:

Host: smtp.gmail.com
Port: 465 (tried 587 as well)
Username: [email protected]
Password: google-app-password
Ignore certificate errors: Unchecked
From address: Immich <[email protected]>

Environment: Proxmox 8.3.2 (LXC container running Dockge)

Error logs from immich server when hitting Send test email and save button

root@dockge:~# docker logs immich_server  -f
...
...
[Nest] 17  - 01/07/2025, 11:43:45 PM   ERROR [Api:ErrorInterceptor~2815krld] Unknown error: TypeError: Cannot read properties of undefined (reading 'languages')
TypeError: Cannot read properties of undefined (reading 'languages')
    at /usr/src/app/node_modules/@react-email/render/node_modules/prettier/standalone.js:24:694
    at Array.flatMap (<anonymous>)
    at it (/usr/src/app/node_modules/@react-email/render/node_modules/prettier/standalone.js:24:681)
    at Ai (/usr/src/app/node_modules/@react-email/render/node_modules/prettier/standalone.js:27:12039)
    at rr (/usr/src/app/node_modules/@react-email/render/node_modules/prettier/standalone.js:33:273)
    at /usr/src/app/node_modules/@react-email/render/node_modules/prettier/standalone.js:35:802
    at gu (/usr/src/app/node_modules/@react-email/render/node_modules/prettier/standalone.js:35:871)
    at pretty (/usr/src/app/node_modules/@react-email/render/dist/node/index.js:87:39)
    at /usr/src/app/node_modules/@react-email/render/dist/node/index.js:163:12
    at Generator.next (<anonymous>)

The OS that Immich Server is running on

Debian GNU/Linux 12 (bookworm)

Version of Immich Server

v1.124.0

Version of Immich Mobile App

v1.123.0 build.172

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

name: immich
services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    cap_add:
      - CAP_PERFMON
    devices:
      - /dev/dri/:/dev/dri/
    volumes:
      # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /mnt/smbserver/Immich-media/:/mnt/smbserver/Immich-media:ro
      - /mnt/smbserver/PhotoPrism_Originals:/mnt/smbserver/PhotoPrism:ro
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - 2283:2283
    depends_on:
      - redis
      - database
    restart: always
    healthcheck:
      disable: false
  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
    #   file: hwaccel.ml.yml
    #   service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always
    healthcheck:
      disable: false
  redis:
    container_name: immich_redis
    image: docker.io/redis:6.2-alpine@sha256:eaba718fecd1196d88533de7ba49bf903ad33664a92debb24660a922ecd9cac8
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always
  database:
    container_name: immich_postgres
    image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: --data-checksums
    volumes:
      # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    healthcheck:
      test: pg_isready --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' ||
        exit 1; Chksum="$$(psql --dbname='${DB_DATABASE_NAME}'
        --username='${DB_USERNAME}' --tuples-only --no-align --command='SELECT
        COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo
        "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1
      interval: 5m
      start_interval: 30s
      start_period: 5m
    command:
      - postgres
      - -c 
      - shared_preload_libraries=vectors.so
      - -c
      - search_path="$$user", public, vectors
      - -c
      - logging_collector=on
      - -c
      - max_wal_size=2GB
      - -c
      - shared_buffers=512MB
      - -c
      - wal_compression=on
    restart: always
volumes:
  model-cache: null
networks: {}

Your .env content

UPLOAD_LOCATION=./library
# The location where your database files are stored
DB_DATA_LOCATION=./postgres

# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
# TZ=Etc/UTC

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secret for postgres. You should change it to a random password
DB_PASSWORD=postgres

# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

Reproduction steps

  1. Log in to Immich
  2. Navigate to https://immich/admin/system-settings
  3. Expand Notification Settings > Email and check Enable email notifications
  4. Fill out the form with Gmail SMTP settings as desribed above and press Send test email and save

image
6. Check 'Network' tab in Chrome Developer Tools to see:

{
    "message": "Failed to send test email",
    "error": "Internal Server Error",
    "statusCode": 500,
    "correlationId": "9exfl99w"
}
  1. Check Docker logs for immich-server with docker logs immich_server -f
[Nest] 16  - 01/08/2025, 12:01:02 AM   ERROR [Api:ErrorInterceptor~cwmqpafz] Unknown error: TypeError: Cannot read properties of undefined (reading 'languages')
TypeError: Cannot read properties of undefined (reading 'languages')
    at /usr/src/app/node_modules/@react-email/render/node_modules/prettier/standalone.js:24:694
    at Array.flatMap (<anonymous>)
    at it (/usr/src/app/node_modules/@react-email/render/node_modules/prettier/standalone.js:24:681)
    at Ai (/usr/src/app/node_modules/@react-email/render/node_modules/prettier/standalone.js:27:12039)
    at rr (/usr/src/app/node_modules/@react-email/render/node_modules/prettier/standalone.js:33:273)
    at /usr/src/app/node_modules/@react-email/render/node_modules/prettier/standalone.js:35:802
    at gu (/usr/src/app/node_modules/@react-email/render/node_modules/prettier/standalone.js:35:871)
    at pretty (/usr/src/app/node_modules/@react-email/render/dist/node/index.js:87:39)
    at /usr/src/app/node_modules/@react-email/render/dist/node/index.js:163:12
    at Generator.next (<anonymous>)

Relevant log output

No response

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant