[BUG] Converting circular structure to JSON #157

Closed
opened 2026-02-04 18:16:01 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @leon1995 on GitHub (Jul 28, 2022).

Describe the bug
After starting a clean server on my macos machine with docker, I get the following output on http://localhost:2283/

500

Converting circular structure to JSON
    --> starting at object with constructor 'Socket'
    |     property '_httpMessage' -> object with constructor 'ClientRequest'
    --- property 'socket' closes the circle

TypeError: Converting circular structure to JSON
    --> starting at object with constructor 'Socket'
    |     property '_httpMessage' -> object with constructor 'ClientRequest'
    --- property 'socket' closes the circle


Task List

Please complete the task list below. We need this information to help us reproduce the bug or point out problems in your setup. You are not providing enough info may delay our effort to help you.

  • I have read thoroughly the README setup and installation instructions.
  • I have included my docker-compose file. (made no changes)
  • I have included my redacted .env file. (only change is to UPLOAD_LOCATION=full path to storage
  • I have included information on my machine, and environment.

To Reproduce
Steps to reproduce the behavior:

  1. install new server
  2. start new server
Originally created by @leon1995 on GitHub (Jul 28, 2022). <!-- Note: Please search to see if an issue already exists for the bug you encountered. --> **Describe the bug** After starting a clean server on my macos machine with docker, I get the following output on `http://localhost:2283/` ``` 500 Converting circular structure to JSON --> starting at object with constructor 'Socket' | property '_httpMessage' -> object with constructor 'ClientRequest' --- property 'socket' closes the circle TypeError: Converting circular structure to JSON --> starting at object with constructor 'Socket' | property '_httpMessage' -> object with constructor 'ClientRequest' --- property 'socket' closes the circle ``` **Task List** *Please complete the task list below. We need this information to help us reproduce the bug or point out problems in your setup. You are not providing enough info may delay our effort to help you.* - [x] I have read thoroughly the README setup and installation instructions. - [ ] I have included my `docker-compose` file. (made no changes) - [ ] I have included my redacted `.env` file. (only change is to `UPLOAD_LOCATION=full path to storage` - [x] I have included information on my machine, and environment. **To Reproduce** Steps to reproduce the behavior: 1. install new server 2. start new server
Author
Owner

@alextran1502 commented on GitHub (Jul 28, 2022):

Please post your .env and docker-compose file

@alextran1502 commented on GitHub (Jul 28, 2022): Please post your .env and docker-compose file
Author
Owner

@leon1995 commented on GitHub (Jul 28, 2022):

.env

###################################################################################
# Database
###################################################################################

DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_DATABASE_NAME=immich

# Optional Database settings:
# DB_PORT=5432




###################################################################################
# Redis
###################################################################################

REDIS_HOSTNAME=immich_redis

# Optional Redis settings:
# REDIS_PORT=6379
# REDIS_DBINDEX=0
# REDIS_PASSWORD=
# REDIS_SOCKET=





###################################################################################
# Upload File Config
###################################################################################

UPLOAD_LOCATION=/Users/leon/Development/immich/docker/data




###################################################################################
# JWT SECRET
###################################################################################

JWT_SECRET=randomstringthatissolongandpowerfulthatnoonecanguess




###################################################################################
# MAPBOX
####################################################################################

# ENABLE_MAPBOX is either true of false -> if true, you have to provide MAPBOX_KEY
ENABLE_MAPBOX=false
MAPBOX_KEY=




###################################################################################
# WEB - Required
###################################################################################

# This is the URL of your vm/server where you host Immich, so that the web frontend
# know where can it make the request to.
# For example: If your server IP address is 10.1.11.50, the environment variable will
# be VITE_SERVER_ENDPOINT=http://10.1.11.50:2283/api
# !CAUTION! THERE IS NO FORWARD SLASH AT THE END

VITE_SERVER_ENDPOINT=


####################################################################################
# WEB - Optional
####################################################################################

# Custom message on the login page, should be written in HTML form.
# For example VITE_LOGIN_PAGE_MESSAGE="This is a demo instance of Immich.<br><br>Email: <i>demo@demo.de</i><br>Password: <i>demo</i>"

VITE_LOGIN_PAGE_MESSAGE=

docker-compose.yml

version: "3.8"

services:
  immich-server:
    image: altran1502/immich-server:release
    entrypoint: ["/bin/sh", "./start-server.sh"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    environment:
      - NODE_ENV=production
    depends_on:
      - redis
      - database
    restart: always

  immich-microservices:
    image: altran1502/immich-server:release
    entrypoint: ["/bin/sh", "./start-microservices.sh"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    environment:
      - NODE_ENV=production
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    image: altran1502/immich-machine-learning:release
    entrypoint: ["/bin/sh", "./entrypoint.sh"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - .env
    environment:
      - NODE_ENV=production
    depends_on:
      - database
    restart: always

  immich-web:
    image: altran1502/immich-web:release
    entrypoint: ["/bin/sh", "./entrypoint.sh"]
    env_file:
      - .env
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2
    restart: always

  database:
    container_name: immich_postgres
    image: postgres:14
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      PG_DATA: /var/lib/postgresql/data
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

  immich-proxy:
    container_name: immich_proxy
    image: altran1502/immich-proxy:release
    ports:
      - 2283:80
    logging:
      driver: none
    depends_on:
      - immich-server
    restart: always

volumes:
  pgdata:
@leon1995 commented on GitHub (Jul 28, 2022): `.env` ``` ################################################################################### # Database ################################################################################### DB_HOSTNAME=immich_postgres DB_USERNAME=postgres DB_PASSWORD=postgres DB_DATABASE_NAME=immich # Optional Database settings: # DB_PORT=5432 ################################################################################### # Redis ################################################################################### REDIS_HOSTNAME=immich_redis # Optional Redis settings: # REDIS_PORT=6379 # REDIS_DBINDEX=0 # REDIS_PASSWORD= # REDIS_SOCKET= ################################################################################### # Upload File Config ################################################################################### UPLOAD_LOCATION=/Users/leon/Development/immich/docker/data ################################################################################### # JWT SECRET ################################################################################### JWT_SECRET=randomstringthatissolongandpowerfulthatnoonecanguess ################################################################################### # MAPBOX #################################################################################### # ENABLE_MAPBOX is either true of false -> if true, you have to provide MAPBOX_KEY ENABLE_MAPBOX=false MAPBOX_KEY= ################################################################################### # WEB - Required ################################################################################### # This is the URL of your vm/server where you host Immich, so that the web frontend # know where can it make the request to. # For example: If your server IP address is 10.1.11.50, the environment variable will # be VITE_SERVER_ENDPOINT=http://10.1.11.50:2283/api # !CAUTION! THERE IS NO FORWARD SLASH AT THE END VITE_SERVER_ENDPOINT= #################################################################################### # WEB - Optional #################################################################################### # Custom message on the login page, should be written in HTML form. # For example VITE_LOGIN_PAGE_MESSAGE="This is a demo instance of Immich.<br><br>Email: <i>demo@demo.de</i><br>Password: <i>demo</i>" VITE_LOGIN_PAGE_MESSAGE= ``` `docker-compose.yml` ``` version: "3.8" services: immich-server: image: altran1502/immich-server:release entrypoint: ["/bin/sh", "./start-server.sh"] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env environment: - NODE_ENV=production depends_on: - redis - database restart: always immich-microservices: image: altran1502/immich-server:release entrypoint: ["/bin/sh", "./start-microservices.sh"] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env environment: - NODE_ENV=production depends_on: - redis - database restart: always immich-machine-learning: image: altran1502/immich-machine-learning:release entrypoint: ["/bin/sh", "./entrypoint.sh"] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload env_file: - .env environment: - NODE_ENV=production depends_on: - database restart: always immich-web: image: altran1502/immich-web:release entrypoint: ["/bin/sh", "./entrypoint.sh"] env_file: - .env restart: always redis: container_name: immich_redis image: redis:6.2 restart: always database: container_name: immich_postgres image: postgres:14 env_file: - .env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} PG_DATA: /var/lib/postgresql/data volumes: - pgdata:/var/lib/postgresql/data restart: always immich-proxy: container_name: immich_proxy image: altran1502/immich-proxy:release ports: - 2283:80 logging: driver: none depends_on: - immich-server restart: always volumes: pgdata: ```
Author
Owner

@alextran1502 commented on GitHub (Jul 28, 2022):

Please populate the VITE_SERVER_ENDPOINT as instructed

@alextran1502 commented on GitHub (Jul 28, 2022): Please populate the VITE_SERVER_ENDPOINT as instructed
Author
Owner

@alextran1502 commented on GitHub (Jul 28, 2022):

I believe in your case you can either put http://localhost:2283/api or http://<your-mac-ip>:2283/api to the key. Please also restart all of the containers to register the change.

@alextran1502 commented on GitHub (Jul 28, 2022): I believe in your case you can either put `http://localhost:2283/api` or `http://<your-mac-ip>:2283/api` to the key. Please also restart all of the containers to register the change.
Author
Owner

@leon1995 commented on GitHub (Jul 28, 2022):

I changed to VITE_SERVER_ENDPOINT=http://<my-ip>:2283/api. Then I visit localhost:2283 and the page loads but then instantly get an error

500

Network Error
@leon1995 commented on GitHub (Jul 28, 2022): I changed to `VITE_SERVER_ENDPOINT=http://<my-ip>:2283/api`. Then I visit `localhost:2283` and the page loads but then instantly get an error ``` 500 Network Error ```
Author
Owner

@leon1995 commented on GitHub (Jul 28, 2022):

but it works on http://<my-ip>:2283

@leon1995 commented on GitHub (Jul 28, 2022): but it works on `http://<my-ip>:2283`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#157