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

Change of date/time for local asset fails silently #11263

Closed
3 tasks done
backstab5983 opened this issue Jul 21, 2024 · 14 comments · Fixed by #11306
Closed
3 tasks done

Change of date/time for local asset fails silently #11263

backstab5983 opened this issue Jul 21, 2024 · 14 comments · Fixed by #11306
Labels

Comments

@backstab5983
Copy link

The bug

Trying to change the date/time of an asset via the WebUI fails silently. I don't see anything in the container logs - even with verbose option activated. All assets are uploaded to Immich - no external libraries.

The UI allows the update, but no sidecar .xmp is created, and the UI does not reflect the change either.

Also trying to changing from the app on iOS leads to the same outcome.

Changing the location works perfectly fine, this makes me think it's not a permission issue at all.

Example video of the bug:

immich-date-bug.mp4

The OS that Immich Server is running on

Ubuntu 22.04.4 LTS

Version of Immich Server

v1.109.2

Version of Immich Mobile App

v1.109.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

#
# WARNING: Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
#

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    devices:
      - /dev/dri:/dev/dri
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always
  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:
      - /data/dockerdata/immich/model-cache:/cache
    env_file:
      - .env
    restart: always
  redis:
    container_name: immich_redis
    image: docker.io/redis:6.2-alpine@sha256:328fe6a5822256d065debb36617a8169dbfbd77b797c525288e465f56c1d392b
    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:
      - ${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
networks: {}

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=/nfs/immich/library
# The location where your database files are stored
DB_DATA_LOCATION=/data/dockerdata/immich/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=Europe/Rome

# 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

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

Reproduction steps

1. Try to change date or time of an asset via WebUI or mobile app
2. No error output/no log output and no change in the date/time of the asset

Relevant log output

No response

Additional information

This has been reported in Discord by multiple users, relevant support tickets open here:
https://discord.com/channels/979116623879368755/1263448032893210716
https://discord.com/channels/979116623879368755/1264305376522801244
https://discord.com/channels/979116623879368755/1261312326544658432

@bo0tzz
Copy link
Member

bo0tzz commented Jul 21, 2024

Can you post the output of docker ps -a?

Does this happen for all files?

@backstab5983
Copy link
Author

Can you post the output of docker ps -a?

CONTAINER ID   IMAGE                                                COMMAND                  CREATED          STATUS                   PORTS                                                                                          NAMES
e334106b8719   ghcr.io/cross-seed/cross-seed:master                 "/usr/bin/catatonit …"   40 minutes ago   Up 40 minutes            0.0.0.0:2468->2468/tcp, :::2468->2468/tcp                                                      cross-seed
50e02a9dba71   ghcr.io/hotio/readarr                                "/init"                  41 minutes ago   Up 41 minutes            0.0.0.0:8787->8787/tcp, :::8787->8787/tcp                                                      readarr-audio
a5d91589e0a6   ghcr.io/immich-app/immich-machine-learning:release   "tini -- ./start.sh"     47 hours ago     Up 5 minutes (healthy)                                                                                                  immich_machine_learning
7cf5cc0bff4b   ghcr.io/immich-app/immich-server:release             "tini -- /bin/bash s…"   47 hours ago     Up 5 minutes (healthy)   0.0.0.0:2283->3001/tcp, :::2283->3001/tcp                                                      immich_server
72ffc00f2cf5   ghcr.io/wg-easy/wg-easy                              "docker-entrypoint.s…"   3 days ago       Up 3 days (healthy)      0.0.0.0:51820->51820/udp, :::51820->51820/udp, 0.0.0.0:51821->51821/tcp, :::51821->51821/tcp   wg-easy
f5e035562c20   mauricenino/dashdot                                  "docker-entrypoint.s…"   3 days ago       Up 3 days                0.0.0.0:80->3001/tcp, :::80->3001/tcp                                                          dashdot
f2b3f1ab3914   ghcr.io/hotio/sonarr                                 "/init"                  3 days ago       Up 3 days                0.0.0.0:8989->8989/tcp, :::8989->8989/tcp                                                      sonarr
a8f440c96083   ghcr.io/hotio/sonarr                                 "/init"                  3 days ago       Up 3 days                0.0.0.0:8990->8989/tcp, :::8990->8989/tcp                                                      sonarr-anime
4d3df84d41f8   ghcr.io/hotio/lidarr                                 "/init"                  6 days ago       Up 4 days                0.0.0.0:8686->8686/tcp, :::8686->8686/tcp                                                      lidarr
e900a9709d71   ghcr.io/recyclarr/recyclarr                          "/sbin/tini -- /entr…"   7 days ago       Up 4 days                                                                                                               recyclarr
7ac763404727   redis:6.2-alpine                                     "docker-entrypoint.s…"   8 days ago       Up 5 minutes (healthy)   6379/tcp                                                                                       immich_redis
e4c3798e4059   tensorchord/pgvecto-rs:pg14-v0.2.0                   "docker-entrypoint.s…"   8 days ago       Up 5 minutes (healthy)   5432/tcp                                                                                       immich_postgres
6d08a6664726   ghcr.io/hotio/plex                                   "/init"                  9 days ago       Up 4 days                                                                                                               plex
2d881454c6c7   ghcr.io/hotio/prowlarr                               "/init"                  2 weeks ago      Up 4 days                0.0.0.0:9696->9696/tcp, :::9696->9696/tcp                                                      prowlarr
8f6ffd6e4021   ghcr.io/hotio/qbittorrent                            "/init"                  3 weeks ago      Up 20 hours              0.0.0.0:8080->8080/tcp, :::8080->8080/tcp                                                      qbittorrent
414d5f0cd298   ghcr.io/flaresolverr/flaresolverr                    "/usr/bin/dumb-init …"   3 weeks ago      Up 4 days                0.0.0.0:8191->8191/tcp, :::8191->8191/tcp, 8192/tcp                                            flaresolverr
97e492d35281   ghcr.io/hotio/overseerr                              "/init"                  4 weeks ago      Up 4 days                0.0.0.0:5055->5055/tcp, :::5055->5055/tcp                                                      overseerr
b5f6d78d266d   ghcr.io/hotio/radarr                                 "/init"                  4 weeks ago      Up 4 days                0.0.0.0:7878->7878/tcp, :::7878->7878/tcp                                                      radarr
1d975f63befd   ghcr.io/hotio/bazarr                                 "/init"                  4 weeks ago      Up 4 days                0.0.0.0:6767->6767/tcp, :::6767->6767/tcp                                                      bazarr
9d9576fcbe8a   ghcr.io/hotio/autoscan                               "/init"                  4 weeks ago      Up 4 days                0.0.0.0:3030->3030/tcp, :::3030->3030/tcp                                                      autoscan
e5ff333ef2ba   ghcr.io/hotio/tautulli                               "/init"                  4 weeks ago      Up 4 days                0.0.0.0:8181->8181/tcp, :::8181->8181/tcp                                                      tautulli
dd25bab20809   fmartinou/whats-up-docker                            "/usr/bin/entrypoint…"   6 weeks ago      Up 4 days                0.0.0.0:3000->3000/tcp, :::3000->3000/tcp                                                      wud
5e0131a34b93   ghcr.io/ajnart/homarr                                "sh ./scripts/run.sh"    2 months ago     Up 4 days (healthy)      0.0.0.0:7575->7575/tcp, :::7575->7575/tcp                                                      homarr
5a9968de65e1   louislam/dockge:latest                               "/usr/bin/dumb-init …"   4 months ago     Up 4 days (healthy)      0.0.0.0:5001->5001/tcp, :::5001->5001/tcp                                                      dockge

Does this happen for all files?

It looks me it does happen to all files.

@janriedler
Copy link

You need to reload the page in order to see the change (worked for me). For the mobile app you need to reload the timeline by pulling the view down twice.

@backstab5983
Copy link
Author

You need to reload the page in order to see the change (worked for me). For the mobile app you need to reload the timeline by pulling the view down twice.

Not working sadly, Immich is not changing the exif data of the file and neither creating or editing the .xmp sidecar file, so no change is detected even if refreshing the page, or restarting the container.

@starbuck93
Copy link

Chiming in here with the same issue as echoed from the discord help channel.

A lot of my photos and videos can have the time changed, but there are a handful that cannot. Nothing interesting showed up in the logs either time. I posted my logs in the discord link ^

Screen.Recording.2024-07-21.141952.mp4
Screen.Recording.2024-07-21.142232.mp4

@WhiteWoodenWall
Copy link

Same problem here. I have many photos uploaded directly to Immich which have completely wrong dates and no way to change them. Trying to edit via the GUI results in no error but also no change to the date/time.

However, if I download the asset, completely delete it from Immich, then reupload it, I am able to change the datetime with the newly uploaded image. The metadata also seems more accurate after reupload.

I initially uploaded all my assets from a Google Photos export via Immich-Go, not sure whether that could have caused an issue?

@backstab5983
Copy link
Author

However, if I download the asset, completely delete it from Immich, then reupload it, I am able to change the datetime with the newly uploaded image. The metadata also seems more accurate after reupload.

I can reproduce this. I also uploaded most my assets with Immich-Go

@michelheusschen
Copy link
Contributor

Immich-go started uploading a sidecar file containing DateTimeOriginal in simulot/immich-go#337. Immich considers this an override and will always use this date

// ensure date from sidecar is used if present
const hasDateOverride = !!this.getDateTimeOriginal(sidecarTags);
if (mediaTags && hasDateOverride) {
for (const tag of EXIF_DATE_TAGS) {
delete mediaTags[tag];
}
}

@bo0tzz
Copy link
Member

bo0tzz commented Jul 22, 2024

We currently write metadata changes into the CreationDate field. We should probably use a higher priority one.

/** look for a date from these tags (in order) */
const EXIF_DATE_TAGS: Array<keyof Tags> = [
'SubSecDateTimeOriginal',
'DateTimeOriginal',
'SubSecCreateDate',
'CreationDate',
'CreateDate',
'SubSecMediaCreateDate',
'MediaCreateDate',
'DateTimeCreated',
];

@backstab5983
Copy link
Author

Immich-go started uploading a sidecar file containing DateTimeOriginal in simulot/immich-go#337.

Thanks for the clarification!

Do you guys think this should be reported in the Immich-Go repo? It seems to me quite a widely used tool, mentioned in the official Docs as well as a community project :)

@bo0tzz
Copy link
Member

bo0tzz commented Jul 22, 2024

cc @simulot for good measure, but I don't think immich-go is doing anything wrong here

@simulot
Copy link

simulot commented Jul 22, 2024

when Immich-go can determine the date of capture or GPS, it injects a virtual XMP with the relevant data. Maybe, this is linked with the incident

@vbMatthew
Copy link

This seems to only be associated with files uploaded with immich-go. I manually uploaded an image and had no problem with changing the date/time, but the file upload with immich-go can't be.

From the 'web client' side of things, the asset PUT call is made
the PUT /api/assets/98e7c109-dbad-42ca-9a08-97c161aef073 and its return object includes the updated date time. However a follow up GET /api/assets/98e7c109-dbad-42ca-9a08-97c161aef073 call is made and that has the date/time with the original value.

This seems odd as

async update(auth: AuthDto, id: string, dto: UpdateAssetDto): Promise<AssetResponseDto> {
appears to return the asset back from the repository? But I just started looking through the source.

@simulot
Copy link

simulot commented Jul 23, 2024

Using the admin account: the date modification is immediately visible.

Using a regular account: the date change isn't immediately reflected on the UI. However the XMP file is updated.
When refreshing the asset page, the date is correct.

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

Successfully merging a pull request may close this issue.

8 participants