This category is for issues regarding specific apps, NOT general issues with YunoHost.
on
This form is written in English but feel free to write in French if you’re more comfortable!
on
What type of hardware are you using
Old laptop or computer
What YunoHost version are you running
12.0.11 stable
What app is this about
Immich (immich) from 1.126.1~ynh2 to 1.129.0~ynh1
Describe your issue
Immich fails to upgrade to 1.129.0~ynh1 and now the Immich 1.126.1~ynh2 is unreachable. Full disclosure after doing a full backup of Immich I attempted a fix with the aid of ChatGPT without success. I reverted to the backup when I realised it was too complex an issue. Also all photos are stored on my Nextcloud server which Immich has read only access to. So nothing will be lost if a more drastic solution is needed. I have included the current Immich will not run logs in case that is relevant.
Share relevant logs or error messages
Current install
Welcome to nginx!
If you see this page, the nginx web server is successfully installed and working. Further configuration is required.
For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.
immich 1.126.1~ynh2 - was running but not after attempting upgrade. It now gives the nginx page error. I’ve also attempted to connect to it directly without success. I included this in an attempt to give as much information as possible.
attempted upgrade to 1.129.0~ynh1 problem
here’s a screenshot of the current services.
Regarding ChatGPT I did a backup before attempting anything with it. At the stage I used it neither the old version of immich or the new version were working or installable. I rolled it back using the backup when I realised it wasn’t going to help.
Forcing an upgrade without previously modifying the the destination of the link /opt/node_n/n/versions/node/22 will failed.
Regarding the restoration, you only share the log of the upgrade failing but not the automatic restauration which follow. Do you have it?
As @tituspijean mentioned, your issue is due to a connection failure with the db. Fisrt things is perhaps to check the content of the env file in /var/www/immich.
login as: root
root@42's password:
Linux druss.nohope.me 6.1.0-31-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.128-1 (20 25-02-07) x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Mar 11 11:46:44 2025 from 192.168.42.4
root@bob:~# sudo yunohost app upgrade immich --force
Info: Now upgrading immich…
Info: Creating a safety backup prior to the upgrade
Info: Collecting files to be backed up for immich…
Info: Declaring files to be backed up...
Info: /home/yunohost.app/immich will not be saved, because 'BACKUP_CORE_ONLY' is set.
Info: /var/log/immich/ will not be saved, because 'BACKUP_CORE_ONLY' is set.
Info: Backing up a PostgreSQL database...
Info: Backup script completed for immich. (YunoHost will then actually copy those fil es to the archive).
Info: Creating a backup archive from the collected files…
Info: The archive will contain about 3.1GB of data.
Success! Backup created: immich-pre-upgrade2
Success! Backup deleted: immich-pre-upgrade1
Info: Updating sources...
Info: Updating ports...
Info: Updating system_user...
Info: Updating install_dir...
Info: Updating data_dir...
Info: Updating permissions...
Info: Updating apt...
Warning: W: http://apt.postgresql.org/pub/repos/apt/dists/bookworm-pgdg/InRelease: Ke y is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
Warning: W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Packages (main/binary-all/Packages) is configured multiple times i n /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Translations (main/i18n/Translation-en) is configured multiple tim es in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Packages (main/binary-all/Packages) is configured multiple times i n /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Translations (main/i18n/Translation-en) is configured multiple tim es in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Packages (main/binary-all/Packages) is configured multiple times i n /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Translations (main/i18n/Translation-en) is configured multiple tim es in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Packages (main/binary-all/Packages) is configured multiple times i n /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Translations (main/i18n/Translation-en) is configured multiple tim es in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: http://apt.postgresql.org/pub/repos/apt/dists/bookworm-pgdg/InRelease: Ke y is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
Info: Updating database...
Info: [++..................] > Ensuring downward compatibility...
Info: [##++................] > Stopping immich's systemd service...
Info: [####++..............] > Upgrading source files...
Info: '/var/www/immich/source' wasn't deleted because it doesn't exist.
Info: '/var/www/immich/ffmpeg-static' wasn't deleted because it doesn't exist.
Info: [######++............] > Installing nodejs...
Info: [########++..........] > Udpating a PostgreSQL database...
Info: [##########++........] > Making install...
Error: Could not upgrade immich: An error occurred inside the app upgrade script
Info: The operation 'Upgrade the 'immich' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20250312-075440-app_upgrade-immich' to get help
Warning: Here's an extract of the logs before the crash. It might help debugging the error:
Info: DEBUG - added 4 packages, and audited 5 packages in 956ms
Info: DEBUG -
Info: DEBUG - found 0 vulnerabilities
Info: DEBUG - + ynh_hide_warnings npm run build
Info: DEBUG - + npm run build
Info: DEBUG -
Info: DEBUG - > @immich/sdk@1.129.0 build
Info: DEBUG - > tsc
Info: DEBUG -
Info: DEBUG - + cd /var/www/immich/source/web
Info: DEBUG - + ynh_hide_warnings npm ci
Info: DEBUG - + npm ci
Info: DEBUG - npm error code EBADENGINE
Info: DEBUG - npm error engine Unsupported engine
Info: DEBUG - npm error engine Not compatible with your version of node/npm: eslint-plugin-svelte@3.0.2
Info: DEBUG - npm error notsup Not compatible with your version of node/npm: eslint-plugin-svelte@3.0.2
Info: DEBUG - npm error notsup Required: {"node":"^18.20.4 || ^20.18.0 || >=22.10.0"}
Info: DEBUG - npm error notsup Actual: {"npm":"10.8.2","node":"v22.5.1"}
Info: DEBUG - npm error A complete log of this run can be found in: /root/.npm/_logs/2025-03-12T07_57_41_461Z-debug-0.log
Info: DEBUG - + ynh_exit_properly
Warning: Upgrade failed ... attempting to restore the safety backup (Yunohost first need to remove the app for this) ...
Info: Removing immich…
Info: [++++++++++..........] > Removing system configurations related to immich...
Info: [####################] > Removal of immich completed
Info: Deprovisioning database...
Info: Deprovisioning apt...
Info: Deprovisioning permissions...
Info: Deprovisioning data_dir...
Info: Deprovisioning install_dir...
Info: Deprovisioning system_user...
Info: Deprovisioning ports...
Info: Deprovisioning sources...
Success! immich uninstalled
Info: Preparing archive for restoration…
Info: Restoring immich…
Info: Provisioning sources...
Info: Provisioning ports...
Info: Provisioning system_user...
Info: Provisioning install_dir...
Info: Provisioning data_dir...
Info: Provisioning permissions...
Info: Provisioning apt...
Warning: W: http://apt.postgresql.org/pub/repos/apt/dists/bookworm-pgdg/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
Warning: W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: http://apt.postgresql.org/pub/repos/apt/dists/bookworm-pgdg/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
Info: Provisioning database...
Info: [++..................] > Restoring the app main directory...
Info: [##+++...............] > Restoring the data directory...
Info: Skipping /home/yunohost.app/immich which doesn't exists in the archive, probably because restoring from a safety-backup-before-upgrade
Info: [#####+++............] > Reinstalling nodejs...
Info: [########+++.........] > Restoring the database...
root@42's password:
Linux druss.nohope.me 6.1.0-31-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.128-1 (20 25-02-07) x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Mar 11 11:46:44 2025 from 192.168.42.4
root@bob:~# sudo yunohost app upgrade immich --force
Info: Now upgrading immich…
Info: Creating a safety backup prior to the upgrade
Info: Collecting files to be backed up for immich…
Info: Declaring files to be backed up...
Info: /home/yunohost.app/immich will not be saved, because 'BACKUP_CORE_ONLY' is set.
Info: /var/log/immich/ will not be saved, because 'BACKUP_CORE_ONLY' is set.
Info: Backing up a PostgreSQL database...
Info: Backup script completed for immich. (YunoHost will then actually copy those fil es to the archive).
Info: Creating a backup archive from the collected files…
Info: The archive will contain about 3.1GB of data.
Success! Backup created: immich-pre-upgrade2
Success! Backup deleted: immich-pre-upgrade1
Info: Updating sources...
Info: Updating ports...
Info: Updating system_user...
Info: Updating install_dir...
Info: Updating data_dir...
Info: Updating permissions...
Info: Updating apt...
Warning: W: http://apt.postgresql.org/pub/repos/apt/dists/bookworm-pgdg/InRelease: Ke y is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
Warning: W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Packages (main/binary-all/Packages) is configured multiple times i n /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Translations (main/i18n/Translation-en) is configured multiple tim es in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Packages (main/binary-all/Packages) is configured multiple times i n /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Translations (main/i18n/Translation-en) is configured multiple tim es in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Packages (main/binary-all/Packages) is configured multiple times i n /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Translations (main/i18n/Translation-en) is configured multiple tim es in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Packages (main/binary-all/Packages) is configured multiple times i n /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: Target Translations (main/i18n/Translation-en) is configured multiple tim es in /etc/apt/sources.list.d/immich.list:1 and /etc/apt/sources.list.d/pgdg.list:1
Warning: W: http://apt.postgresql.org/pub/repos/apt/dists/bookworm-pgdg/InRelease: Ke y is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
Info: Updating database...
Info: [++..................] > Ensuring downward compatibility...
Info: [##++................] > Stopping immich's systemd service...
Info: [####++
Just a clarification or understanding question if I may? If the problem is the nodeJS and it’s under investigation to fix would I be better to wait for the patch to be applied and would that then fix the issue? thank you for your assistance and I’ll post the results of those last two commands as soon as I get home
seems fine too.
And now LC_ALL=C sudo --login --user=postgres PGUSER=postgres PGPASSWORD=$(cat /etc/yunohost/psql) psql --cluster="16/main" --tuples-only --no-align --dbname=postgres --command="SELECT datname FROM pg_database WHERE datistemplate = false;"
Hi and thank you for your time. I think you are correct in that the system still needs to be able to be updated at the end of all this. Here is the output of the last two commands.
You can manually change the link with the following command: sudo ln --symbolic --force --no-target-directory /opt/node_n/n/versions/node/22.14.0 /opt/node_n/n/versions/node/22
Once done, you could reinstall immich.
As you have audiobookshelf which use node 22 too, check if that app is still normally working, else you should do a force upgrade of it.