Unable to view all places #2718

Closed
opened 2026-02-05 06:52:46 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @crazytil on GitHub (Mar 31, 2024).

The bug

When clicking view all under the places section getting error 500:

Failed to get assets by city - 500
Error: Error: 500
    at Object.ie [as ok] (https://**redacted**/_app/immutable/chunks/fetch-client.DbGu7UYN.js:1:2832)
    at async re (https://**redacted**/_app/immutable/nodes/23.CF3jLVVG.js:1:789)
    at async Ie (https://**redacted**/_app/immutable/chunks/entry.gs5-sG3j.js:1:13443)

This is the log output of container:

immich_postgres       | 2024-03-31 11:11:31.631 UTC [628] ERROR:  malformed array literal: "$1" at character 149
immich_postgres       | 2024-03-31 11:11:31.631 UTC [628] DETAIL:  Array value must start with "{" or dimension information.
immich_postgres       | 2024-03-31 11:11:31.631 UTC [628] STATEMENT:  
immich_postgres       |         WITH RECURSIVE cte AS (
immich_postgres       |           (
immich_postgres       |             SELECT city, "assetId"
immich_postgres       |             FROM exif
immich_postgres       |             INNER JOIN assets ON exif."assetId" = assets.id
immich_postgres       |             WHERE "ownerId" = ANY('$1'::uuid[]) AND "isVisible" = $2 AND "isArchived" = $3 AND type = $4
immich_postgres       |             ORDER BY city
immich_postgres       |             LIMIT 1
immich_postgres       |           )
immich_postgres       | 
immich_postgres       |           UNION ALL
immich_postgres       | 
immich_postgres       |           SELECT l.city, l."assetId"
immich_postgres       |           FROM cte c
immich_postgres       |             , LATERAL (
immich_postgres       |             SELECT city, "assetId"
immich_postgres       |             FROM exif
immich_postgres       |             INNER JOIN assets ON exif."assetId" = assets.id
immich_postgres       |             WHERE city > c.city AND "ownerId" = ANY('$1'::uuid[]) AND "isVisible" = $2 AND "isArchived" = $3 AND type = $4
immich_postgres       |             ORDER BY city
immich_postgres       |             LIMIT 1
immich_postgres       |             ) l
immich_postgres       |         )
immich_postgres       |         SELECT "asset"."id" AS "asset_id", "asset"."deviceAssetId" AS "asset_deviceAssetId", "asset"."ownerId" AS "asset_ownerId", "asset"."libraryId" AS "asset_libraryId", "asset"."deviceId" AS "asset_deviceId", "asset"."type" AS "asset_type", "asset"."originalPath" AS "asset_originalPath", "asset"."resizePath" AS "asset_resizePath", "asset"."webpPath" AS "asset_webpPath", "asset"."thumbhash" AS "asset_thumbhash", "asset"."encodedVideoPath" AS "asset_encodedVideoPath", "asset"."createdAt" AS "asset_createdAt", "asset"."updatedAt" AS "asset_updatedAt", "asset"."deletedAt" AS "asset_deletedAt", "asset"."fileCreatedAt" AS "asset_fileCreatedAt", "asset"."localDateTime" AS "asset_localDateTime", "asset"."fileModifiedAt" AS "asset_fileModifiedAt", "asset"."isFavorite" AS "asset_isFavorite", "asset"."isArchived" AS "asset_isArchived", "asset"."isExternal" AS "asset_isExternal", "asset"."isReadOnly" AS "asset_isReadOnly", "asset"."isOffline" AS "asset_isOffline", "asset"."checksum" AS "asset_checksum", "asset"."duration" AS "asset_duration", "asset"."isVisible" AS "asset_isVisible", "asset"."livePhotoVideoId" AS "asset_livePhotoVideoId", "asset"."originalFileName" AS "asset_originalFileName", "asset"."sidecarPath" AS "asset_sidecarPath", "asset"."stackId" AS "asset_stackId", "exif"."assetId" AS "exif_assetId", "exif"."description" AS "exif_description", "exif"."exifImageWidth" AS "exif_exifImageWidth", "exif"."exifImageHeight" AS "exif_exifImageHeight", "exif"."fileSizeInByte" AS "exif_fileSizeInByte", "exif"."orientation" AS "exif_orientation", "exif"."dateTimeOriginal" AS "exif_dateTimeOriginal", "exif"."modifyDate" AS "exif_modifyDate", "exif"."timeZone" AS "exif_timeZone", "exif"."latitude" AS "exif_latitude", "exif"."longitude" AS "exif_longitude", "exif"."projectionType" AS "exif_projectionType", "exif"."city" AS "exif_city", "exif"."livePhotoCID" AS "exif_livePhotoCID", "exif"."autoStackId" AS "exif_autoStackId", "exif"."state" AS "exif_state", "exif"."country" AS "exif_country", "exif"."make" AS "exif_make", "exif"."model" AS "exif_model", "exif"."lensModel" AS "exif_lensModel", "exif"."fNumber" AS "exif_fNumber", "exif"."focalLength" AS "exif_focalLength", "exif"."iso" AS "exif_iso", "exif"."exposureTime" AS "exif_exposureTime", "exif"."profileDescription" AS "exif_profileDescription", "exif"."colorspace" AS "exif_colorspace", "exif"."bitsPerSample" AS "exif_bitsPerSample", "exif"."fps" AS "exif_fps" FROM "assets" "asset" INNER JOIN "exif" "exif" ON "exif"."assetId"="asset"."id" INNER JOIN cte ON asset.id = cte."assetId"
immich_server         | [Nest] 7  - 03/31/2024, 11:11:31 AM   ERROR [QueryFailedError: malformed array literal: "$1"
immich_server         |     at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19)
immich_server         |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
immich_server         |     at async DataSource.query (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:350:20)
immich_server         |     at async SearchRepository.getAssetsByCity (/usr/src/app/dist/repositories/search.repository.js:169:24)
immich_server         |     at async SearchService.getAssetsByCity (/usr/src/app/dist/services/search.service.js:97:24)] Failed to get assets by city
immich_server         | [Nest] 7  - 03/31/2024, 11:11:31 AM   ERROR [QueryFailedError: malformed array literal: "$1"
immich_server         |     at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19)
immich_server         |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
immich_server         |     at async DataSource.query (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:350:20)
immich_server         |     at async SearchRepository.getAssetsByCity (/usr/src/app/dist/repositories/search.repository.js:169:24)
immich_server         |     at async SearchService.getAssetsByCity (/usr/src/app/dist/services/search.service.js:97:24)] QueryFailedError: malformed array literal: "$1"

The OS that Immich Server is running on

Ubuntu 23.10

Version of Immich Server

v1.100.0

Version of Immich Mobile App

1.100.0 build.146

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}
    command: [ "start.sh", "immich" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - ${EXTERNAL_PATH}:/usr/src/app/external
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.yml
    #   service: hwaccel
    command: [ "start.sh", "microservices" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - ${EXTERNAL_PATH}:/usr/src/app/external
    env_file:
      - .env
    depends_on:
      - redis
      - database
    restart: always

  redis:
    container_name: immich_redis
    image: registry.hub.docker.com/library/redis:6.2-alpine@sha256:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5
    restart: always

  database:
    container_name: immich_postgres
    image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

volumes:
  pgdata:
  model-cache:

Your .env content

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=/mnt/**redacted**/Media/Immich/Library

# 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=**redacted**

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

REDIS_HOSTNAME=immich_redis

EXTERNAL_PATH=/mnt/**redacted**/Media/Videos

Reproduction steps

Selected view all from places section in explore tab

Additional information

No response

Originally created by @crazytil on GitHub (Mar 31, 2024). ### The bug When clicking view all under the places section getting error 500: ``` Failed to get assets by city - 500 Error: Error: 500 at Object.ie [as ok] (https://**redacted**/_app/immutable/chunks/fetch-client.DbGu7UYN.js:1:2832) at async re (https://**redacted**/_app/immutable/nodes/23.CF3jLVVG.js:1:789) at async Ie (https://**redacted**/_app/immutable/chunks/entry.gs5-sG3j.js:1:13443) ``` This is the log output of container: ``` immich_postgres | 2024-03-31 11:11:31.631 UTC [628] ERROR: malformed array literal: "$1" at character 149 immich_postgres | 2024-03-31 11:11:31.631 UTC [628] DETAIL: Array value must start with "{" or dimension information. immich_postgres | 2024-03-31 11:11:31.631 UTC [628] STATEMENT: immich_postgres | WITH RECURSIVE cte AS ( immich_postgres | ( immich_postgres | SELECT city, "assetId" immich_postgres | FROM exif immich_postgres | INNER JOIN assets ON exif."assetId" = assets.id immich_postgres | WHERE "ownerId" = ANY('$1'::uuid[]) AND "isVisible" = $2 AND "isArchived" = $3 AND type = $4 immich_postgres | ORDER BY city immich_postgres | LIMIT 1 immich_postgres | ) immich_postgres | immich_postgres | UNION ALL immich_postgres | immich_postgres | SELECT l.city, l."assetId" immich_postgres | FROM cte c immich_postgres | , LATERAL ( immich_postgres | SELECT city, "assetId" immich_postgres | FROM exif immich_postgres | INNER JOIN assets ON exif."assetId" = assets.id immich_postgres | WHERE city > c.city AND "ownerId" = ANY('$1'::uuid[]) AND "isVisible" = $2 AND "isArchived" = $3 AND type = $4 immich_postgres | ORDER BY city immich_postgres | LIMIT 1 immich_postgres | ) l immich_postgres | ) immich_postgres | SELECT "asset"."id" AS "asset_id", "asset"."deviceAssetId" AS "asset_deviceAssetId", "asset"."ownerId" AS "asset_ownerId", "asset"."libraryId" AS "asset_libraryId", "asset"."deviceId" AS "asset_deviceId", "asset"."type" AS "asset_type", "asset"."originalPath" AS "asset_originalPath", "asset"."resizePath" AS "asset_resizePath", "asset"."webpPath" AS "asset_webpPath", "asset"."thumbhash" AS "asset_thumbhash", "asset"."encodedVideoPath" AS "asset_encodedVideoPath", "asset"."createdAt" AS "asset_createdAt", "asset"."updatedAt" AS "asset_updatedAt", "asset"."deletedAt" AS "asset_deletedAt", "asset"."fileCreatedAt" AS "asset_fileCreatedAt", "asset"."localDateTime" AS "asset_localDateTime", "asset"."fileModifiedAt" AS "asset_fileModifiedAt", "asset"."isFavorite" AS "asset_isFavorite", "asset"."isArchived" AS "asset_isArchived", "asset"."isExternal" AS "asset_isExternal", "asset"."isReadOnly" AS "asset_isReadOnly", "asset"."isOffline" AS "asset_isOffline", "asset"."checksum" AS "asset_checksum", "asset"."duration" AS "asset_duration", "asset"."isVisible" AS "asset_isVisible", "asset"."livePhotoVideoId" AS "asset_livePhotoVideoId", "asset"."originalFileName" AS "asset_originalFileName", "asset"."sidecarPath" AS "asset_sidecarPath", "asset"."stackId" AS "asset_stackId", "exif"."assetId" AS "exif_assetId", "exif"."description" AS "exif_description", "exif"."exifImageWidth" AS "exif_exifImageWidth", "exif"."exifImageHeight" AS "exif_exifImageHeight", "exif"."fileSizeInByte" AS "exif_fileSizeInByte", "exif"."orientation" AS "exif_orientation", "exif"."dateTimeOriginal" AS "exif_dateTimeOriginal", "exif"."modifyDate" AS "exif_modifyDate", "exif"."timeZone" AS "exif_timeZone", "exif"."latitude" AS "exif_latitude", "exif"."longitude" AS "exif_longitude", "exif"."projectionType" AS "exif_projectionType", "exif"."city" AS "exif_city", "exif"."livePhotoCID" AS "exif_livePhotoCID", "exif"."autoStackId" AS "exif_autoStackId", "exif"."state" AS "exif_state", "exif"."country" AS "exif_country", "exif"."make" AS "exif_make", "exif"."model" AS "exif_model", "exif"."lensModel" AS "exif_lensModel", "exif"."fNumber" AS "exif_fNumber", "exif"."focalLength" AS "exif_focalLength", "exif"."iso" AS "exif_iso", "exif"."exposureTime" AS "exif_exposureTime", "exif"."profileDescription" AS "exif_profileDescription", "exif"."colorspace" AS "exif_colorspace", "exif"."bitsPerSample" AS "exif_bitsPerSample", "exif"."fps" AS "exif_fps" FROM "assets" "asset" INNER JOIN "exif" "exif" ON "exif"."assetId"="asset"."id" INNER JOIN cte ON asset.id = cte."assetId" immich_server | [Nest] 7 - 03/31/2024, 11:11:31 AM ERROR [QueryFailedError: malformed array literal: "$1" immich_server | at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) immich_server | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) immich_server | at async DataSource.query (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:350:20) immich_server | at async SearchRepository.getAssetsByCity (/usr/src/app/dist/repositories/search.repository.js:169:24) immich_server | at async SearchService.getAssetsByCity (/usr/src/app/dist/services/search.service.js:97:24)] Failed to get assets by city immich_server | [Nest] 7 - 03/31/2024, 11:11:31 AM ERROR [QueryFailedError: malformed array literal: "$1" immich_server | at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) immich_server | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) immich_server | at async DataSource.query (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:350:20) immich_server | at async SearchRepository.getAssetsByCity (/usr/src/app/dist/repositories/search.repository.js:169:24) immich_server | at async SearchService.getAssetsByCity (/usr/src/app/dist/services/search.service.js:97:24)] QueryFailedError: malformed array literal: "$1" ``` ### The OS that Immich Server is running on Ubuntu 23.10 ### Version of Immich Server v1.100.0 ### Version of Immich Mobile App 1.100.0 build.146 ### Platform with the issue - [X] Server - [X] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML name: immich services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} command: [ "start.sh", "immich" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro - ${EXTERNAL_PATH}:/usr/src/app/external env_file: - .env ports: - 2283:3001 depends_on: - redis - database restart: always immich-microservices: container_name: immich_microservices image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} # extends: # file: hwaccel.yml # service: hwaccel command: [ "start.sh", "microservices" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro - ${EXTERNAL_PATH}:/usr/src/app/external env_file: - .env depends_on: - redis - database restart: always redis: container_name: immich_redis image: registry.hub.docker.com/library/redis:6.2-alpine@sha256:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5 restart: always database: container_name: immich_postgres image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0 environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} volumes: - pgdata:/var/lib/postgresql/data restart: always volumes: pgdata: model-cache: ``` ### Your .env content ```Shell # You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables # The location where your uploaded files are stored UPLOAD_LOCATION=/mnt/**redacted**/Media/Immich/Library # 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=**redacted** # The values below this line do not need to be changed ################################################################################### DB_HOSTNAME=immich_postgres DB_USERNAME=postgres DB_DATABASE_NAME=immich REDIS_HOSTNAME=immich_redis EXTERNAL_PATH=/mnt/**redacted**/Media/Videos ``` ### Reproduction steps ```bash Selected view all from places section in explore tab ``` ### Additional information _No response_
Author
Owner

@bo0tzz commented on GitHub (Mar 31, 2024):

Already fixed for the next release

@bo0tzz commented on GitHub (Mar 31, 2024): Already fixed for the next release
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#2718