Link Sharing broken if metadata sharing is disabled #5347

Closed
opened 2026-02-05 11:22:11 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @qsineu on GitHub (Feb 9, 2025).

The bug

If one shares images using the "Create Link to Share" option, the resulting page seems to be broken. It does not display the thumpnails and shows errors in the browsers console. It can be reproduced on the demo instance, see this for an example:
https://demo.immich.app/share/JYG8CMYaGYhZOmbjiZDbib87NojPdQfbopfKwmBhznDvbUptBuY9SBTClukJCToFHYU

The error in console is:

Uncaught InvalidCharacterError: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.
    at we (C2PPtOS8.js:1:5108)
    at Z (BFgSA0iI.js:1:4497)
    at Ge.base64ThumbHash (DH55NdwD.js:1:8590)
    at Bp3No1Kb.js:1:639
    at z (BjOdAafn.js:1:12226)
    at Bp3No1Kb.js:1:633
    at an (BjOdAafn.js:1:9529)
    at ot (BjOdAafn.js:1:10306)
    at Wn (BjOdAafn.js:1:10765)
    at un (BjOdAafn.js:1:10646)

This hints, that the generated thumb-hash is incorrect if metadata sharing is disabled.
Indeed, the entry in the servers response without metadata:

        {
            "id": "c84bab39-d651-4c5e-9d67-f738536fec55",
            "type": "IMAGE",
            "originalMimeType": "image/png",
            "thumbhash": "\\x72180e1682acb4868777887f769788688666537920d405",
            "localDateTime": "2023-01-11T13:01:39.768+00:00",
            "duration": "0:00:00.00000",
            "livePhotoVideoId": null,
            "hasMetadata": false
        },

And with metadata:

        {
            "id": "c84bab39-d651-4c5e-9d67-f738536fec55",
            "deviceAssetId": "Afrovenator_abakensis_dinosaur.png-1465718",
            "ownerId": "2246cace-3408-4bfe-9dfd-e7956a0583e0",
            "deviceId": "CLI",
            "libraryId": null,
            "type": "IMAGE",
            "originalPath": "upload/upload/2246cace-3408-4bfe-9dfd-e7956a0583e0/c6/df/c6dfae29-e3c3-49a5-8bdc-e67dcfd6273b.png",
            "originalFileName": "Afrovenator_abakensis_dinosaur.png",
            "originalMimeType": "image/png",
            "thumbhash": "chgOFoKstIaHd4h/dpeIaIZmU3kg1AU=",
            "fileCreatedAt": "2023-01-11T13:01:39.768+00:00",
            "fileModifiedAt": "2023-01-11T13:01:39.768+00:00",
            "localDateTime": "2023-01-11T13:01:39.768+00:00",
            "updatedAt": "2025-02-09T16:02:00.887692+00:00",
            "isFavorite": false,
            "isArchived": false,
            "isTrashed": false,
            "duration": "0:00:00.00000",
            "exifInfo": {
                "make": null,
                "model": null,
                "exifImageWidth": 1500,
                "exifImageHeight": 1213,
                "fileSizeInByte": 1465718,
                "orientation": null,
                "dateTimeOriginal": "2023-01-11T13:01:39.768+00:00",
                "modifyDate": "2023-01-11T13:01:39.768+00:00",
                "timeZone": "America/Mexico_City",
                "lensModel": null,
                "fNumber": null,
                "focalLength": null,
                "iso": null,
                "exposureTime": null,
                "latitude": 16.185475,
                "longitude": -92.031964,
                "city": "Guadalupe Quistaj",
                "state": "Chiapas",
                "country": "Mexico",
                "description": "",
                "projectionType": null,
                "rating": null
            },
            "livePhotoVideoId": null,
            "people": [],
            "checksum": "e8hVTdBH633BrlENptIi7eh/Uus=",
            "isOffline": false,
            "hasMetadata": true,
            "duplicateId": null,
            "resized": true
        },

The hash in the entry without metadata doesn't look valid to me.

The OS that Immich Server is running on

Demo Server (Free-tier Oracle VM in Amsterdam with a 2.4Ghz quad-core ARM64 CPU and 24GB RAM.)

Version of Immich Server

v1.125.7

Version of Immich Mobile App

v1.125.7

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

Demo Server

Your .env content

Demo Server

Reproduction steps

  1. Select multiple images
  2. Create share link
  3. Disable metadata entry
  4. Open generated link
  5. Observe multiple grey boxes or app not starting at all.

Relevant log output


Additional information

No response

Originally created by @qsineu on GitHub (Feb 9, 2025). ### The bug If one shares images using the "Create Link to Share" option, the resulting page seems to be broken. It does not display the thumpnails and shows errors in the browsers console. It can be reproduced on the demo instance, see this for an example: https://demo.immich.app/share/JYG8CMYaGYhZOmbjiZDbib87NojPdQfbopfKwmBhznDvbUptBuY9SBTClukJCToFHYU The error in console is: ``` Uncaught InvalidCharacterError: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded. at we (C2PPtOS8.js:1:5108) at Z (BFgSA0iI.js:1:4497) at Ge.base64ThumbHash (DH55NdwD.js:1:8590) at Bp3No1Kb.js:1:639 at z (BjOdAafn.js:1:12226) at Bp3No1Kb.js:1:633 at an (BjOdAafn.js:1:9529) at ot (BjOdAafn.js:1:10306) at Wn (BjOdAafn.js:1:10765) at un (BjOdAafn.js:1:10646) ``` This hints, that the generated thumb-hash is incorrect if metadata sharing is disabled. Indeed, the entry in the servers response without metadata: ```json { "id": "c84bab39-d651-4c5e-9d67-f738536fec55", "type": "IMAGE", "originalMimeType": "image/png", "thumbhash": "\\x72180e1682acb4868777887f769788688666537920d405", "localDateTime": "2023-01-11T13:01:39.768+00:00", "duration": "0:00:00.00000", "livePhotoVideoId": null, "hasMetadata": false }, ``` And with metadata: ```json { "id": "c84bab39-d651-4c5e-9d67-f738536fec55", "deviceAssetId": "Afrovenator_abakensis_dinosaur.png-1465718", "ownerId": "2246cace-3408-4bfe-9dfd-e7956a0583e0", "deviceId": "CLI", "libraryId": null, "type": "IMAGE", "originalPath": "upload/upload/2246cace-3408-4bfe-9dfd-e7956a0583e0/c6/df/c6dfae29-e3c3-49a5-8bdc-e67dcfd6273b.png", "originalFileName": "Afrovenator_abakensis_dinosaur.png", "originalMimeType": "image/png", "thumbhash": "chgOFoKstIaHd4h/dpeIaIZmU3kg1AU=", "fileCreatedAt": "2023-01-11T13:01:39.768+00:00", "fileModifiedAt": "2023-01-11T13:01:39.768+00:00", "localDateTime": "2023-01-11T13:01:39.768+00:00", "updatedAt": "2025-02-09T16:02:00.887692+00:00", "isFavorite": false, "isArchived": false, "isTrashed": false, "duration": "0:00:00.00000", "exifInfo": { "make": null, "model": null, "exifImageWidth": 1500, "exifImageHeight": 1213, "fileSizeInByte": 1465718, "orientation": null, "dateTimeOriginal": "2023-01-11T13:01:39.768+00:00", "modifyDate": "2023-01-11T13:01:39.768+00:00", "timeZone": "America/Mexico_City", "lensModel": null, "fNumber": null, "focalLength": null, "iso": null, "exposureTime": null, "latitude": 16.185475, "longitude": -92.031964, "city": "Guadalupe Quistaj", "state": "Chiapas", "country": "Mexico", "description": "", "projectionType": null, "rating": null }, "livePhotoVideoId": null, "people": [], "checksum": "e8hVTdBH633BrlENptIi7eh/Uus=", "isOffline": false, "hasMetadata": true, "duplicateId": null, "resized": true }, ``` The hash in the entry without metadata doesn't look valid to me. ### The OS that Immich Server is running on Demo Server (Free-tier Oracle VM in Amsterdam with a 2.4Ghz quad-core ARM64 CPU and 24GB RAM.) ### Version of Immich Server v1.125.7 ### Version of Immich Mobile App v1.125.7 ### Platform with the issue - [x] Server - [x] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML Demo Server ``` ### Your .env content ```Shell Demo Server ``` ### Reproduction steps 1. Select multiple images 2. Create share link 3. Disable metadata entry 4. Open generated link 5. Observe multiple grey boxes or app not starting at all. ### Relevant log output ```shell ``` ### Additional information _No response_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#5347