Update failed, again - “The files of the app OAuth 2.0 (oauth2) were not replaced correctly

This is done. But I am still stuck at screen telling me the files of the app was not found…

The config is as follows: <?php
$CONFIG = array (
‘instanceid’ => ‘’,
‘passwordsalt’ => '
’,
‘secret’ => '
’,
‘trusted_domains’ =>
array (
0 => '
’,
1 => ‘192.168.1.76’,
),
‘datadirectory’ => ‘/volume1/Web/owncloud/data’,
‘overwrite.cli.url’ => '’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘13.0.12.1’,
‘logtimezone’ => ‘Europe/Stockholm’,
‘installed’ => true,
‘theme’ => ‘’,
‘loglevel’ => 2,
‘maintenance’ => false,
‘forcessl’ => true,
‘mail_smtpmode’ => ‘smtp’,
‘mail_smtpauthtype’ => ‘LOGIN’,
‘dbname’ => ‘Owncloud’,
‘dbhost’ => ‘localhost’,
‘dbtableprefix’ => ‘oc_’,
‘dbuser’ => ‘oc_administrator’,
‘dbpassword’ => '
’,
‘mail_smtpauth’ => 1,
‘mail_from_address’ => '
’,
‘mail_domain’ => '
’,
‘mail_smtphost’ => ‘smtp-mail.outlook.com’,
‘mail_smtpport’ => ‘587’,
‘mail_smtpname’ => '
’,
‘mail_smtppassword’ => '
’,
‘mail_smtpsecure’ => ‘tls’,
‘htaccess.RewriteBase’ => ‘/owncloud’,
‘appstore.experimental.enabled’ => false,
‘memcache.local’ => ‘\OC\Memcache\APCu’,
‘memcached_servers’ =>
array (
0 => ‘localhost’,
1 => 11211,
),
‘trashbin_retention_obligation’ => ‘auto’,
‘integrity.check.disabled’ => true,
‘updater.secret’ => '
***’,
‘updater.release.channel’ => ‘production’,
);

Try:

/**
 * Checks an app before install whether it uses private APIs instead of the
 * proper public APIs. If this is set to true it will only allow to install or
 * enable apps that pass this check.
 *
 * Defaults to ``false``
 */
'appcodechecker' => true,
  • and false, just in case too

Send my an email in private message, i upload the files and send them to you, so you can manually replace them.

You got a PM.

The above config changes did not change the situation…

send in email. hope this will fix it.

Got the mail, removed the old file, pasted your file. Still: The files of the app OAuth 2.0 (oauth2) were not replaced correctly. Make sure it is a version compatible with the server…

you need to decompress !
the folder oauth2 and all the subfolder/files need to be re-upload to the correct location, and you need to reapply the linux ownship and rights.

Then restart apache2

Then retry

seem you were pretty fast

Yeah, ofcourse I decompressed the file.

I restarted Apache2 as well.

Edit: Never mind, I gave it the needed rights via the GUI of my server.
Resupply the owner rights though… How? This is a Asustor server where the Linux commands is not always what one may think…

How come I cannot deactivate the app and just carry on with my life… :cry:

welllll …

by any chance, does the app:remove oauth2 works now ?

The app:remove gives me :Command app:remove is not defined…

If I were to restore everything but the Data directory from backup (it is simply to big). What files do I need to restore? Or, is it not possible because of database changes made by the updater?

Last idea !

Accessing your DB, tables oc_appconfig.
Fist save the three entry for oauth2 ( enable/installedversion/types) then delete them…

apache2 restart and maybe mysql too.

retry

I got the following database entries related to oauth2:
oc_oauth2_access_tokens
oc_oauth2_auth_codes
oc_oauth2_clients
oc_oauth2_refresh_tokens

Edit: I exported these. Should I delete them?

NO.

if inside the table oc_appconfig you dont have the three entry do nothing

Try this command files:scan-app-data

My bad. In there, I got the entries.

delete the entry.

restart apache2

retry

Still the goddamn same. Shit. :cry:

I am starting to panic, slightly.

ok.

Just to know, if reinstall is needed, the data and the db will not be impacted.

You just need to restart from scratch, keeping the same config.

That sounds like you are out of ideas? (I dont blame you, I just dont want to realise it).

There is no way to just revert the update as it feels like I am stuck in “update mode”. Maintenance on or off does nothing. (Maintenance enables like it should though.)?

Start from scratch… Ha-ha. I installed this as an Owncloud instance 6 years ago. I cant say I remember how I did it…

check this:

https://docs.nextcloud.com/server/14/admin_manual/maintenance/update.html
or
https://docs.nextcloud.com/server/12/admin_manual/maintenance/migrating.html
this may help
dont worry about 12/14 it the same in 16

If anyone got any more brainstorming ideas in this sad situation, please step forward. I am hungry for all help I can get!

To me, I have a hard time understanding how an app that me as the administator is not even using can cause issues like this…

1 Like

!Moderator may lock the thread!

Ok, lets recap.

This evening has been exciting in many ways. Mainly, because of the fact that this server is a production server.
But, I felt forced to update as Nextcloud 13 has been officially discontinued, with login problems on different apps and so forth as an result.

So, I began earlier this evening by updating my PHP version to 7.3 supplied by my server manufacturer. This update took time from their end, which is the main reason behind me staying on Nextcloud 13.

Well, PHP 7.3 installed.

Lets update.

First problem of the evening, that is not possible, as Nextcloud 13 is not compatible with anything higher then PHP 7.2. This was easily solved by some trickery as described here.

Motivated by the fact that the PHP issue was out of the way, I carried along. Started the update, and boom, 10 seconds later: “The files of the app OAuth 2.0 (oauth2) were not replaced correctly”.
No explanation of why.

My guess is that this is because of the fact that Nextcloud 14 seems to be incompatible/or have it built in where as I should have disabled it before hand.

Anyway. Read this thread backwards and see that over 5 hours have been spent searching for a solution. This problem caused my server to become unreachable, as the only message showed was the error message as stated above. I could not go to sleep knowin the users of the server would be met by this message in the morning. So, I carried on…

For those of you that dont want to read the whole chabang above, here is the solution:

After trying both this and that with stratege1401, I started to feel like a complete restore was the only way to carry on, but it felt like an overly complicated thing as only ONE APP was blocking the update process. I got to the final solution by doing some research about different installation methods, and this was when I realized a manual update should be possible.
So, I stopped my webserver, changed the name of my existing installation directory to ***-old and created a new directory, downloaded Nextcloud 14, moved my config file into the new directory, started the update, started my webserver up again and BOOM. Up and running. I got so happy that I went all the way to Nextcloud 16. (Looks lovely, except for a lot of apps being unsupported as of right now.)

Well. Thank you Stratege1401 for your continous support during the evening, it was highly appreciated so that I could keep my motivation up.

Thanks again!

!Moderator may lock the thread!