0.135 -> 0.136.0 -> 0.137.3: path must be absolute or specify root to res.sendFile #6782

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

Originally created by @arnaudbreton on GitHub (Aug 7, 2025).

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

I migrated from 1.135 to 1.136.0 and now 1.137.3 and when visualizing some images, I see a lot of instances of the following error:

[Nest] 41049  - 08/07/2025, 6:59:47 PM   DEBUG [Api:LoggingInterceptor~6ko5g2dk] GET /api/assets/4d3618a4-0dc5-4f39-b8de-c444a1692fee/thumbnail?size=thumbnail 500 10.21ms 192.168.68.105
[Nest] 41049  - 08/07/2025, 6:59:47 PM   ERROR [Api:LoggingRepository~5mm6q9rz] Unable to send file: TypeError
TypeError: path must be absolute or specify root to res.sendFile
    at ServerResponse.sendFile (/opt/immich/app/node_modules/express/lib/response.js:398:11)
    at node:internal/util:472:21
    at new Promise (<anonymous>)
    at ServerResponse.sendFile (node:internal/util:458:12)
    at _sendFile (/opt/immich/app/dist/utils/file.js:38:92)
    at sendFile (/opt/immich/app/dist/utils/file.js:50:22)
    at async AssetMediaController.viewAsset (/opt/immich/app/dist/controllers/asset-media.controller.js:60:13)

I tried to go through the solutions described in https://github.com/immich-app/immich/discussions/20531 but I still get the error after restarting, and I didn't see the PostgreSQL issue in my logs, even in verbose mode.

One thing I thought of is that IMMICH_MEDIA_LOCATION=/opt/immich/upload is a symlink to a mount point: lrwxrwxrwx 1 immich immich 13 Jun 30 10:22 upload -> /mnt/storage/

Most of the most recent photos display correctly and in the database they have an absolute path in the database.

I confirmed that the path stored in the asset table for a broken asset is correct:

[Nest] 41049  - 08/07/2025, 7:07:45 PM   DEBUG [Api:LoggingInterceptor~5tsfh9xs] GET /api/assets/70f54e55-933c-449c-82f1-54ed2e41f58e/thumbnail?size=thumbnail 500 6.90ms 192.168.68.105
[Nest] 41049  - 08/07/2025, 7:07:45 PM   ERROR [Api:LoggingRepository~3nnik8ph] Unable to send file: TypeError
TypeError: path must be absolute or specify root to res.sendFile
    at ServerResponse.sendFile (/opt/immich/app/node_modules/express/lib/response.js:398:11)
    at node:internal/util:472:21
    at new Promise (<anonymous>)
    at ServerResponse.sendFile (node:internal/util:458:12)
    at _sendFile (/opt/immich/app/dist/utils/file.js:38:92)
    at sendFile (/opt/immich/app/dist/utils/file.js:50:22)
    at async AssetMediaController.viewAsset (/opt/immich/app/dist/controllers/asset-media.controller.js:60:13)

SELECT * FROM "asset" WHERE id = '70f54e55-933c-449c-82f1-54ed2e41f58e'; -> upload/library/232d45df-4612-4be9-9419-8337ab50255e/2017/09/20170906_114415.mp4.xmp

root@immich:/opt/immich# ls -lha /opt/immich/upload/library/232d45df-4612-4be9-9419-8337ab50255e/2017/09/20170906_114415.mp4.xmp
-rwxr-xr-x 1 immich immich 588 Jun  2 21:14 /opt/immich/upload/library/232d45df-4612-4be9-9419-8337ab50255e/2017/09/20170906_114415.mp4.xmp

The OS that Immich Server is running on

Debian GNU/Linux 13 (trixie)

Version of Immich Server

1.137.3

Version of Immich Mobile App

1.135.3

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

Not using Docker, running Immich services directly in an LXC following https://community-scripts.github.io/ProxmoxVE/scripts?id=immich

Your .env content

IMMICH_VERSION=release
NODE_ENV=production

DB_HOSTNAME=127.0.0.1
DB_USERNAME=immich
DB_PASSWORD=...
DB_DATABASE_NAME=immich
DB_VECTOR_EXTENSION=vectorchord

REDIS_HOSTNAME=127.0.0.1
IMMICH_MACHINE_LEARNING_URL=http://127.0.0.1:3003
MACHINE_LEARNING_CACHE_FOLDER=/opt/immich/cache

IMMICH_MEDIA_LOCATION=/opt/immich/upload
IMMICH_LOG_LEVEL=verbose

Reproduction steps

  1. Search for pictures
  2. Click on a broken image/video
  3. Check the immich-web logs
    ...

Relevant log output


Additional information

No response

Originally created by @arnaudbreton on GitHub (Aug 7, 2025). ### I have searched the existing issues, both open and closed, to make sure this is not a duplicate report. - [x] Yes ### The bug I migrated from 1.135 to 1.136.0 and now 1.137.3 and when visualizing some images, I see a lot of instances of the following error: ``` [Nest] 41049 - 08/07/2025, 6:59:47 PM DEBUG [Api:LoggingInterceptor~6ko5g2dk] GET /api/assets/4d3618a4-0dc5-4f39-b8de-c444a1692fee/thumbnail?size=thumbnail 500 10.21ms 192.168.68.105 [Nest] 41049 - 08/07/2025, 6:59:47 PM ERROR [Api:LoggingRepository~5mm6q9rz] Unable to send file: TypeError TypeError: path must be absolute or specify root to res.sendFile at ServerResponse.sendFile (/opt/immich/app/node_modules/express/lib/response.js:398:11) at node:internal/util:472:21 at new Promise (<anonymous>) at ServerResponse.sendFile (node:internal/util:458:12) at _sendFile (/opt/immich/app/dist/utils/file.js:38:92) at sendFile (/opt/immich/app/dist/utils/file.js:50:22) at async AssetMediaController.viewAsset (/opt/immich/app/dist/controllers/asset-media.controller.js:60:13) ``` I tried to go through the solutions described in https://github.com/immich-app/immich/discussions/20531 but I still get the error after restarting, and I didn't see the PostgreSQL issue in my logs, even in verbose mode. One thing I thought of is that `IMMICH_MEDIA_LOCATION=/opt/immich/upload` is a symlink to a mount point: `lrwxrwxrwx 1 immich immich 13 Jun 30 10:22 upload -> /mnt/storage/` Most of the most recent photos display correctly and in the database they have an absolute path in the database. I confirmed that the path stored in the `asset` table for a broken asset is correct: ``` [Nest] 41049 - 08/07/2025, 7:07:45 PM DEBUG [Api:LoggingInterceptor~5tsfh9xs] GET /api/assets/70f54e55-933c-449c-82f1-54ed2e41f58e/thumbnail?size=thumbnail 500 6.90ms 192.168.68.105 [Nest] 41049 - 08/07/2025, 7:07:45 PM ERROR [Api:LoggingRepository~3nnik8ph] Unable to send file: TypeError TypeError: path must be absolute or specify root to res.sendFile at ServerResponse.sendFile (/opt/immich/app/node_modules/express/lib/response.js:398:11) at node:internal/util:472:21 at new Promise (<anonymous>) at ServerResponse.sendFile (node:internal/util:458:12) at _sendFile (/opt/immich/app/dist/utils/file.js:38:92) at sendFile (/opt/immich/app/dist/utils/file.js:50:22) at async AssetMediaController.viewAsset (/opt/immich/app/dist/controllers/asset-media.controller.js:60:13) ``` `SELECT * FROM "asset" WHERE id = '70f54e55-933c-449c-82f1-54ed2e41f58e';` -> `upload/library/232d45df-4612-4be9-9419-8337ab50255e/2017/09/20170906_114415.mp4.xmp` ``` root@immich:/opt/immich# ls -lha /opt/immich/upload/library/232d45df-4612-4be9-9419-8337ab50255e/2017/09/20170906_114415.mp4.xmp -rwxr-xr-x 1 immich immich 588 Jun 2 21:14 /opt/immich/upload/library/232d45df-4612-4be9-9419-8337ab50255e/2017/09/20170906_114415.mp4.xmp ``` ### The OS that Immich Server is running on Debian GNU/Linux 13 (trixie) ### Version of Immich Server 1.137.3 ### Version of Immich Mobile App 1.135.3 ### Platform with the issue - [ ] Server - [x] Web - [x] Mobile ### Your docker-compose.yml content ```YAML Not using Docker, running Immich services directly in an LXC following https://community-scripts.github.io/ProxmoxVE/scripts?id=immich ``` ### Your .env content ```Shell IMMICH_VERSION=release NODE_ENV=production DB_HOSTNAME=127.0.0.1 DB_USERNAME=immich DB_PASSWORD=... DB_DATABASE_NAME=immich DB_VECTOR_EXTENSION=vectorchord REDIS_HOSTNAME=127.0.0.1 IMMICH_MACHINE_LEARNING_URL=http://127.0.0.1:3003 MACHINE_LEARNING_CACHE_FOLDER=/opt/immich/cache IMMICH_MEDIA_LOCATION=/opt/immich/upload IMMICH_LOG_LEVEL=verbose ``` ### Reproduction steps 1. Search for pictures 2. Click on a broken image/video 3. Check the immich-web logs ... ### 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#6782