# AIO upgrade failed: UnexpectedValueException: The files of the app "activity" were not correctly replaced before running the update Update failed

**URL:** <https://help.nextcloud.com/t/aio-upgrade-failed-unexpectedvalueexception-the-files-of-the-app-activity-were-not-correctly-replaced-before-running-the-update-update-failed/251861>\
**Category:** ℹ️ Support\
**Tags:** docker, aio\
**Created:** [November 10, 2026, 1:02pm UTC](https://help.nextcloud.com/t/aio-upgrade-failed-unexpectedvalueexception-the-files-of-the-app-activity-were-not-correctly-replaced-before-running-the-update-update-failed/251861 "2026-11-10T13:02:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sjjh](https://help.nextcloud.com/letter_avatar/sjjh/32/6_22734026db12803ebb3e059622ac3534.png) [@sjjh](https://help.nextcloud.com/u/sjjh)\
**Post date:** [November 10, 2026, 1:02pm UTC](https://help.nextcloud.com/t/aio-upgrade-failed-unexpectedvalueexception-the-files-of-the-app-activity-were-not-correctly-replaced-before-running-the-update-update-failed/251861/1 "2026-11-10T13:02:26Z")

</div>

## The Basics

- Operating system and version _(e.g., Ubuntu 24.04)_:
  - `Debian 13`

- Is this the first time you’ve seen this error? (Yes / No):
  - `yes`

- When did this problem seem to first start?
  - `last night`

- Installation method _(e.g. AlO, NCP, Bare Metal/Archive, etc.)_
  - `Nextcloud AIO v15.0.2`

### Summary of the issue you are facing:

Upgrade failed. Same issue occured apparently 7 years ago, unfortunately without a documented solution:

> [@Upgrade to v16 : The files of the app "activity" were not correctly replaced](https://help.nextcloud.com/t/upgrade-to-v16-the-files-of-the-app-activity-were-not-correctly-replaced/59753):
>
> Hello trying to uprade to v16 and receiving following error : UnexpectedValueException: The files of the app “activity” were not correctly replaced before running the update details are : … sudo -u www-data php /var/www/nextcloud/occ upgrade Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade Set log level to debug Updating database schema Updated database UnexpectedValue…

### Steps to replicate it (hint: details matter!):

```Shell
# docker exec --user www-data -it nextcloud-aio-nextcloud php occ upgrade
Setting log level to debug
Turned on maintenance mode
Updating database schema
Updated database
UnexpectedValueException: The files of the app "activity" were not correctly replaced before running the update
Update failed
Maintenance mode is kept active
Resetting log level

```

Thx for any hint how to fix it. 🙂

---

<div class="post-metadata">

**Author:** ![szaimen](https://help.nextcloud.com/user_avatar/help.nextcloud.com/szaimen/32/63019_2.png) [@szaimen](https://help.nextcloud.com/u/szaimen)\
**Post date:** [November 10, 2026, 2:01pm UTC](https://help.nextcloud.com/t/aio-upgrade-failed-unexpectedvalueexception-the-files-of-the-app-activity-were-not-correctly-replaced-before-running-the-update-update-failed/251861/2 "2026-11-10T14:01:07Z")

</div>

Hi, please restore a backup from before the update and restart the containers multiple times to try the update again.
