[SOLVED] Upgrade to 20.0.2 failed

Nextcloud version (eg, 18.0.2): 19.0.0 > 20.0.2
Operating system and version (eg, Ubuntu 20.04): Debian GNU/Linux 10
Apache or nginx version (eg, Apache 2.4.25): Nginx 1.14.2
PHP version (eg, 7.1): 7.3

The issue you are facing:

When I perform the upgrade of my instance, I got that error:

Setting log level to debug
Updating database schema
Updated database
UnexpectedValueException: The files of the app "twofactor_backupcodes" were not correctly replaced before running the update                                                                                                                 
Update failed
Maintenance mode is kept active
Resetting log level

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Following upgrade instruction
  2. The command that is raising the error: sudo -u www-data php occ upgrade

Never-mind, I forgot to upgrade to 19.0.5 before upgrading to 20.0.x…

Sorry for the inconvenience

1 Like