Skip to content

2025

Stuck at v1.133.1

If you find yourself stuck at version 1.133.1 with one of the following error messages, please continue reading.

error: cannot perform the following tasks:
- Run pre-refresh hook of "immich-distribution" snap if present (run hook "pre-refresh": 
-----
/snap/immich-distribution/195/snap/hooks/pre-refresh: line 9: /snap/immich-distribution/195/backup: No such file or directory
Failed to create and validate database backup during pre-refresh.
-----)
error: cannot perform the following tasks:
- Run pre-refresh hook of "immich-distribution" snap if present (run hook "pre-refresh": 
-----
Creating database backup: /var/snap/immich-distribution/common/backups/immich_database_v1.133.1_pgvectors.sql.xz

<exceeded maximum runtime of 10m0s>
-----)

To resolve this, follow these steps:

  1. Disable the hook by executing: touch /var/snap/immich-distribution/common/no-pre-refresh-hook
  2. Update as you normally would (for example, snap refresh).
  3. Restore the hook by executing: rm /var/snap/immich-distribution/common/no-pre-refresh-hook

Only users on the unstable edge, beta, or candidate channels need to perform these steps. This bug was identified during testing before it affected the stable channel.

Technical background

In preparation for the upcoming migration from pgvecto.rs to VectorChord, a database backup step was added to the pre-refresh hook. This hook is designed to back up the database before a snap update occurs. However, a bug was introduced in the pre-refresh script in revision 195 due to an incorrect path being committed.

Although a fix was implemented in the subsequent revision, users who had already updated to revision 195 found themselves stuck. This was because the pre-refresh hook runs before the update process, causing the update to fail repeatedly due to the faulty script.

Unfortunately, there was no way to automatically push a fix for this issue to affected users. Thankfully, a mechanism to disable the hook was already in place, which is the solution employed here.

Later, during further testing, it was discovered that on some systems, the database backup process could exceed the 10-minute timeout. This scenario would trigger a similar problem, effectively blocking the update.

Given these challenges, the decision has been made to revert this pre-refresh backup feature for now.

Upcoming database changes

Immich version 1.133.0 replaces the deprecated pgvecto.rs extension with its replacement VectorChord. To ease transition, Immich will support both in parallel for a few releases.

There is also a breaking change in the API between the mobile application and the server. With this in mind, I will fast-track this release and postpone the VectorChord change to a later, separate release.

Breaking change in the mobile app

Please ensure both your mobile app and the server are updated to v1.133.0. Older versions of the Immich mobile app will not work correctly with server version v1.133.0.

Upgrading from 1.107.2 or older

Due to the automatic updates in the package format, most users are on recent versions. Snap Store metrics show that only 0.5% of users are running releases this old. If you are one of these rare users, you need to manually update to a newer intermediate release before upgrading to the most recent release.

Database backup

There are a lot of database changes, which introduces some risk. If you have not done so already, this is probably a good time to enable automatic database backups. You can either use the built in backup job (should be enabled by default), or the backup tool included in this snap.

Use immich-distribution.backup -l to list existing backups.

Release update

I took a month for this release due an unusable buggy 1.125 release with six patch releases. The database layer has been swapped out in the upstream project and with a large change like this I was in no hurry to update. I also have a lot of personal things going on, so it fit me well to take a month of while it settled down a little.

I will release 1.126 directly to stable in a few days assuming I see no issues in my testing.