Error "The files of the app (viewer) were not replaced correctly" after upgrading

It was my first upgrade and by Change, I’ve done it wrong. Now I have to deal with it, but I don’t know how.
The browser give me the error message “The files of the app (viewer) were not replaced correctly. Make sure it is a version compatible with the server.”
If I perform “./occ upgrade” I’ll get:
“UnexpectedValueException: The files of the app “viewer” were not correctly replaced before running the update”

But I can not see any app “Viewer”. Neither in the app Directory, nor if I try to upgrade with “./occ app:update Viewer”

I tried to find some Information how to deal with this Kind of error, but mostly the descriped apps could be found in the app Directory.

Yours
Andreas

2 Likes

You can try download the app viewer from https://download.nextcloud.com/server/releases/ (pick the NC version you’re already using). From the downloaded archive, open the app folder : you’ll see the viewer folder. Copy this entire folder to your original nextcloud app/ folder, run again occ upgrade, and you should be good to go.

1 Like

Have the same problem during an upgrade from 18.0.4 to 18.0.12.
The solution from @armymen did not work for me as the releases 18.0.12 or 18.0.4 doen’t have a app called “viewer” included

I simply removed “viewer” from the AlwaysEnabled in ´core/shipped.json´ and did the upgrade without problems. Later version upgrades reinstalled this automatically. May break things, I don’t know!

4 Likes