Wallabag 2.5 -> 2.6 upgrade problem

What app is this about, and its version: Wallabag 2.6.14~ynh1
What YunoHost version are you running: 12.1.37
What type of hardware are you using: Old laptop or computer

Describe your issue

After upgrading Wallabag from 2.5.4, it was no more accessible: error 500. Apparently it was something with header corruption.
I managed to solve it somehow using chatgpt, pasting its summary below.

Share relevant logs or error messages

:red_exclamation_mark: Wallabag returns 500 error after upgrade (Doctrine unserialize error)

TL;DR:
After upgrading Wallabag on YunoHost, the app may fail with a 500 error due to corrupted serialized data in the database (entry.headers / entry.published_by). The fix is to identify and NULL-out the broken rows.

Symptoms

After upgrading Wallabag, accessing /wallabag/ results in:

500 Internal Server Error
Could not convert database value to ‘array’
unserialize(): Error at offset X of Y bytes

The error happens while rendering the entries list (homepage).

Root cause

Some Wallabag database columns are defined as Doctrine type=“array” and stored as PHP-serialized strings.

In my case, the following columns contained corrupted serialized payloads:

entry.headers

entry.published_by

When Doctrine tries to hydrate Entry entities, unserialize() fails and throws a Doctrine\DBAL\Types\ConversionException, which crashes the page even though these fields are optional metadata.

This corruption likely predates the upgrade, but newer Wallabag / Doctrine versions are stricter and expose it.

How to diagnose

Run this on the server to detect broken rows (example for headers):

DB=wallabag2
mysql -N -e “SELECT id, headers FROM ${DB}.entry WHERE headers IS NOT NULL;”
| while IFS=$‘\t’ read -r id val; do
php -r ‘$v=$argv[1]; if (@unserialize($v)===false && $v!==“b:0;”) echo “BAD headers ID=$argv[2]\n”;’
“$val” “$id”
done

Repeat for published_by:

mysql -N -e “SELECT id, published_by FROM ${DB}.entry WHERE published_by IS NOT NULL;”
| while IFS=$‘\t’ read -r id val; do
php -r ‘$v=$argv[1]; if (@unserialize($v)===false && $v!==“b:0;”) echo “BAD published_by ID=$argv[2]\n”;’
“$val” “$id”
done

Fix (safe)

These fields are non-essential metadata, so the fix is simply to NULL them for the corrupted rows:

UPDATE entry SET headers = NULL WHERE id IN (…bad ids…);
UPDATE entry SET published_by = NULL WHERE id IN (…bad ids…);

After that:

sudo -u wallabag2 php /var/www/wallabag2/bin/console cache:clear --env=prod
systemctl reload php-fpm
systemctl reload nginx

Wallabag should load normally again.

YunoHost-specific note (important)

After the upgrade, Wallabag runs under a dedicated PHP-FPM pool user (wallabag2).
Make sure these directories are writable by that user:

/var/www/wallabag2/var/cache
/var/www/wallabag2/var/logs

Otherwise Wallabag may fail to boot with cache/log permission errors before anything is logged.

Possible upstream improvements

Migrate Doctrine array fields to JSON

Add defensive unserialization (fallback to NULL)

Add a migration or integrity check for legacy serialized fields

My upgrade failed as well.

Here is my log: hastebin

It seems the culprit is updating of PHP packages:

2026-01-01 16:40:01,720: WARNING - The following packages were automatically installed and are no longer required:
2026-01-01 16:40:01,721: DEBUG - + ynh_die 'Unable to install apt dependencies, it might be due to a conflict with another app - or you should check and share the previous log about what are the problematic dependencies'
2026-01-01 16:40:01,721: WARNING -   php8.2 php8.2-curl php8.2-fpm php8.2-igbinary php8.2-intl php8.2-ldap
2026-01-01 16:40:01,723: WARNING -   php8.2-mbstring php8.2-mysql php8.2-redis php8.2-tidy
2026-01-01 16:40:01,723: WARNING - Use 'apt autoremove' to remove them.
2026-01-01 16:40:01,724: WARNING - The following NEW packages will be installed:
2026-01-01 16:40:01,724: WARNING -   php8.3-tidy
2026-01-01 16:40:01,725: WARNING - 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
2026-01-01 16:40:01,726: WARNING - Inst php8.3-tidy (8.3.29-1+0~20251218.74+debian12~1.gbp4d5a0d bookworm [amd64])
2026-01-01 16:40:01,727: WARNING - Conf php8.3-tidy (8.3.29-1+0~20251218.74+debian12~1.gbp4d5a0d bookworm [amd64])
2026-01-01 16:40:01,749: WARNING - Unable to install apt dependencies, it might be due to a conflict with another app - or you should check and share the previous log about what are the problematic dependencies
2026-01-01 16:40:02,253: ERROR - provision_or_update failed for apt : An error occured inside the script snippet : Unable to install apt dependencies, it might be due to a conflict with another app - or you should check and share the previous log about what are the problematic dependencies

Edit:

Oddly enough, when I tried it again today, I get a different error (and different still from OP). This time it complains that it cannot back up /etc/php/8.2/fpm/pool.d/wallabag2.conf because it does not exist (nor does it exist in any other such folder of a different php fpm version).